ibmvscsis: fix sleeping in interrupt context
Subsystems (3)
PATCH 1/1 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.
Tested-by Steven Royer <[email protected]>
Reviewed-by Michael Cyr <[email protected]>
Signed-off-by Bryant G. Ly <[email protected]>
--- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +2 -2
@@ -1391,7 +1391,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);
@@ -1509,7 +1509,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);
Signature · 1 line
2.5.4 (Apple Git-61)
Quoted 3 lines · Bryant G. Ly
Currently,
dma_alloc_coherentis being called with aGFP_KERNELflag which allows it to sleep in an interrupt context, need to change toGFP_ATOMIC.
This patch has been queued for kernel v4.10. Thanks for the patch.
Bart.