netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Stefano Brivio <sbrivio@redhat.com>,
	"'David S . Miller'" <davem@davemloft.net>
Cc: Jianlin Shi <jishi@redhat.com>,
	Sabrina Dubroca <sd@queasysnail.net>,
	Tom Herbert <tom@herbertland.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net] vxlan: Fix GRO cells race condition between receive and link delete
Date: Fri, 8 Mar 2019 09:03:23 -0800	[thread overview]
Message-ID: <4a7fdc38-16ed-0faa-b7ec-94f591002def@gmail.com> (raw)
In-Reply-To: <42c317f8cfd35becd2a160c400cf4834d53bcef6.1552056324.git.sbrivio@redhat.com>



On 03/08/2019 07:40 AM, Stefano Brivio wrote:
> If we receive a packet while deleting a VXLAN device, there's a chance
> vxlan_rcv() is called at the same time as vxlan_dellink(). This is fine,
> except that vxlan_dellink() should never ever touch stuff that's still in
> use, such as the GRO cells list.
> 
> Otherwise, vxlan_rcv() crashes while queueing packets via
> gro_cells_receive().
> 
> Move the gro_cells_destroy() to vxlan_uninit(), which runs after the RCU
> grace period is elapsed and nothing needs the gro_cells anymore.
> 
> This is now done in the same way as commit 8e816df87997 ("geneve: Use GRO
> cells infrastructure.") originally implemented for GENEVE.
> 
> Reported-by: Jianlin Shi <jishi@redhat.com>
> Fixes: 58ce31cca1ff ("vxlan: GRO support at tunnel layer")
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
> Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>

Nice catch, thanks.

Reviewed-by: Eric Dumazet <edumazet@google.com>


  reply	other threads:[~2019-03-08 17:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08 15:40 [PATCH net] vxlan: Fix GRO cells race condition between receive and link delete Stefano Brivio
2019-03-08 17:03 ` Eric Dumazet [this message]
2019-03-08 19:28 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4a7fdc38-16ed-0faa-b7ec-94f591002def@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jishi@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sbrivio@redhat.com \
    --cc=sd@queasysnail.net \
    --cc=tom@herbertland.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).