netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf] netfilter: core: remove erroneous warn_on
@ 2017-09-06 12:47 Florian Westphal
  2017-09-06 21:51 ` Aaron Conole
  2017-09-08 12:04 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 3+ messages in thread
From: Florian Westphal @ 2017-09-06 12:47 UTC (permalink / raw)
  To: netfilter-devel; +Cc: 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.

Fixes: d3ad2c17b4047 ("netfilter: core: batch nf_unregister_net_hooks synchronize_net calls")
Reported-by: kernel test robot <xiaolong.ye@intel.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 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 04fe25abc5f6..52cd2901a097 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -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;
-- 
2.13.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH nf] netfilter: core: remove erroneous warn_on
  2017-09-06 12:47 [PATCH nf] netfilter: core: remove erroneous warn_on Florian Westphal
@ 2017-09-06 21:51 ` Aaron Conole
  2017-09-08 12:04 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Aaron Conole @ 2017-09-06 21:51 UTC (permalink / raw)
  To: Florian Westphal; +Cc: netfilter-devel

Florian Westphal <fw@strlen.de> writes:

> 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")
> Reported-by: kernel test robot <xiaolong.ye@intel.com>
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---


Acked-by: Aaron Conole <aconole@bytheb.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH nf] netfilter: core: remove erroneous warn_on
  2017-09-06 12:47 [PATCH nf] netfilter: core: remove erroneous warn_on Florian Westphal
  2017-09-06 21:51 ` Aaron Conole
@ 2017-09-08 12:04 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2017-09-08 12:04 UTC (permalink / raw)
  To: Florian Westphal; +Cc: netfilter-devel

On Wed, Sep 06, 2017 at 02:47:57PM +0200, Florian Westphal wrote:
> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-08 12:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-06 12:47 [PATCH nf] netfilter: core: remove erroneous warn_on Florian Westphal
2017-09-06 21:51 ` Aaron Conole
2017-09-08 12:04 ` Pablo Neira Ayuso

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).