diff options
author | Bryant G. Ly <bryantly@linux.vnet.ibm.com> | 2017-01-11 14:16:42 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-26 02:24:40 -0500 |
commit | 51cff2c64d20ba65af768b4d922b98cb7baf947e (patch) | |
tree | 4bddc3d9cc0d3c5e6820d0dc71f833d747da8539 /drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | |
parent | df35a8f51fcbad255df9ac541eef2e84182a4c50 (diff) |
ibmvscsis: Fix sleeping in interrupt context
commit a5b0e4062fb225155189e593699bbfcd0597f8b5 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>
Diffstat (limited to 'drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c')
-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 608140f16d98..c5dd3e0b67eb 100644 --- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | |||
@@ -1239,7 +1239,7 @@ static long ibmvscsis_adapter_info(struct scsi_info *vscsi, | |||
1239 | } | 1239 | } |
1240 | 1240 | ||
1241 | info = dma_alloc_coherent(&vscsi->dma_dev->dev, sizeof(*info), &token, | 1241 | info = dma_alloc_coherent(&vscsi->dma_dev->dev, sizeof(*info), &token, |
1242 | GFP_KERNEL); | 1242 | GFP_ATOMIC); |
1243 | if (!info) { | 1243 | if (!info) { |
1244 | dev_err(&vscsi->dev, "bad dma_alloc_coherent %p\n", | 1244 | dev_err(&vscsi->dev, "bad dma_alloc_coherent %p\n", |
1245 | iue->target); | 1245 | iue->target); |
@@ -1357,7 +1357,7 @@ static int ibmvscsis_cap_mad(struct scsi_info *vscsi, struct iu_entry *iue) | |||
1357 | } | 1357 | } |
1358 | 1358 | ||
1359 | cap = dma_alloc_coherent(&vscsi->dma_dev->dev, olen, &token, | 1359 | cap = dma_alloc_coherent(&vscsi->dma_dev->dev, olen, &token, |
1360 | GFP_KERNEL); | 1360 | GFP_ATOMIC); |
1361 | if (!cap) { | 1361 | if (!cap) { |
1362 | dev_err(&vscsi->dev, "bad dma_alloc_coherent %p\n", | 1362 | dev_err(&vscsi->dev, "bad dma_alloc_coherent %p\n", |
1363 | iue->target); | 1363 | iue->target); |