Skip to content

Commit a8b4c35

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 6b4d829 commit a8b4c35

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
@@ -1811,7 +1811,7 @@ sg_start_req(Sg_request *srp, unsigned char *cmd)
18111811
}
18121812

18131813
res = blk_rq_map_user_io(rq, md, hp->dxferp, hp->dxfer_len,
1814-
GFP_ATOMIC, iov_count, iov_count, 1, rw);
1814+
GFP_KERNEL, iov_count, iov_count, 1, rw);
18151815
if (!res) {
18161816
srp->bio = rq->bio;
18171817

0 commit comments

Comments
 (0)