netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, kaber@trash.net
Subject: Re: [PATCH 1/3] netfilter: nft_hash: no need for rcu in the hash set destroy path
Date: Tue, 2 Sep 2014 12:02:13 +0100	[thread overview]
Message-ID: <20140902110213.GA6778@casper.infradead.org> (raw)
In-Reply-To: <1409650721-9621-1-git-send-email-pablo@netfilter.org>

On 09/02/14 at 11:38am, Pablo Neira Ayuso wrote:
> The sets are released from the rcu callback, after the rule is removed
> from the chain list, which implies that nfnetlink cannot update the
> hashes (thus, no resizing may occur) and no packets are walking on the
> set anymore.
> 
> This resolves a lockdep splat in the nft_hash_destroy() path since the
> nfnl mutex is not held there.
> 
> ===============================
> [ INFO: suspicious RCU usage. ]
> 3.16.0-rc2+ #168 Not tainted
> -------------------------------
> net/netfilter/nft_hash.c:362 suspicious rcu_dereference_protected() usage!
> 
> other info that might help us debug this:
> 
> rcu_scheduler_active = 1, debug_locks = 1
> 1 lock held by ksoftirqd/0/3:
>  #0:  (rcu_callback){......}, at: [<ffffffff81096393>] rcu_process_callbacks+0x27e/0x4c7
> 
> stack backtrace:
> CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 3.16.0-rc2+ #168
> Hardware name: LENOVO 23259H1/23259H1, BIOS G2ET32WW (1.12 ) 05/30/2012
>  0000000000000001 ffff88011769bb98 ffffffff8142c922 0000000000000006
>  ffff880117694090 ffff88011769bbc8 ffffffff8107c3ff ffff8800cba52400
>  ffff8800c476bea8 ffff8800c476bea8 ffff8800cba52400 ffff88011769bc08
> Call Trace:
>  [<ffffffff8142c922>] dump_stack+0x4e/0x68
>  [<ffffffff8107c3ff>] lockdep_rcu_suspicious+0xfa/0x103
>  [<ffffffffa079931e>] nft_hash_destroy+0x50/0x137 [nft_hash]
>  [<ffffffffa078cd57>] nft_set_destroy+0x11/0x2a [nf_tables]
> 
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

Acked-by: Thomas Graf <tgraf@suug.ch>

      parent reply	other threads:[~2014-09-02 11:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02  9:38 [PATCH 1/3] netfilter: nft_hash: no need for rcu in the hash set destroy path Pablo Neira Ayuso
2014-09-02  9:38 ` [PATCH 2/3] netfilter: nft_rbtree: no need for spinlock from " Pablo Neira Ayuso
2014-09-02 11:11   ` Thomas Graf
2014-09-02  9:38 ` [PATCH 3/3] rhashtable: fix lockdep splat in rhashtable_destroy() Pablo Neira Ayuso
2014-09-02 11:02   ` Thomas Graf
2014-09-02 10:14 ` [PATCH 1/3] netfilter: nft_hash: no need for rcu in the hash set destroy path Patrick McHardy
2014-09-02 10:38   ` Pablo Neira Ayuso
2014-09-02 10:59     ` Patrick McHardy
2014-09-02 12:22       ` Pablo Neira Ayuso
2014-09-02 12:36         ` Thomas Graf
2014-09-02 13:28         ` Patrick McHardy
2014-09-02 13:41           ` Pablo Neira Ayuso
2014-09-02 14:00             ` Patrick McHardy
2014-09-02 11:02 ` Thomas Graf [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=20140902110213.GA6778@casper.infradead.org \
    --to=tgraf@suug.ch \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /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).