Skip to content

Commit e87443a

Browse files
committed
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>
1 parent 392fa3a commit e87443a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/char/ipmi/ipmi_si_platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ static int acpi_ipmi_probe(struct platform_device *pdev)
381381
dev_info(dev, "%pR regsize %d spacing %d irq %d\n",
382382
res, io.regsize, io.regspacing, io.irq);
383383

384-
request_module("acpi_ipmi");
384+
request_module_nowait("acpi_ipmi");
385385

386386
return ipmi_si_add_smi(&io);
387387
}

drivers/char/ipmi/ipmi_ssif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ static bool check_acpi(struct ssif_info *ssif_info, struct device *dev)
14391439
if (acpi_handle) {
14401440
ssif_info->addr_source = SI_ACPI;
14411441
ssif_info->addr_info.acpi_info.acpi_handle = acpi_handle;
1442-
request_module("acpi_ipmi");
1442+
request_module_nowait("acpi_ipmi");
14431443
return true;
14441444
}
14451445
#endif

0 commit comments

Comments
 (0)