netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: sbohrer@rgmadvisors.com, netdev@vger.kernel.org
Subject: Re: [PATCH] udp: ipv4: must add synchronization in udp_sk_rx_dst_set()
Date: Wed, 11 Dec 2013 20:22:12 -0500 (EST)	[thread overview]
Message-ID: <20131211.202212.1810247707228138095.davem@davemloft.net> (raw)
In-Reply-To: <1386802011.19078.4.camel@edumazet-glaptop2.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 11 Dec 2013 14:46:51 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> Unlike TCP, UDP input path does not hold the socket lock.
> 
> Before messing with sk->sk_rx_dst, we must use a spinlock, otherwise
> multiple cpus could leak a refcount.
> 
> This patch also takes care of renewing a stale dst entry.
> (When the sk->sk_rx_dst would not be used by IP early demux)
> 
> Fixes: 421b3885bf6d ("udp: ipv4: Add udp early demux")
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.

Longterm, perhaps a candidate for using xchg() instead of this
spinlock?

  reply	other threads:[~2013-12-12  1:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11  0:39 BUG: held lock freed! (udp_queue_rcv_skb) Dave Jones
2013-12-11  0:54 ` Eric Dumazet
2013-12-11  2:07   ` [PATCH] udp: ipv4: fix an use after free in __udp4_lib_rcv() Eric Dumazet
2013-12-11  3:59     ` David Miller
2013-12-11 16:10     ` [PATCH] udp: ipv4: fix potential use after free in udp_v4_early_demux() Eric Dumazet
2013-12-11 21:16       ` David Miller
2013-12-11 22:46       ` [PATCH] udp: ipv4: must add synchronization in udp_sk_rx_dst_set() Eric Dumazet
2013-12-12  1:22         ` David Miller [this message]
2013-12-15 18:30           ` Eric Dumazet

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=20131211.202212.1810247707228138095.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sbohrer@rgmadvisors.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).