Patch "virtio-net: add a missing synchronize_net()" has been added to the 4.4-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.4-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.4 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:18:57 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
@@ -1465,6 +1465,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.4/virtio-net-add-a-missing-synchronize_net.patch queue-4.4/net-dccp-fix-use-after-free-in-dccp_invalid_packet.patch queue-4.4/net-avoid-signed-overflows-for-so_-snd-rcv-bufforce.patch queue-4.4/packet-fix-race-condition-in-packet_set_ring.patch