* Patch "virtio-net: add a missing synchronize_net()" has been added to the 4.8-stable tree
@ 2016-12-08 6:21 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-12-08 6:21 UTC (permalink / raw)
To: edumazet, davem, gregkh, jasowang, mst; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
virtio-net: add a missing synchronize_net()
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
virtio-net-add-a-missing-synchronize_net.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Thu Dec 8 07:19:12 CET 2016
From: Eric Dumazet <edumazet@google.com>
Date: Tue, 15 Nov 2016 22:24:12 -0800
Subject: virtio-net: add a missing synchronize_net()
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit 963abe5c8a0273a1cf5913556da1b1189de0e57a ]
It seems many drivers do not respect napi_hash_del() contract.
When napi_hash_del() is used before netif_napi_del(), an RCU grace
period is needed before freeing NAPI object.
Fixes: 91815639d880 ("virtio-net: rx busy polling support")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/virtio_net.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1468,6 +1468,11 @@ static void virtnet_free_queues(struct v
netif_napi_del(&vi->rq[i].napi);
}
+ /* We called napi_hash_del() before netif_napi_del(),
+ * we need to respect an RCU grace period before freeing vi->rq
+ */
+ synchronize_net();
+
kfree(vi->rq);
kfree(vi->sq);
}
Patches currently in stable-queue which might be from edumazet@google.com are
queue-4.8/ipv4-fix-memory-leak-in-exception-case-for-splitting-tries.patch
queue-4.8/virtio-net-add-a-missing-synchronize_net.patch
queue-4.8/gro_cells-mark-napi-struct-as-not-busy-poll-candidates.patch
queue-4.8/udplite-call-proper-backlog-handlers.patch
queue-4.8/ip6_offload-check-segs-for-null-in-ipv6_gso_segment.patch
queue-4.8/ipv4-restore-fib_trie_flush_external-function-and-fix-call-ordering.patch
queue-4.8/net-dccp-fix-use-after-free-in-dccp_invalid_packet.patch
queue-4.8/net-avoid-signed-overflows-for-so_-snd-rcv-bufforce.patch
queue-4.8/packet-fix-race-condition-in-packet_set_ring.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-12-08 6:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-08 6:21 Patch "virtio-net: add a missing synchronize_net()" has been added to the 4.8-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).