[Devel] [PATCH RHEL7 COMMIT] ms/net: neigh: use dev_kfree_skb_irq instead of kfree_skb()
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Aug 18 19:10:35 MSK 2022
The commit is pushed to "branch-rh7-3.10.0-1160.66.1.vz7.188.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1160.66.1.vz7.188.11
------>
commit 96701d27b0fff83c647388eeb641ac5ce6ddd91e
Author: Yang Yingliang <yangyingliang at huawei.com>
Date: Thu Aug 18 18:44:58 2022 +0300
ms/net: neigh: use dev_kfree_skb_irq instead of kfree_skb()
It is not allowed to call kfree_skb() from hardware interrupt
context or with interrupts being disabled. So replace kfree_skb()
with dev_kfree_skb_irq() under spin_lock_irqsave().
mFixes: 66ba215cb513 ("neigh: fix possible DoS due to net iface
start/stop loop")
Signed-off-by: Yang Yingliang <yangyingliang at huawei.com>
The patch is not accepted by the mainstream, moreover probably there
will be another version of the patch accepted, but for now let's just
take the current version of the patch and substitute it later with the
final one.
https://lore.kernel.org/netdev/79784952-0d15-8a4a-aa8d-590bc243ab5e@virtuozzo.com/t/
---
net/core/neighbour.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 6413665718e5f..d98315ce8ec2f 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -244,7 +244,7 @@ static void pneigh_queue_purge(struct sk_buff_head *list, struct net *net)
__skb_unlink(skb, list);
dev_put(dev);
- kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
}
skb = skb_next;
}
More information about the Devel
mailing list