lkml.org 
[lkml]   [2015]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/3] netfilter: fix list_entry_rcu usage.
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);
next_hook:
verdict = nf_iterate(&nf_hooks[pf][hook], skb, hook, indev,
outdev, &elem, okfn, hook_thresh);
--
2.1.0


\
 
 \ /
  Last update: 2015-03-24 11:41    [W:0.044 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site