mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
ibmvscsis: Fix sleeping in interrupt context
commit a5b0e4062f upstream.
Currently, dma_alloc_coherent is being called with a GFP_KERNEL
flag which allows it to sleep in an interrupt context, need to
change to GFP_ATOMIC.
Tested-by: Steven Royer <seroyer@linux.vnet.ibm.com>
Reviewed-by: Michael Cyr <mikecyr@linux.vnet.ibm.com>
Signed-off-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
df35a8f51f
commit
51cff2c64d
@@ -1239,7 +1239,7 @@ static long ibmvscsis_adapter_info(struct scsi_info *vscsi,
|
||||
}
|
||||
|
||||
info = dma_alloc_coherent(&vscsi->dma_dev->dev, sizeof(*info), &token,
|
||||
GFP_KERNEL);
|
||||
GFP_ATOMIC);
|
||||
if (!info) {
|
||||
dev_err(&vscsi->dev, "bad dma_alloc_coherent %p\n",
|
||||
iue->target);
|
||||
@@ -1357,7 +1357,7 @@ static int ibmvscsis_cap_mad(struct scsi_info *vscsi, struct iu_entry *iue)
|
||||
}
|
||||
|
||||
cap = dma_alloc_coherent(&vscsi->dma_dev->dev, olen, &token,
|
||||
GFP_KERNEL);
|
||||
GFP_ATOMIC);
|
||||
if (!cap) {
|
||||
dev_err(&vscsi->dev, "bad dma_alloc_coherent %p\n",
|
||||
iue->target);
|
||||
|
||||
Reference in New Issue
Block a user