Re: [PATCH] watchdog: lenovo_se30g2_se60_wdt: Watchdog for Lenovo SE30G2 and SE60
Guenter Roeck <[email protected]>
| Newsgroups | org.kernel.vger.linux-watchdog,dev.linux.lists.sashiko-reviews |
|---|---|
| Message-ID | <[email protected]> |
On 6/22/26 08:50, Mark Pearson wrote: > On Mon, Jun 22, 2026, at 10:56 AM, [email protected] wrote: >> Thank you for your contribution! Sashiko AI review found 4 potential >> issue(s) to consider: >> - [High] The global `se_30g2_60_pdev` pointer is not cleared after >> being freed on the `platform_device_add()` error path, leading to a >> Use-After-Free and Double-Free during module exit. > > I belive this is a valid issue - I'll fix in v2. > >> - [High] SuperIO configuration mode is prematurely exited before >> reading `bram_base`, causing the read to fail and the driver to map an >> invalid I/O port address. > > This one is I believe invalid and behaviour is correct. If someone wiser than me disagree's please let me know. > How would anyone but you know ? Normally Super-IO access is disabled after the exit sequence is sent (as "lpc_write(0x2, 0x2);" in lpc_chip_id() seems to do). Maybe this EC is different and does not disable access to its IO space after "lpc_write(0x2, 0x2);". Or maybe that write does not disable Super-IO access at all. Again, who but you would know if the EC behaves differently than all the other Super-IO chips and embedded controllers out there ? If you say this is correct, we'll have to believe you. Thanks, Guenter