]> git.hungrycats.org Git - linux/commit
sg: fix EWOULDBLOCK errors with scsi-mq
authorTony Battersby <tonyb@cybernetics.com>
Fri, 13 Feb 2015 17:10:58 +0000 (12:10 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2015 22:52:59 +0000 (14:52 -0800)
commitfe34c4e5d4bb43b1b92b0218ea1dd46b9107f21a
tree34f5be71ffcdf87e581adacf5fbbb6162f650e5d
parentba48f249ae10e0ecd8e5dfef215560596d92a1ab
sg: fix EWOULDBLOCK errors with scsi-mq

commit 7772855a996ec6e16944b120ab5ce21050279821 upstream.

With scsi-mq enabled, userspace programs can get unexpected EWOULDBLOCK
(a.k.a. EAGAIN) errors when submitting commands to the SCSI generic
driver.  Fix by calling blk_get_request() with GFP_KERNEL instead of
GFP_ATOMIC.

Note: to avoid introducing a potential deadlock, this patch should be
applied after the patch titled "sg: fix unkillable I/O wait deadlock
with scsi-mq".

Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Tested-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/sg.c