xen-scsifront: use GFP_ATOMIC under spin_lock
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 8 Sep 2014 11:15:42 +0000 (14:15 +0300)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 23 Sep 2014 13:36:19 +0000 (13:36 +0000)
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>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
drivers/scsi/xen-scsifront.c

index 0aceb70e1d83f6f5931fbba92c2a6a76ad5b3227..7e88659bf5af9ba2ff4ad5caefde0e504673959f 100644 (file)
@@ -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;
        }