diff options
author | Alexandre Ferrieux <[email protected]> | 2024-11-10 18:28:36 +0100 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-11-12 18:26:03 -0800 |
commit | 73af53d82076bbe184d9ece9e14b0dc8599e6055 (patch) | |
tree | 24297073f910e35a18cd48019ed264fa1e34b6fd /lib/memory-notifier-error-inject.c | |
parent | 2b99b2532593b5a4c7dc6bff2486e98d211a8596 (diff) |
net: sched: cls_u32: Fix u32's systematic failure to free IDR entries for hnodes.
To generate hnode handles (in gen_new_htid()), u32 uses IDR and
encodes the returned small integer into a structured 32-bit
word. Unfortunately, at disposal time, the needed decoding
is not done. As a result, idr_remove() fails, and the IDR
fills up. Since its size is 2048, the following script ends up
with "Filter already exists":
tc filter add dev myve $FILTER1
tc filter add dev myve $FILTER2
for i in {1..2048}
do
echo $i
tc filter del dev myve $FILTER2
tc filter add dev myve $FILTER2
done
This patch adds the missing decoding logic for handles that
deserve it.
Fixes: e7614370d6f0 ("net_sched: use idr to allocate u32 filter handles")
Reviewed-by: Eric Dumazet <[email protected]>
Acked-by: Jamal Hadi Salim <[email protected]>
Signed-off-by: Alexandre Ferrieux <[email protected]>
Tested-by: Victor Nogueira <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions