scsi: aacraid: Fix an Oops in error handling
Subsystems (3)
PATCH 1/1 scsi: aacraid: Fix an Oops in error handling
If the memdup_user() function fails then it results in an Oops in the error handling code when we try to kfree() and error pointer.
Fixes 8d925b1f00e6 ("scsi: aacraid: Use memdup_user() as a cleanup")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/scsi/aacraid/commctrl.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/aacraid/commctrl.c +1 -0
@@ -516,6 +516,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) user_srbcmd =memdup_user (user_srb, fibsize);if (IS_ERR (user_srbcmd)) { rcode =PTR_ERR (user_srbcmd); + user_srbcmd =NULL ; goto cleanup; }
Signature · 1 line
2.26.2
Martin K. Petersen
AppliedQuoted 2 lines · Dan Carpenter
If the
memdup_user()function fails then it results in an Oops in the error handling code when we try tokfree()and error pointer.
Applied to 5.8/scsi-queue, thanks!
[1/1] scsi: aacraid: Fix an oops in error handling
https://git.kernel.org/mkp/scsi/c/25c21d20bcfd
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering