aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorMa Ke <make_ruc2021@163.com>2026-10-11 20:17:58 +0800
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2026-10-19 22:01:58 +0200
commit22b9306f1fcf86f80b55f05f08d10a9951ba970a (patch)
tree18b01521f9edfb77ea36eb8dbb909a9396bd4cef /scripts/Makefile.thinlto
parentrtc: sun6i: add Allwinner B288 compatible (diff)
platform/x86/amd/pmc: Fix RTC reference leak in amd_pmc_verify_czn_rtc()
amd_pmc_verify_czn_rtc() opens the RTC with rtc_class_open(), which takes both a device reference and a module reference on the RTC driver. The matching release is rtc_class_close(), and it is never called. Every return path after the device has been opened, the ones that return 0 as well as the ones that report an error, leaves both references behind, so each S0i3 suspend leaks them. Release the reference with a __free() cleanup on the declaration, which covers every return path without adding labels. rtc_class_close() does not accept a NULL argument, so the cleanup helper has to guard against one: rtc_class_open() may fail and the declaration still has to be cleaned up. Found by code review. Fixes: 59348401ebed ("platform/x86: amd-pmc: Add special handling for timer based S0i3 wakeup") Cc: stable@vger.kernel.org Signed-off-by: Ma Ke <make_ruc2021@163.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/20261011121759.3267678-1-make_ruc2021@163.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions