Commit d9b1e637 authored by Dan Carpenter's avatar Dan Carpenter Committed by Stefano Stabellini

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
parent 15d03609
...@@ -359,7 +359,7 @@ static int map_data_for_request(struct vscsifrnt_info *info, ...@@ -359,7 +359,7 @@ static int map_data_for_request(struct vscsifrnt_info *info,
} }
seg_grants = vscsiif_grants_sg(data_grants); seg_grants = vscsiif_grants_sg(data_grants);
shadow->sg = kcalloc(data_grants, shadow->sg = kcalloc(data_grants,
sizeof(struct scsiif_request_segment), GFP_NOIO); sizeof(struct scsiif_request_segment), GFP_ATOMIC);
if (!shadow->sg) if (!shadow->sg)
return -ENOMEM; return -ENOMEM;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment