Skip to contentSkip to conversation

netfilter: core: remove erroneous warn_on

PATCH Applied Florian Westphal 3 participants 3 messages Sep 6, 2017 – Sep 8, 2017

Subsystems (2)
lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 netfilter: core: remove erroneous warn_on

kernel test robot reported:

WARNING: CPU: 0 PID: 1244 at net/netfilter/core.c:218 __nf_hook_entries_try_shrink+0x49/0xcd

[..]

After allowing batching in nf_unregister_net_hooks its possible that an earlier call to __nf_hook_entries_try_shrink already compacted the list. If this happens we don't need to do anything.

Fixes d3ad2c17b4047 ("netfilter: core: batch nf_unregister_net_hooks synchronize_net calls")
---
 net/netfilter/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/core.c +1 -1
index 04fe25abc5f6..52cd2901a097 100644
@@ -215,7 +215,7 @@ static void *__nf_hook_entries_try_shrink(struct nf_hook_entries __rcu **pp)
 	if (skip == hook_entries)
 		goto out_assign;
 
-	if (WARN_ON(skip == 0))
+	if (skip == 0)
 		return NULL;
 
 	hook_entries -= skip;
Signature · 1 line
2.13.0
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Florian Westphal

kernel test robot reported:

WARNING: CPU: 0 PID: 1244 at net/netfilter/core.c:218 __nf_hook_entries_try_shrink+0x49/0xcd

[..]

Quoted 8 lines

After allowing batching in nf_unregister_net_hooks its possible that an earlier call to __nf_hook_entries_try_shrink already compacted the list. If this happens we don't need to do anything.

Fixes d3ad2c17b4047 ("netfilter: core: batch nf_unregister_net_hooks synchronize_net calls")

---

maintainer Applied
#2 lore raw
In reply to Florian Westphal
Quoted 8 lines · Florian Westphal

kernel test robot reported:

WARNING: CPU: 0 PID: 1244 at net/netfilter/core.c:218 __nf_hook_entries_try_shrink+0x49/0xcd

[..]

After allowing batching in nf_unregister_net_hooks its possible that an earlier call to __nf_hook_entries_try_shrink already compacted the list. If this happens we don't need to do anything.

Applied, thanks.