mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-19 02:36:25 +07:00
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.
Link: https://lore.kernel.org/r/20200513093703.GB347693@mwanda
Fixes: 8d925b1f00
("scsi: aacraid: Use memdup_user() as a cleanup")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
55ce24b3bf
commit
25c21d20bc
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user