Patch "virtio-net: add a missing synchronize_net()" has been added to the 4.8-stable tree
Subsystems (3)
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 <[email protected]> know about it.
Quoted 1 line
From foo@baz Thu Dec 8 07:19:12 CET 2016
From: Eric Dumazet <[email protected]>
Date: Tue, 15 Nov 2016 22:24:12 -0800
Subject: virtio-net: add a missing synchronize_net()
From: Eric Dumazet <[email protected]>
[ 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.
--- drivers/net/virtio_net.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/virtio_net.c +5 -0
@@ -1468,6 +1468,11 @@ static void virtnet_free_queues(struct vnetif_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 [email protected] 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