All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: tgraf@suug.ch
Cc: cwang@twopensource.com, avagin@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH net] netlink: hold nl_sock_hash_lock during diag dump
Date: Wed, 06 Aug 2014 19:18:24 -0700 (PDT)	[thread overview]
Message-ID: <20140806.191824.1719351238922873517.davem@davemloft.net> (raw)
In-Reply-To: <20140806231847.GA3703@casper.infradead.org>

From: Thomas Graf <tgraf@suug.ch>
Date: Thu, 7 Aug 2014 00:18:47 +0100

> [PATCH net] netlink: hold nl_sock_hash_lock during diag dump
> 
> Although RCU protection would be possible during diag dump, doing
> so allows for concurrent table mutations which can render the
> in-table offset between individual Netlink messages invalid and
> thus cause legitimate sockets to be skipped in the dump.
> 
> Since the diag dump is relatively low volume and consistency is
> more important than performance, the table mutex is held during
> dump.
> 
> Reported-by: Andrey Wagin <avagin@gmail.com>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
> Fixes: e341694e3eb57fc ("netlink: Convert netlink_lookup() to use RCU protected hash table")

Applied, thanks Thomas.

      reply	other threads:[~2014-08-07  2:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 17:29 linux-next: net/netlink/diag.c:106 suspicious rcu_dereference_protected() usage! Andrey Wagin
2014-08-06 17:52 ` Cong Wang
2014-08-06 19:51   ` Thomas Graf
2014-08-06 21:20     ` Cong Wang
2014-08-06 23:18       ` [PATCH net] netlink: hold nl_sock_hash_lock during diag dump Thomas Graf
2014-08-07  2:18         ` David Miller [this message]

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=20140806.191824.1719351238922873517.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=avagin@gmail.com \
    --cc=cwang@twopensource.com \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.