Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934294AbbEMCmp (ORCPT ); Tue, 12 May 2015 22:42:45 -0400 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.226]:18682 "EHLO cdptpa-oedge-vip.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933300AbbEMCmn (ORCPT ); Tue, 12 May 2015 22:42:43 -0400 Date: Tue, 12 May 2015 22:42:46 -0400 From: Steven Rostedt To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, laijs@cn.fujitsu.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, dhowells@redhat.com, edumazet@google.com, dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com, bobby.prani@gmail.com, patrick.marlier@gmail.com, davem@davemloft.net Subject: Re: [PATCH tip/core/rcu 4/4] netfilter: Fix list_entry_rcu usage Message-ID: <20150512224246.45ce863e@grimm.local.home> In-Reply-To: <1431470787-4702-4-git-send-email-paulmck@linux.vnet.ibm.com> References: <20150512224603.GA4531@linux.vnet.ibm.com> <1431470787-4702-1-git-send-email-paulmck@linux.vnet.ibm.com> <1431470787-4702-4-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-RR-Connecting-IP: 107.14.168.118:25 X-Cloudmark-Score: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1268 Lines: 37 On Tue, 12 May 2015 15:46:27 -0700 "Paul E. McKenney" wrote: > From: Patrick Marlier > > Signed-off-by: Patrick Marlier > Signed-off-by: Paul E. McKenney > --- > 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 e6163017c42d..ad70195929a4 100644 > --- a/net/netfilter/core.c > +++ b/net/netfilter/core.c > @@ -166,7 +166,7 @@ int nf_hook_slow(struct sk_buff *skb, struct nf_hook_state *state) > /* We may already have this, but read-locks nest anyway */ > rcu_read_lock(); > > - elem = list_entry_rcu(&nf_hooks[state->pf][state->hook], > + elem = list_entry_rcu(nf_hooks[state->pf][state->hook].next, > struct nf_hook_ops, list); Looks to be setting to the next element, not the current one. -- Steve > next_hook: > verdict = nf_iterate(&nf_hooks[state->pf][state->hook], skb, state, -- 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/