All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] ipfrag: really prevent allocation on netns exit
@ 2018-07-06 10:30 Paolo Abeni
  2018-07-08  4:06 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Abeni @ 2018-07-06 10:30 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Eric Dumazet

Setting the low threshold to 0 has no effect on frags allocation,
we need to clear high_thresh instead.

The code was pre-existent to commit 648700f76b03 ("inet: frags:
use rhashtables for reassembly units"), but before the above,
such assignment had a different role: prevent concurrent eviction
from the worker and the netns cleanup helper.

Fixes: 648700f76b03 ("inet: frags: use rhashtables for reassembly units")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 net/ipv4/inet_fragment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
index c9e35b81d093..1e4cf3ab560f 100644
--- a/net/ipv4/inet_fragment.c
+++ b/net/ipv4/inet_fragment.c
@@ -90,7 +90,7 @@ static void inet_frags_free_cb(void *ptr, void *arg)
 
 void inet_frags_exit_net(struct netns_frags *nf)
 {
-	nf->low_thresh = 0; /* prevent creation of new frags */
+	nf->high_thresh = 0; /* prevent creation of new frags */
 
 	rhashtable_free_and_destroy(&nf->rhashtable, inet_frags_free_cb, NULL);
 }
-- 
2.17.1

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

* Re: [PATCH net] ipfrag: really prevent allocation on netns exit
  2018-07-06 10:30 [PATCH net] ipfrag: really prevent allocation on netns exit Paolo Abeni
@ 2018-07-08  4:06 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-07-08  4:06 UTC (permalink / raw)
  To: pabeni; +Cc: netdev, edumazet

From: Paolo Abeni <pabeni@redhat.com>
Date: Fri,  6 Jul 2018 12:30:20 +0200

> Setting the low threshold to 0 has no effect on frags allocation,
> we need to clear high_thresh instead.
> 
> The code was pre-existent to commit 648700f76b03 ("inet: frags:
> use rhashtables for reassembly units"), but before the above,
> such assignment had a different role: prevent concurrent eviction
> from the worker and the netns cleanup helper.
> 
> Fixes: 648700f76b03 ("inet: frags: use rhashtables for reassembly units")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Applied and queued up for -stable, thanks!

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

end of thread, other threads:[~2018-07-08  4:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-06 10:30 [PATCH net] ipfrag: really prevent allocation on netns exit Paolo Abeni
2018-07-08  4:06 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.