scsi: sg: add sg_remove_request in sg_write
mainline inclusion from mainline-v5.7-rc3 commit 83c6f239 category: bugfix bugzilla: 13690 CVE: CVE-2020-12770 ------------------------------------------------- If the __copy_from_user function failed we need to call sg_remove_request in sg_write. Link: https://lore.kernel.org/r/610618d9-e983-fd56-ed0f-639428343af7@huawei.comAcked-by: NDouglas Gilbert <dgilbert@interlog.com> Signed-off-by: NWu Bo <wubo40@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Conflicts: drivers/scsi/sg.c [yyl: adjust context] Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录