lkml.org 
[lkml]   [2015]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH tip/core/rcu 4/4] netfilter: Fix list_entry_rcu usage
Date
From: Patrick Marlier <patrick.marlier@gmail.com>

Signed-off-by: Patrick Marlier <patrick.marlier@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.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 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);
next_hook:
verdict = nf_iterate(&nf_hooks[state->pf][state->hook], skb, state,
--
1.8.1.5


\
 
 \ /
  Last update: 2015-05-13 01:21    [W:0.180 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site