summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorLiu Dalin <liudalin@kylinsec.com.cn>2026-08-27 16:03:19 +0800
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2026-10-01 09:44:31 +0200
commitd41ee317c9907d714014d0d5e4726fbd6acf338e (patch)
tree41da7ef42a2ea7580428171ae51d4b9411def1f9 /tools/perf/scripts/python/bin/stackcollapse-record
parentc60478875a445dee1206aad6285c18cd8c91f7f2 (diff)
downloadlinux-next-d41ee317c9907d714014d0d5e4726fbd6acf338e.tar.gz
linux-next-d41ee317c9907d714014d0d5e4726fbd6acf338e.zip
rtc: ftrtc010: use devm clock APIs to fix use-after-disable in remove
The driver mixes devm_rtc_register_device() with manual clock disabling in ftrtc010_rtc_remove(). Because the RTC device was registered via devm, it remains registered until devres cleanup runs after .remove() returns. An unprivileged process holding an open /dev/rtc0 file descriptor could issue ioctl(RTC_RD_TIME) during this window, triggering MMIO reads on clock-gated hardware and causing a synchronous external abort. Replace devm_clk_get() + clk_prepare_enable() with devm_clk_get_enabled() to tie clock lifecycle to devres. Remove the manual .remove() callback and the corresponding error handling labels in ftrtc010_rtc_probe(). Fixes: 1d61d2592c1f ("rtc: ftrtc010: Rename to Faraday FTRTC010") Assisted-by: Sashiko AI [static analysis] Signed-off-by: Liu Dalin <liudalin@kylinsec.com.cn> Reviewed-by: Linus Walleij <linusw@kernel.org> Tested-by: Liu Dalin <liudalin@kylinsec.com.cn> Link: https://patch.msgid.link/0238203A74C9B9F6+20260827080320.3351155-3-liudalin@kylinsec.com.cn Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions