瀏覽代碼

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 <dan.carpenter@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Dan Carpenter 11 年之前
父節點
當前提交
d9b1e6374b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/scsi/xen-scsifront.c

+ 1 - 1
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);
 		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;
 	}
 	}