]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
via_wdt: fix critical boot hang due to unnamed resource allocation
authorLi Qiang <liqiang01@kylinos.cn>
Sun, 28 Sep 2025 08:33:32 +0000 (16:33 +0800)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sat, 15 Nov 2025 14:19:48 +0000 (15:19 +0100)
The VIA watchdog driver uses allocate_resource() to reserve a MMIO
region for the watchdog control register. However, the allocated
resource was not given a name, which causes the kernel resource tree
to contain an entry marked as "<BAD>" under /proc/iomem on x86
platforms.

During boot, this unnamed resource can lead to a critical hang because
subsequent resource lookups and conflict checks fail to handle the
invalid entry properly.

Signed-off-by: Li Qiang <liqiang01@kylinos.cn>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/via_wdt.c

index d647923d68fede3ac49bea7601e3701267e85d59..f55576392651844fe68433f23f25015ec3d6be61 100644 (file)
@@ -165,6 +165,7 @@ static int wdt_probe(struct pci_dev *pdev,
                dev_err(&pdev->dev, "cannot enable PCI device\n");
                return -ENODEV;
        }
+       wdt_res.name = "via_wdt";
 
        /*
         * Allocate a MMIO region which contains watchdog control register