diff options
author | Bryant G. Ly <bryantly@linux.vnet.ibm.com> | 2017-01-11 14:16:42 -0500 |
---|---|---|
committer | Bart Van Assche <bart.vanassche@sandisk.com> | 2017-01-17 12:42:29 -0500 |
commit | a5b0e4062fb225155189e593699bbfcd0597f8b5 (patch) | |
tree | 319cb088809dfc00196fa8077809b6b2d2e69f8a /drivers/scsi | |
parent | 387b978cb0d12cf3720ecb17e652e0a9991a08e2 (diff) |
ibmvscsis: Fix sleeping in interrupt context
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.
Cc: stable@vger.kernel.org
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c index 9c91e757c2ef..99b747cedbeb 100644 --- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | |||
@@ -1392,7 +1392,7 @@ static long ibmvscsis_adapter_info(struct scsi_info *vscsi, | |||
1392 | } | 1392 | } |
1393 | 1393 | ||
1394 | info = dma_alloc_coherent(&vscsi->dma_dev->dev, sizeof(*info), &token, | 1394 | info = dma_alloc_coherent(&vscsi->dma_dev->dev, sizeof(*info), &token, |
1395 | GFP_KERNEL); | 1395 | GFP_ATOMIC); |
1396 | if (!info) { | 1396 | if (!info) { |
1397 | dev_err(&vscsi->dev, "bad dma_alloc_coherent %p\n", | 1397 | dev_err(&vscsi->dev, "bad dma_alloc_coherent %p\n", |
1398 | iue->target); | 1398 | iue->target); |
@@ -1510,7 +1510,7 @@ static int ibmvscsis_cap_mad(struct scsi_info *vscsi, struct iu_entry *iue) | |||
1510 | } | 1510 | } |
1511 | 1511 | ||
1512 | cap = dma_alloc_coherent(&vscsi->dma_dev->dev, olen, &token, | 1512 | cap = dma_alloc_coherent(&vscsi->dma_dev->dev, olen, &token, |
1513 | GFP_KERNEL); | 1513 | GFP_ATOMIC); |
1514 | if (!cap) { | 1514 | if (!cap) { |
1515 | dev_err(&vscsi->dev, "bad dma_alloc_coherent %p\n", | 1515 | dev_err(&vscsi->dev, "bad dma_alloc_coherent %p\n", |
1516 | iue->target); | 1516 | iue->target); |