Re: [PATCH v4 1/6] watchdog: w83627hf_wdt: Fix watchdog identity truncation
From: Tzung-Bi Shih
Date: Tue Oct 20 2026 - 09:24:47 EST
On Tue, Oct 20, 2026 at 09:52:54AM +0200, Paul Louvel wrote:
> On Mon Oct 19, 2026 at 5:22 PM CEST, Tzung-Bi Shih wrote:
> > On Tue, Oct 13, 2026 at 03:58:45PM +0200, Paul Louvel wrote:
> >> The identity field in struct watchdog_info is only 32 bytes in size, but
> >> the identity could be at most 33 bytes in this driver, resulting in
> >> truncation.
> >> Remove the "Watchdog" suffix, as this is implied that the device is a
> >> watchdog if a user request his identity.
> >>
> >> Cc: <stable@xxxxxxxxxxxxxxx>
> >> Fixes: 3d6757a640f8 ("watchdog: w83627hf_wdt: Report the probed chip name via WDIOC_GETSUPPORT")
> >> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> >> Closes: https://lore.kernel.org/oe-kbuild-all/202610080027.3OsJDwfo-lkp@xxxxxxxxx/
> >
> > The patch doesn't really fix anything. The longest string in `chip_name`
> > with the " Watchdog" suffix is still under 32 bytes.
>
> Indeed, max is 21.
> No idea why it got reported in the first place also.
It should be from 21 + sizeof(id->name) = 21 + PLATFORM_NAME_SIZE > 32.
482 snprintf(data->info.identity, sizeof(data->info.identity),
> 483 "%s Watchdog", id->name);