From: Meng Xu <mengxu.gatech@gmail.com>
To: hch@infradead.org, sathya.prakash@broadcom.com,
chaitra.basappa@broadcom.com,
suganath-prabu.subramani@broadcom.com, jejb@linux.vnet.ibm.com,
martin.petersen@oracle.com, MPT-FusionLinux.pdl@broadcom.com,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: meng.xu@gatech.edu, sanidhya@gatech.edu, taesoo@gatech.edu,
Meng Xu <mengxu.gatech@gmail.com>
Subject: [PATCH] mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo
Date: Wed, 20 Sep 2017 11:13:51 -0400 [thread overview]
Message-ID: <1505920431-13173-1-git-send-email-mengxu.gatech@gmail.com> (raw)
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
next reply other threads:[~2017-09-20 15:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 15:13 Meng Xu [this message]
2017-09-20 15:19 ` [PATCH] mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo Christoph Hellwig
2017-09-25 23:22 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1505920431-13173-1-git-send-email-mengxu.gatech@gmail.com \
--to=mengxu.gatech@gmail.com \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=chaitra.basappa@broadcom.com \
--cc=hch@infradead.org \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=meng.xu@gatech.edu \
--cc=sanidhya@gatech.edu \
--cc=sathya.prakash@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.com \
--cc=taesoo@gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).