ipmi: Change request_module to request_module_nowait
authorCorey Minyard <minyard@acm.org>
Tue, 20 Jun 2023 14:59:53 +0000 (09:59 -0500)
committerCorey Minyard <minyard@acm.org>
Tue, 20 Jun 2023 14:59:53 +0000 (09:59 -0500)
commite87443a5f68da7bacefe933c90453ae7215263b3
treece6812020935abebfd719f7387e576e8205fde45
parent392fa3a3abdb03105c8767b7fb176bc8793349f5
ipmi: Change request_module to request_module_nowait

When probing for an ACPI-specified IPMI device, the code would request
that the acpi_ipmi module be loaded ACPI operations through IPMI can be
performed.  This could happen through module load context, for instance,
if an I2C module is loaded that caused the IPMI interface to be probed.

This is not allowed because a synchronous module load in this context
can result in an deadlock, and I was getting a warning:

[   23.967853] WARNING: CPU: 0 PID: 21 at kernel/module/kmod.c:144 __request_module+0x1de/0x2d0
[   23.968852] Modules linked in: i2c_i801 ipmi_ssif

The IPMI driver is not dependent on acpi_ipmi, so just change the called
to request_module_nowait to make the load asynchronous.

Signed-off-by: Corey Minyard <minyard@acm.org>
drivers/char/ipmi/ipmi_si_platform.c
drivers/char/ipmi/ipmi_ssif.c