From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:57930 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932604AbcLHGXi (ORCPT ); Thu, 8 Dec 2016 01:23:38 -0500 Subject: Patch "virtio-net: add a missing synchronize_net()" has been added to the 4.8-stable tree To: edumazet@google.com, davem@davemloft.net, gregkh@linuxfoundation.org, jasowang@redhat.com, mst@redhat.com Cc: , From: Date: Thu, 08 Dec 2016 07:21:09 +0100 Message-ID: <14811780695129@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From foo@baz Thu Dec 8 07:19:12 CET 2016 From: Eric Dumazet Date: Tue, 15 Nov 2016 22:24:12 -0800 Subject: virtio-net: add a missing synchronize_net() From: Eric Dumazet [ 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 Cc: Jason Wang Cc: Michael S. Tsirkin Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- 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