]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 14 May 2020 08:53:54 +0000 (10:53 +0200)
commit1217c1e79f9c2c11355f01c58685bc7c59b4f0e0
treef0a835bacc586bc5835e8f1d8de06fe9610ae516
parent83eb8dbca8f9b83b81dce71a29f8e03c6e9ee7f1
scsi: sg: add sg_remove_request in sg_common_write

BugLink: https://bugs.launchpad.net/bugs/1875506
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