]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
scsi: sg: add sg_remove_request in sg_common_write
authorLi Bin <huawei.libin@huawei.com>
Mon, 13 Apr 2020 11:29:21 +0000 (19:29 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 25 May 2020 08:41:10 +0000 (10:41 +0200)
commit3ab64ab62cdaef23b5cc78d05d036204ad7e67a0
treef18f1c96e7877cd4620388f0ca2d0d4a62d6b1ea
parenta1d0567545c664d8a9cb743430fb4fabcccadeb4
scsi: sg: add sg_remove_request in sg_common_write

BugLink: https://bugs.launchpad.net/bugs/1875660
commit 849f8583e955dbe3a1806e03ecacd5e71cce0a08 upstream.

If the dxfer_len is greater than 256M then the request is invalid and we
need to call sg_remove_request in sg_common_write.

Link: https://lore.kernel.org/r/1586777361-17339-1-git-send-email-huawei.libin@huawei.com
Fixes: f930c7043663 ("scsi: sg: only check for dxfer_len greater than 256M")
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Li Bin <huawei.libin@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/scsi/sg.c