Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6f2a4a2 authored by Paolo Abeni's avatar Paolo Abeni Committed by David S. Miller
Browse files

ipfrag: really prevent allocation on netns exit



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 648700f7 ("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: 648700f7 ("inet: frags: use rhashtables for reassembly units")
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent acc2cf4e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}