Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1735826
| From | Meng Xu <mengxu.gatech@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo |
| Date | 2017-09-20 17:20 +0200 |
| Message-ID | <urOX8-4Mq-17@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo Meng Xu <mengxu.gatech@gmail.com> - 2017-09-20 17:20 +0200 Re: [PATCH] mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-09-26 01:30 +0200
csiph-web