summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorCunhao Lu <1579567540@qq.com>2026-07-31 17:45:00 +0800
committerMarc Kleine-Budde <mkl@pengutronix.de>2026-11-03 19:54:28 +0100
commitd743071964920c92af598c87a9e6f4369263ee09 (patch)
tree689eecb6a81897d502946c792a8601c26c3ba408 /tools/perf/scripts/python/stackcollapse.py
parent933bf0fcb325e67b19c86c9c4da7f029878d5170 (diff)
can: skb: make echo skb freeing safe in any IRQ context
can_put_echo_skb() can be called with hardware interrupts disabled. Its direct drop paths use kfree_skb(), while can_create_echo_skb() uses kfree_skb() when cloning fails and consume_skb() after a successful clone. None of these helpers is safe in every IRQ context. Use dev_kfree_skb_any() for all drop paths and dev_consume_skb_any() when consuming a successfully cloned skb. This preserves the respective skb drop and consumed semantics regardless of the caller IRQ context. Signed-off-by: Cunhao Lu <1579567540@qq.com> Link: https://patch.msgid.link/tencent_E84809CF236D0137885E7E4E4D58340B3208@qq.com Cc: stable@kernel.org Fixes: ae64438be192 ("can: dev: fix skb drop check") Fixes: 0ae89beb283a ("can: add destructor for self generated skbs") Fixes: 3ccd4c6167d3 ("can: Unify droping of invalid tx skbs and netdev stats") Fixes: 39549eef3587 ("can: CAN Network device driver and Netlink interface") [mkl: also convert can_dropped_invalid_skb(), can_dev_dropped_skb()] [mkl: add stable on Cc + add Fixes tags] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> --- FAQ: Q: What about the comment in drivers/net/can/virtio_can.c virtio_can_start_xmit()? The error handling for virtqueue_add_sgs() mentions that can_put_echo_skb() consumes the skb via consume_skb(). A: The comment in virtio_can.c will be updated in a separate series, to ease backporting of this patch. [mkl: add FAQ section]
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions