]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ibmvscsis: Fix sleeping in interrupt context
authorBryant G. Ly <bryantly@linux.vnet.ibm.com>
Wed, 11 Jan 2017 19:16:42 +0000 (13:16 -0600)
committerBart Van Assche <bart.vanassche@sandisk.com>
Tue, 17 Jan 2017 17:42:29 +0000 (09:42 -0800)
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>
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c

index 9c91e757c2ef5e2992828016b6a4b16f7f8fd9a3..99b747cedbebc517a78714db321743f0837834b6 100644 (file)
@@ -1392,7 +1392,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);
@@ -1510,7 +1510,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);