Skip to content

Commit f898bbf

Browse files
Christoph Hellwigkawasaki
authored andcommitted
sg: don't use GFP_ATOMIC in sg_start_req
sg_start_req is called from normal user context and can sleep when waiting for memory. Switch it to use GFP_KERNEL, which fixes allocation failures seend with the bio_alloc rework. Fixes: b520c4e ("block: split bio_alloc_bioset more clearly into a fast and slowpath") Reported-by: Shin'ichiro Kawasaki <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Tested-by: Shin'ichiro Kawasaki <[email protected]> Reviewed-by: John Garry <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Bart Van Assche <[email protected]>
1 parent 482ce5b commit f898bbf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/scsi/sg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1801,7 +1801,7 @@ sg_start_req(Sg_request *srp, unsigned char *cmd)
18011801
}
18021802

18031803
res = blk_rq_map_user_io(rq, md, hp->dxferp, hp->dxfer_len,
1804-
GFP_ATOMIC, iov_count, iov_count, 1, rw);
1804+
GFP_KERNEL, iov_count, iov_count, 1, rw);
18051805
if (!res) {
18061806
srp->bio = rq->bio;
18071807

0 commit comments

Comments
 (0)