[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2115674C-AC21-4EF2-AA96-28F670102C81@neclab.eu>
Date: Fri, 22 May 2015 17:14:24 +0000
From: Joao Martins <Joao.Martins@...lab.eu>
To: Wei Liu <wei.liu2@...rix.com>
CC: "xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"ian.campbell@...rix.com" <ian.campbell@...rix.com>,
"david.vrabel@...rix.com" <david.vrabel@...rix.com>,
"boris.ostrovsky@...cle.com" <boris.ostrovsky@...cle.com>,
"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>
Subject: Re: [RFC PATCH 08/13] xen-netback: clone skb if skb->xmit_more is
set
On 19 May 2015, at 17:36, Wei Liu <wei.liu2@...rix.com> wrote:
> On Tue, May 12, 2015 at 07:18:32PM +0200, Joao Martins wrote:
>> On xenvif_start_xmit() we have an additional queue to the netback RX
>> kthread that will sends the packet. When using burst>1 pktgen sets
>> skb->xmit_more to tell the driver that there more skbs in the queue.
>> However, pktgen transmits the same skb <burst> times, which leads to
>> the BUG below. Long story short adding the same skb in the rx_queue
>> queue leads to crash. Specifically, having pktgen running with burst=2
>> what happens is: when we queue the second skb (that is the same as
>> the first queued skb), the list will have the tail element with skb->prev
>> which is the skb itself. On skb_unlink (i.e. when dequeueing the skb)
>> skb->prev will become NULL, but still having list->next pointing to the
>> unlinked skb. Because of this skb_peek will still return an skb, which
>> will redo the skb_unlink trying to set (skb->prev)->next where skb->prev
>> is now NULL, thus leading to the crash (trace below).
>>
>
> From your description this doesn't sound Xen specific. Sounds like
> pktgen breaks in any driver that has an internal queue, which is plenty.
Yes, it’s only on drivers with an internal queue.
>> I'm not sure what the best way to fix this but since it's only happening
>> when we use pktgen with burst>1: I chose doing an skb_clone when we don't
>> use persistent grants and skb->xmit_more flag is set, and when
>> CONFIG_NET_PKTGEN is compiled builtin.
>>
>
> I don't think we should do this.
Ok, I will remove this one out then.
Part of the reason I submitted it was to make you aware of the crash.
Joao
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists