From: Joe Perches <joe@perches.com>
To: Fabian Frederick <fabf@skynet.be>
Cc: linux-kernel@vger.kernel.org,
Anil Gurumurthy <anil.gurumurthy@qlogic.com>,
"James E.J. Bottomley" <JBottomley@parallels.com>,
One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH V2] drivers/scsi/bfa/bfad_debugfs.c: replace 2 kzalloc/copy_from_user to memdup_user
Date: Mon, 02 Jun 2014 10:37:03 -0700 [thread overview]
Message-ID: <1401730623.5770.26.camel@joe-AO725> (raw)
In-Reply-To: <1401730145-16660-1-git-send-email-fabf@skynet.be>
On Mon, 2014-06-02 at 19:29 +0200, Fabian Frederick wrote:
> This patch also removes unnecessary printk(KERN_INFO
[]
> diff --git a/drivers/scsi/bfa/bfad_debugfs.c b/drivers/scsi/bfa/bfad_debugfs.c
[]
> @@ -260,18 +260,10 @@ bfad_debugfs_write_regrd(struct file *file, const char __user *buf,
> unsigned long flags;
> void *kern_buf;
>
> - kern_buf = kzalloc(nbytes, GFP_KERNEL);
> + kern_buf = memdup_user((void __user *)buf, nbytes);
Unnecessary cast?
[]
> @@ -336,18 +328,10 @@ bfad_debugfs_write_regwr(struct file *file, const char __user *buf,
> unsigned long flags;
> void *kern_buf;
>
> - kern_buf = kzalloc(nbytes, GFP_KERNEL);
> + kern_buf = memdup_user((void __user *)buf, nbytes);
here too?
prev parent reply other threads:[~2014-06-02 17:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-02 17:29 Fabian Frederick
2014-06-02 17:37 ` Joe Perches [this message]
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=1401730623.5770.26.camel@joe-AO725 \
--to=joe@perches.com \
--cc=JBottomley@parallels.com \
--cc=anil.gurumurthy@qlogic.com \
--cc=fabf@skynet.be \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®