diff options
author | Helge Deller <deller@gmx.de> | 2024-01-19 23:16:39 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-23 11:24:55 +0300 |
commit | 63bc8a3940834b334e8fe7c265ec056fba00c269 (patch) | |
tree | 15b7d8344d9264c5c16e9ecc5bc1247ec6a5d558 /arch/parisc | |
parent | 7f5375875e84c45fdbf7d3fed2f4475f67d28a8b (diff) | |
download | linux-63bc8a3940834b334e8fe7c265ec056fba00c269.tar.xz |
parisc: Prevent hung tasks when printing inventory on serial console
commit c8708d758e715c3824a73bf0cda97292b52be44d upstream.
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+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/kernel/drivers.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index ed8b75948061..8be4558ef33c 100644 --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c @@ -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)); |