summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorSabrina Dubroca <sd@queasysnail.net>2025-10-16 12:39:13 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2025-10-21 10:42:43 +0200
commit10deb69864840ccf96b00ac2ab3a2055c0c04721 (patch)
tree274c2ab8954b63d91cf75433f5c953d7f0337366 /tools/perf/scripts/python/stackcollapse.py
parent8d2a2a49c30f67a480fa9ed25e08436a446f057e (diff)
downloadkernel-10deb69864840ccf96b00ac2ab3a2055c0c04721.tar.gz
xfrm: also call xfrm_state_delete_tunnel at destroy time for states that were never added
In commit b441cf3f8c4b ("xfrm: delete x->tunnel as we delete x"), I missed the case where state creation fails between full initialization (->init_state has been called) and being inserted on the lists. In this situation, ->init_state has been called, so for IPcomp tunnels, the fallback tunnel has been created and added onto the lists, but the user state never gets added, because we fail before that. The user state doesn't go through __xfrm_state_delete, so we don't call xfrm_state_delete_tunnel for those states, and we end up leaking the FB tunnel. There are several codepaths affected by this: the add/update paths, in both net/key and xfrm, and the migrate code (xfrm_migrate, xfrm_state_migrate). A "proper" rollback of the init_state work would probably be doable in the add/update code, but for migrate it gets more complicated as multiple states may be involved. At some point, the new (not-inserted) state will be destroyed, so call xfrm_state_delete_tunnel during xfrm_state_gc_destroy. Most states will have their fallback tunnel cleaned up during __xfrm_state_delete, which solves the issue that b441cf3f8c4b (and other patches before it) aimed at. All states (including FB tunnels) will be removed from the lists once xfrm_state_fini has called flush_work(&xfrm_state_gc_work). Reported-by: syzbot+999eb23467f83f9bf9bf@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=999eb23467f83f9bf9bf Fixes: b441cf3f8c4b ("xfrm: delete x->tunnel as we delete x") Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
tle='2013-03-07 14:29:40 +0800'>2013-03-07Merge remote-tracking branch 'asoc/fix/wm8350' into tmpMark Brown 2013-03-03ASoC: wm8350: Use jiffies rather than msecs in schedule_delayed_work()Axel Lin 2012-12-24ASoC: wm8350: don't use [delayed_]work_pending()Tejun Heo 2012-12-10ASoC: codecs: remove __dev* attributesBill Pemberton 2012-11-28ASoC: wm8350: Use devm_regulator_bulk_getSachin Kamat 2012-08-20workqueue: deprecate flush[_delayed]_work_sync()Tejun Heo 2012-06-03ASoC: wm8350: Convert to direct regmap API usageMark Brown 2012-06-03ASoC: codecs: Refresh copyrights for Wolfson driversMark Brown 2012-05-14ASoC: wm8350: Remove direct usage of codec->control_dataMark Brown 2012-05-13ASoC: wm8350: Don't use irq_baseMark Brown 2012-05-13Merge tag 'v3.4-rc7' into for-3.5Mark Brown 2012-04-30ASoC: wm8350: Replace use of custom I/O with snd_soc_read()/write()Mark Brown 2012-04-30ASoC: wm8350: Remove check for clocks in trigger()Mark Brown 2012-04-30ASoC: wm8350: Don't use locally allocated codec structMark Brown