summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorLinkai Gong <gonglinkai@kylinos.cn>2026-09-07 15:11:02 +0800
committerAndi Shyti <andi@zenone.zhora.eu>2026-09-16 07:30:36 +0200
commitad34235808b63a70ca4989b7a2852923193d06ef (patch)
tree6627db0261de5d84c56aade68c25c576796df928 /tools/perf/scripts/python/bin/stackcollapse-record
parente0c3e9d76adbe522dd420a766ce42d03ce887c29 (diff)
downloadlinux-next-ad34235808b63a70ca4989b7a2852923193d06ef.tar.gz
linux-next-ad34235808b63a70ca4989b7a2852923193d06ef.zip
i2c: atr: fix dangling adapter pointer on add failure
i2c_atr_add_adapter() stores atr->adapter[chan_id] before i2c_add_adapter() so that the I2C bus notifier can match child clients during registration. On failure the channel is freed but the slot was left pointing at freed memory, which can lead to use-after-free in i2c_atr_del_adapter() / cleanup and also block reuse with -EEXIST. Clear the slot on the i2c_add_adapter() error path before freeing chan. Fixes: a076a860acae ("media: i2c: add I2C Address Translator (ATR) support") Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn> Cc: <stable@vger.kernel.org> # v6.6+ Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://patch.msgid.link/20260907071102.1080840-1-gonglinkai@kylinos.cn
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions