All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] xen-scsifront: use GFP_ATOMIC under spin_lock
@ 2014-09-08 11:15 ` Dan Carpenter
  0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2014-09-08 11:15 UTC (permalink / raw)
  To: Juergen Gross
  Cc: Konrad Rzeszutek Wilk, Boris Ostrovsky, David Vrabel,
	James E.J. Bottomley, xen-devel, linux-scsi, kernel-janitors

This function is only called with a spin_lock held and IRQs disabled.
The allocation is not allowed to sleep and NOIO is not sufficient, it
has to be ATOMIC.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c
index 0aceb70..7e88659 100644
--- a/drivers/scsi/xen-scsifront.c
+++ b/drivers/scsi/xen-scsifront.c
@@ -359,7 +359,7 @@ static int map_data_for_request(struct vscsifrnt_info *info,
 		}
 		seg_grants = vscsiif_grants_sg(data_grants);
 		shadow->sg = kcalloc(data_grants,
-			sizeof(struct scsiif_request_segment), GFP_NOIO);
+			sizeof(struct scsiif_request_segment), GFP_ATOMIC);
 		if (!shadow->sg)
 			return -ENOMEM;
 	}

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [patch] xen-scsifront: use GFP_ATOMIC under spin_lock
@ 2014-09-08 11:15 Dan Carpenter
  0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2014-09-08 11:15 UTC (permalink / raw)
  To: Juergen Gross
  Cc: linux-scsi, kernel-janitors, James E.J. Bottomley, David Vrabel,
	xen-devel, Boris Ostrovsky

This function is only called with a spin_lock held and IRQs disabled.
The allocation is not allowed to sleep and NOIO is not sufficient, it
has to be ATOMIC.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c
index 0aceb70..7e88659 100644
--- a/drivers/scsi/xen-scsifront.c
+++ b/drivers/scsi/xen-scsifront.c
@@ -359,7 +359,7 @@ static int map_data_for_request(struct vscsifrnt_info *info,
 		}
 		seg_grants = vscsiif_grants_sg(data_grants);
 		shadow->sg = kcalloc(data_grants,
-			sizeof(struct scsiif_request_segment), GFP_NOIO);
+			sizeof(struct scsiif_request_segment), GFP_ATOMIC);
 		if (!shadow->sg)
 			return -ENOMEM;
 	}

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-09-08 17:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-08 11:15 [patch] xen-scsifront: use GFP_ATOMIC under spin_lock Dan Carpenter
2014-09-08 11:15 ` Dan Carpenter
2014-09-08 11:30 ` Juergen Gross
2014-09-08 11:30 ` [Xen-devel] " Juergen Gross
2014-09-08 11:30   ` Juergen Gross
2014-09-08 17:34 ` David Vrabel
2014-09-08 17:34 ` [Xen-devel] " David Vrabel
2014-09-08 17:34   ` David Vrabel
  -- strict thread matches above, loose matches on Subject: below --
2014-09-08 11:15 Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.