Re: [PATCH 2/2] virtio: delete napi structures from netdev before releasing memory

2013-12-06 Thread Rusty Russell
Jason Wang writes: > On 12/05/2013 10:36 PM, Andrey Vagin wrote: >> free_netdev calls netif_napi_del too, but it's too late, because napi >> structures are placed on vi->rq. netif_napi_add() is called from >> virtnet_alloc_queues. >> >> general protection fault: [#1] SMP >> Dumping ftrace buf

Re: [PATCH 1/2] virtio-net: determine type of bufs correctly

2013-12-06 Thread Rusty Russell
Jason Wang writes: > On 12/05/2013 10:36 PM, Andrey Vagin wrote: >> free_unused_bufs must check vi->mergeable_rx_bufs before >> vi->big_packets, because we use this sequence in other places. >> Otherwise we allocate buffer of one type, then free it as another >> type. >> >> general protection faul

Re: [PATCH v2] virtio-net: free bufs correctly on invalid packet length

2013-12-06 Thread Rusty Russell
Michael Dalton writes: > When a packet with invalid length arrives, ensure that the packet > is freed correctly if mergeable packet buffers and big packets > (GUEST_TSO4) are both enabled. > > Signed-off-by: Michael Dalton Acked-by: Rusty Russell Thanks! > --- > drivers/net/virtio_net.c | 6

Re: [PATCH v2] virtio-net: free bufs correctly on invalid packet length

2013-12-06 Thread Michael Dalton
Hi David, This patch fixes a bug introduced by 2613af0ed18a ("virtio_net: migrate mergeable rx buffers to page frag allocators"). The bug is present in both net-next and net. Thanks Best, Mike On Fri, Dec 6, 2013 at 1:32 PM, David Miller wrote: > From: Michael Dalton > Date: Thu, 5 Dec 2013

Re: [PATCH v2] virtio-net: free bufs correctly on invalid packet length

2013-12-06 Thread David Miller
From: Michael Dalton Date: Thu, 5 Dec 2013 13:14:05 -0800 > When a packet with invalid length arrives, ensure that the packet > is freed correctly if mergeable packet buffers and big packets > (GUEST_TSO4) are both enabled. > > Signed-off-by: Michael Dalton Applied, is this needed for -stable

Re: [PATCH 2/2] virtio: delete napi structures from netdev before releasing memory

2013-12-06 Thread David Miller
From: Andrey Vagin Date: Thu, 5 Dec 2013 18:36:21 +0400 > free_netdev calls netif_napi_del too, but it's too late, because napi > structures are placed on vi->rq. netif_napi_add() is called from > virtnet_alloc_queues. ... > Fixes: 986a4f4d452d (virtio_net: multiqueue support) > Cc: Rusty Russe

Re: [PATCH 1/2] virtio-net: determine type of bufs correctly

2013-12-06 Thread David Miller
From: Andrey Vagin Date: Thu, 5 Dec 2013 18:36:20 +0400 > free_unused_bufs must check vi->mergeable_rx_bufs before > vi->big_packets, because we use this sequence in other places. > Otherwise we allocate buffer of one type, then free it as another > type. ... > Fixes: 2613af0ed18a (virtio_net:

Re: [PATCH v2] virtio-net: free bufs correctly on invalid packet length

2013-12-06 Thread Andrew Vagin
On Thu, Dec 05, 2013 at 01:14:05PM -0800, Michael Dalton wrote: > When a packet with invalid length arrives, ensure that the packet > is freed correctly if mergeable packet buffers and big packets > (GUEST_TSO4) are both enabled. > > Signed-off-by: Michael Dalton Acked-by: Andrew Vagin > --- >

Re: [PATCH] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers

2013-12-06 Thread Will Deacon
On Fri, Dec 06, 2013 at 02:38:28PM +, Richard Yao wrote: > On 12/06/2013 06:14 AM, Will Deacon wrote: > > On Wed, Dec 04, 2013 at 08:43:18PM +, Richard Yao wrote: > >> diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c > >> index 9c5a1aa..5d1d04b 100644 > >> --- a/net/9p/trans_virti

Re: [PATCH] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers

2013-12-06 Thread Richard Yao
On 12/06/2013 06:14 AM, Will Deacon wrote: > On Wed, Dec 04, 2013 at 08:43:18PM +, Richard Yao wrote: >> The 9p-virtio transport does zero copy on things larger than 1024 bytes >> in size. It accomplishes this by returning the physical addresses of >> pages to the virtio-pci device. At present,

Re: [PATCH] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers

2013-12-06 Thread Will Deacon
On Wed, Dec 04, 2013 at 08:43:18PM +, Richard Yao wrote: > The 9p-virtio transport does zero copy on things larger than 1024 bytes > in size. It accomplishes this by returning the physical addresses of > pages to the virtio-pci device. At present, the translation is usually a > bit shift. > >