summaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2022-02-15 07:32:34 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2022-02-27 21:21:21 -0500
commite3af2e3b0019d9040f7cce39a8992cb4c03a087b (patch)
treefdedca855bae79bd71aef36b1f5241d73bce7abf /drivers/message
parentc5b483d5c1a26b6006180f5dc7b2f8674f19afa3 (diff)
downloadlinux-e3af2e3b0019d9040f7cce39a8992cb4c03a087b.tar.gz
linux-e3af2e3b0019d9040f7cce39a8992cb4c03a087b.tar.bz2
linux-e3af2e3b0019d9040f7cce39a8992cb4c03a087b.zip
scsi: message: fusion: Use GFP_KERNEL instead of GFP_ATOMIC in non-atomic context
Just a few lines below this kzalloc() we have a mutex_lock() which can sleep. Moreover, the only way to call this function is when a delayed work is schedule. And delayed work can sleep: INIT_DELAYED_WORK(&fw_event->work, mptsas_firmware_event_work); --> mptsas_firmware_event_work() --> mptsas_send_link_status_event() --> mptsas_expander_add() So there is really no good reason to use GFP_ATOMIC here. Change it to GFP_KERNEL to give more opportunities to the kernel. Link: https://lore.kernel.org/r/eccb2179ce800529851ed4fabc9d3f95fbbf7d7f.1644906731.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/mptsas.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 4acd8f9a48e1..34901bcd1ce8 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -3680,7 +3680,7 @@ mptsas_expander_add(MPT_ADAPTER *ioc, u16 handle)
MPI_SAS_EXPAND_PGAD_FORM_SHIFT), handle)))
return NULL;
- port_info = kzalloc(sizeof(struct mptsas_portinfo), GFP_ATOMIC);
+ port_info = kzalloc(sizeof(struct mptsas_portinfo), GFP_KERNEL);
if (!port_info) {
dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
"%s: exit at line=%d\n", ioc->name,