Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

via_wdt: fix critical boot hang due to unnamed resource allocation

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>

authored by

Li Qiang and committed by
Wim Van Sebroeck
7aa31ee9 e9a6fb0b

+1
+1
drivers/watchdog/via_wdt.c
··· 165 165 dev_err(&pdev->dev, "cannot enable PCI device\n"); 166 166 return -ENODEV; 167 167 } 168 + wdt_res.name = "via_wdt"; 168 169 169 170 /* 170 171 * Allocate a MMIO region which contains watchdog control register