Linux Watchdog driver development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Lorenzo Egidio" <lorenzoegidioms@gmail.com>
Cc: linux-watchdog@vger.kernel.org
Subject: Re: [PATCH] Watchdog: fix pretimeout noop governor logging and description
Date: Tue, 16 Jun 2026 17:20:09 +0000	[thread overview]
Message-ID: <20260616172009.F2C951F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260616171955.658-1-lorenzoegidioms@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The patch leaves the `%d` format specifier in the `pr_alert` string but removes the corresponding argument.
--

commit 0327e7d6697fa21e6b3ac5f9311da43e2ca86831
Author: Lorenzo Egidio <lorenzoegidioms@gmail.com>

Watchdog: fix pretimeout noop governor logging and description

This commit updates the watchdog pretimeout noop governor by removing
the usage of wdd->id to avoid potential compilation issues on different
kernel versions. It also corrects the module description to match the
governor's name.

> diff --git a/drivers/watchdog/pretimeout_noop.c b/drivers/watchdog/pretimeout_noop.c
> index 74ec02b9ffca4..ddb5192fb06bc 100644
> --- a/drivers/watchdog/pretimeout_noop.c
> +++ b/drivers/watchdog/pretimeout_noop.c
> @@ -17,7 +17,7 @@
>   */
>  static void pretimeout_noop(struct watchdog_device *wdd)
>  {
> -	pr_alert("watchdog%d: pretimeout event\n", wdd->id);
> +	pr_alert("watchdog%d: pretimeout event\n");

[Severity: Medium]
Does this leave a format specifier without a corresponding argument? 

The commit message suggested changing the string to 
"watchdog: pretimeout event\n", but the %d is still present in the format 
string. This will likely cause pr_alert() to read an uninitialized integer 
from the stack or a register, resulting in garbage values being printed to 
the kernel log.

>  }
>  
>  static struct watchdog_governor watchdog_gov_noop = {
[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260616171955.658-1-lorenzoegidioms@gmail.com?part=1

  reply	other threads:[~2026-06-16 17:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16 17:19 [PATCH] Watchdog: fix pretimeout noop governor logging and description Lorenzo Egidio
2026-06-16 17:20 ` sashiko-bot [this message]
2026-06-16 18:44 ` Guenter Roeck
2026-06-17  4:30 ` kernel test robot
2026-06-17  4:34 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260616172009.F2C951F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=lorenzoegidioms@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox