Skip to contentSkip to conversation

xen-scsifront: use GFP_ATOMIC under spin_lock

PATCH Applied Dan Carpenter 3 participants 5 messages Sep 8, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

drivers/scsi/xen-scsifront.c +1 -1
index 0aceb70..7e88659 100644
@@ -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;
 	}
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Dan Carpenter

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.

Thanks,

Juergen

Quoted 20 lines
drivers/scsi/xen-scsifront.c +1 -1
index 0aceb70..7e88659 100644
@@ -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;
  	}

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Dan Carpenter
Quoted 5 lines · Dan Carpenter

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.

Thanks,

Juergen

Quoted 20 lines
drivers/scsi/xen-scsifront.c +1 -1
index 0aceb70..7e88659 100644
@@ -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;
  	}

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Applied
#3 lore raw
In reply to Dan Carpenter
Quoted 3 lines · Dan Carpenter

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.

Applied this and the scsiback one to devel/for-linus-3.18.

Thanks.

David

Applied
#4 lore raw
In reply to Dan Carpenter
Quoted 3 lines · Dan Carpenter

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.

Applied this and the scsiback one to devel/for-linus-3.18.

Thanks.

David