* [PATCH] mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo
@ 2017-09-20 15:13 Meng Xu
2017-09-20 15:19 ` Christoph Hellwig
2017-09-25 23:22 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Meng Xu @ 2017-09-20 15:13 UTC (permalink / raw)
To: hch, sathya.prakash, chaitra.basappa, suganath-prabu.subramani,
jejb, martin.petersen, MPT-FusionLinux.pdl, linux-scsi,
linux-kernel
Cc: meng.xu, sanidhya, taesoo, Meng Xu
Since right after the user copy, we are going to
memset(&karg, 0, sizeof(karg)), the copy_from_user is redundant
Signed-off-by: Meng Xu <mengxu.gatech@gmail.com>
---
drivers/scsi/mpt3sas/mpt3sas_ctl.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index bdffb69..d448fed 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -1065,12 +1065,6 @@ _ctl_getiocinfo(struct MPT3SAS_ADAPTER *ioc, void __user *arg)
{
struct mpt3_ioctl_iocinfo karg;
- if (copy_from_user(&karg, arg, sizeof(karg))) {
- pr_err("failure at %s:%d/%s()!\n",
- __FILE__, __LINE__, __func__);
- return -EFAULT;
- }
-
dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s: enter\n", ioc->name,
__func__));
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo
2017-09-20 15:13 [PATCH] mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo Meng Xu
@ 2017-09-20 15:19 ` Christoph Hellwig
2017-09-25 23:22 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2017-09-20 15:19 UTC (permalink / raw)
To: Meng Xu
Cc: hch, sathya.prakash, chaitra.basappa, suganath-prabu.subramani,
jejb, martin.petersen, MPT-FusionLinux.pdl, linux-scsi,
linux-kernel, meng.xu, sanidhya, taesoo
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo
2017-09-20 15:13 [PATCH] mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo Meng Xu
2017-09-20 15:19 ` Christoph Hellwig
@ 2017-09-25 23:22 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2017-09-25 23:22 UTC (permalink / raw)
To: Meng Xu
Cc: hch, sathya.prakash, chaitra.basappa, suganath-prabu.subramani,
jejb, martin.petersen, MPT-FusionLinux.pdl, linux-scsi,
linux-kernel, meng.xu, sanidhya, taesoo
Meng,
> Since right after the user copy, we are going to
> memset(&karg, 0, sizeof(karg)), the copy_from_user is redundant
Applied to 4.15/scsi-queue. Thank you!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-25 23:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-20 15:13 [PATCH] mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo Meng Xu
2017-09-20 15:19 ` Christoph Hellwig
2017-09-25 23:22 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).