parisc: Prevent hung tasks when printing inventory on serial console
authorHelge Deller <deller@gmx.de>
Fri, 19 Jan 2024 20:16:39 +0000 (21:16 +0100)
committerHelge Deller <deller@gmx.de>
Sun, 28 Jan 2024 08:49:47 +0000 (09:49 +0100)
Printing the inventory on a serial console can be quite slow and thus may
trigger the hung task detector (CONFIG_DETECT_HUNG_TASK=y) and possibly
reboot the machine. Adding a cond_resched() prevents this.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org> # v6.0+
arch/parisc/kernel/drivers.c

index 25f9b9e..404ea37 100644 (file)
@@ -1004,6 +1004,9 @@ static __init int qemu_print_iodc_data(struct device *lin_dev, void *data)
 
        pr_info("\n");
 
+       /* Prevent hung task messages when printing on serial console */
+       cond_resched();
+
        pr_info("#define HPA_%08lx_DESCRIPTION \"%s\"\n",
                hpa, parisc_hardware_description(&dev->id));