ipfrag: really prevent allocation on netns exit
authorPaolo Abeni <pabeni@redhat.com>
Fri, 6 Jul 2018 10:30:20 +0000 (12:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Jul 2018 04:05:33 +0000 (13:05 +0900)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inet_fragment.c

index c9e35b81d0931df8429a33e8d03e719b87da0747..1e4cf3ab560fac154fefb7acd3539eb6e91ed84e 100644 (file)
@@ -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);
 }