* [PATCH] ibmvscsis: fix sleeping in interrupt context
@ 2017-01-11 19:16 Bryant G. Ly
2017-01-13 21:17 ` Bart Van Assche
0 siblings, 1 reply; 2+ messages in thread
From: Bryant G. Ly @ 2017-01-11 19:16 UTC (permalink / raw)
To: Bart.VanAssche
Cc: nab, jejb, martin.petersen, linux-scsi, target-devel,
Bryant G. Ly, stable
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>
---
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
index 792a8bd..8e308fd 100644
--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -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);
--
2.5.4 (Apple Git-61)
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ibmvscsis: fix sleeping in interrupt context
2017-01-11 19:16 [PATCH] ibmvscsis: fix sleeping in interrupt context Bryant G. Ly
@ 2017-01-13 21:17 ` Bart Van Assche
0 siblings, 0 replies; 2+ messages in thread
From: Bart Van Assche @ 2017-01-13 21:17 UTC (permalink / raw)
To: bryantly@linux.vnet.ibm.com
Cc: jejb@linux.vnet.ibm.com, linux-scsi@vger.kernel.org,
target-devel@vger.kernel.org, martin.petersen@oracle.com,
nab@linux-iscsi.org, stable@vger.kernel.org
On Wed, 2017-01-11 at 13:16 -0600, Bryant G. Ly wrote:
> 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.
This patch has been queued for kernel v4.10. Thanks for the patch.
Bart.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-13 21:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-11 19:16 [PATCH] ibmvscsis: fix sleeping in interrupt context Bryant G. Ly
2017-01-13 21:17 ` Bart Van Assche
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).