Re: [PATCH v2 0/3] rtc: ftrtc010: fix resource management and integer overflow
From: liudalin
Date: Mon Sep 14 2026 - 05:18:45 EST
在 2026/9/14 16:38, Linus Walleij 写道:
On Thu, Aug 27, 2026 at 10:03 AM Liu Dalin <liudalin@xxxxxxxxxxxxxxx> wrote:Hi Linus,
This series fixes three issues in the Faraday FTRTC010 RTC driverAll patches:
found by Sashiko AI static analysis:
Patch 1: Fixes a clock resource leak when devm_rtc_register_device()
fails in ftrtc010_rtc_probe().
Patch 2: Replaces manual clock management with devm APIs to fix a
use-after-disable vulnerability in ftrtc010_rtc_remove(). The RTC
device is registered via devm_rtc_register_device() but clocks are
manually disabled in .remove() before devres cleanup, creating a
window where MMIO reads on clock-gated hardware can cause a
synchronous external abort.
Patch 3: Fixes integer overflow in ftrtc010_rtc_read_time() and
ftrtc010_rtc_set_time() where u32 arithmetic wraps for dates
beyond year 2106.
All three patches are based on v7.2-rc2 and have been verified
with checkpatch.pl --strict.
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>
Maybe they need rebasing on v7.3-rc1 or maybe they will just
apply cleanly (I think so).
Yours,
Linus Walleij
Confirmed: all three patches apply cleanly on v7.3-rc2 using git am.
Tested-by: Liu Dalin <liudalin@xxxxxxxxxxxxxxx>