Skip to contentSkip to conversation

Patch "net_sched: fix a missing idr_remove() in u32_delete_key()" has been added to the 4.15-stable tree

PATCH [email protected] 1 participant 1 message Apr 10, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

net_sched: fix a missing idr_remove() in u32_delete_key()

to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
net_sched-fix-a-missing-idr_remove-in-u32_delete_key.patch
and it can be found in the queue-4.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Tue Apr 10 23:19:36 CEST 2018

From: Cong Wang <[email protected]>
Date: Fri, 6 Apr 2018 17:19:41 -0700
Subject: net_sched: fix a missing idr_remove() in u32_delete_key()

From: Cong Wang <[email protected]>

[ Upstream commit f12c643209db0626f2f54780d86bb93bfa7a9c2d ]

When we delete a u32 key via u32_delete_key(), we forget to call idr_remove() to remove its handle from IDR.

Fixes e7614370d6f0 ("net_sched: use idr to allocate u32 filter handles")
---
 net/sched/cls_u32.c |    1 +
 1 file changed, 1 insertion(+)
net/sched/cls_u32.c +1 -0
@@ -478,6 +478,7 @@ static int u32_delete_key(struct tcf_pro
 				RCU_INIT_POINTER(*kp, key->next);
 
 				tcf_unbind_filter(tp, &key->res);
+				idr_remove(&ht->handle_idr, key->handle);
 				tcf_exts_get_net(&key->exts);
 				call_rcu(&key->rcu, u32_delete_key_freepf_rcu);
 				return 0;

Patches currently in stable-queue which might be from [email protected] are

queue-4.15/net_sched-fix-a-missing-idr_remove-in-u32_delete_key.patch