From: Dan Carpenter Date: Mon, 8 Sep 2014 11:15:42 +0000 (+0300) Subject: xen-scsifront: use GFP_ATOMIC under spin_lock X-Git-Tag: firefly_0821_release~176^2~3080^2~14 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d9b1e6374b3a9b88774e30d0c6bf6e394cd10b76;p=firefly-linux-kernel-4.4.55.git xen-scsifront: use GFP_ATOMIC under spin_lock 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 Reviewed-by: Juergen Gross Signed-off-by: David Vrabel --- diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c index 0aceb70e1d83..7e88659bf5af 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; }