From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Patrick Marlier <patrick.marlier@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] netfilter: fix list_entry_rcu usage.
Date: Wed, 25 Mar 2015 07:36:07 -0700 [thread overview]
Message-ID: <20150325143607.GA27413@linux.vnet.ibm.com> (raw)
In-Reply-To: <55113D10.4050309@gmail.com>
On Tue, Mar 24, 2015 at 11:31:44AM +0100, Patrick Marlier wrote:
> Signed-off-by: Patrick Marlier <patrick.marlier@gmail.com>
> ---
> net/netfilter/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/netfilter/core.c b/net/netfilter/core.c
> index fea9ef5..05bd311 100644
> --- a/net/netfilter/core.c
> +++ b/net/netfilter/core.c
> @@ -174,7 +174,7 @@ int nf_hook_slow(u_int8_t pf, unsigned int hook,
> struct sk_buff *skb,
> /* We may already have this, but read-locks nest anyway */
> rcu_read_lock();
>
> - elem = list_entry_rcu(&nf_hooks[pf][hook], struct nf_hook_ops, list);
> + elem = list_entry_rcu(nf_hooks[pf][hook].next, struct nf_hook_ops, list);
And this departs from the list_entry() API. Is this really a good idea?
Thanx, Paul
> next_hook:
> verdict = nf_iterate(&nf_hooks[pf][hook], skb, hook, indev,
> outdev, &elem, okfn, hook_thresh);
> --
> 2.1.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2015-03-25 14:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 10:31 [PATCH 2/3] netfilter: fix list_entry_rcu usage Patrick Marlier
2015-03-25 14:36 ` Paul E. McKenney [this message]
2015-03-25 15:11 ` Patrick Marlier
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=20150325143607.GA27413@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patrick.marlier@gmail.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).