From: sashiko-bot@kernel.org
To: phucduc.bui@gmail.com
Cc: linux-watchdog@vger.kernel.org
Subject: Re: [PATCH 3/4] watchdog: dw_wdt: Propagate errors from optional IRQ lookup
Date: Fri, 07 Aug 2026 08:48:40 +0000 [thread overview]
Message-ID: <20260807084841.CBF1C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260807081652.38692-3-phucduc.bui@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Hardware register access and shared IRQ registration occur before device is taken out of reset, which can cause an external abort or bus stall. This problem wasn't introduced by this patch, but it is a critical hardware lifecycle violation.
--
--- Patch [3]: [PATCH 3/4] watchdog: dw_wdt: Propagate errors from optional IRQ lookup ---
commit 415108e73d198e9211e81c51098b9fd10a005104
Author: bui duc phuc <phucduc.bui@gmail.com>
watchdog: dw_wdt: Propagate errors from optional IRQ lookup
This commit modifies dw_wdt_drv_probe() to propagate all error codes
returned by platform_get_irq_optional() other than -ENXIO. This ensures
failures are properly reported to the caller instead of only checking
for -EPROBE_DEFER.
> diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
> index c3fbb6068c520..39031445d754b 100644
> --- a/drivers/watchdog/dw_wdt.c
> +++ b/drivers/watchdog/dw_wdt.c
> @@ -611,7 +611,7 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
>
> dw_wdt->wdd.info = &dw_wdt_pt_ident;
> } else {
> - if (ret == -EPROBE_DEFER)
> + if (ret != -ENXIO)
> return ret;
>
> dw_wdt->wdd.info = &dw_wdt_ident;
[Severity: High]
This is a pre-existing issue, but does this function perform register accesses
and register a shared interrupt before the device is taken out of reset?
Looking at the sequence of operations in dw_wdt_drv_probe():
dw_wdt_drv_probe() {
...
/* Enable normal reset without pre-timeout by default. */
dw_wdt_update_mode(dw_wdt, DW_WDT_RMOD_RESET);
...
ret = devm_request_irq(dev, ret, dw_wdt_irq, IRQF_SHARED ...);
...
reset_control_deassert(dw_wdt->rst);
...
}
If the hardware starts in a reset state, could the register I/O inside
dw_wdt_update_mode() trigger a synchronous external abort or system hang
because it occurs before reset_control_deassert() is called?
Additionally, since devm_request_irq() is called with IRQF_SHARED before
the reset is deasserted, if another device on the same IRQ line triggers
an interrupt, would dw_wdt_irq() execute and attempt to read the watchdog
interrupt status register while the device is still held in reset?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260807081652.38692-1-phucduc.bui@gmail.com?part=3
next prev parent reply other threads:[~2026-08-07 8:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 8:16 [PATCH 1/4] watchdog: qcom: Propagate errors from optional IRQ lookup phucduc.bui
2026-08-07 8:16 ` [PATCH 2/4] watchdog: mediatek: " phucduc.bui
2026-08-09 15:02 ` Guenter Roeck
2026-08-07 8:16 ` [PATCH 3/4] watchdog: dw_wdt: " phucduc.bui
2026-08-07 8:48 ` sashiko-bot [this message]
2026-08-09 15:03 ` Guenter Roeck
2026-08-07 8:16 ` [PATCH 4/4] watchdog: aspeed: " phucduc.bui
2026-08-09 15:05 ` Guenter Roeck
2026-08-10 2:38 ` Bui Duc Phuc
2026-08-10 3:58 ` Guenter Roeck
2026-08-10 9:45 ` Bui Duc Phuc
2026-08-10 14:24 ` Guenter Roeck
2026-08-10 4:34 ` Guenter Roeck
2026-08-07 8:25 ` [PATCH 1/4] watchdog: qcom: " sashiko-bot
2026-08-08 0:23 ` Guenter Roeck
2026-08-08 8:59 ` Bui Duc Phuc
2026-08-08 14:51 ` Guenter Roeck
2026-08-09 10:01 ` Bui Duc Phuc
2026-08-09 14:54 ` Guenter Roeck
2026-08-10 2:42 ` Bui Duc Phuc
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=20260807084841.CBF1C1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=phucduc.bui@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.