mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
net: shaper: drop unnecessary kfree_rcu in pre_insert
If we fail to insert a node into the XArray in net_shaper_pre_insert() we can free it directly - it was never visible to the RCU readers. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Link: https://patch.msgid.link/20260609183224.1108521-3-kuba@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
committed by
Paolo Abeni
parent
f26cddcf2a
commit
3500dfa6ff
@@ -406,7 +406,7 @@ static int net_shaper_pre_insert(struct net_shaper_binding *binding,
|
||||
prev = xa_store(&hierarchy->shapers, index, cur, GFP_KERNEL);
|
||||
if (xa_err(prev)) {
|
||||
NL_SET_ERR_MSG(extack, "Can't insert shaper into device store");
|
||||
kfree_rcu(cur, rcu);
|
||||
kfree(cur);
|
||||
ret = xa_err(prev);
|
||||
goto free_id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user