From: Muhammad Falak R Wani <falakreyaz@gmail.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
Jan Kara <jack@suse.cz>,
"open list:S390" <linux-s390@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ks390/keyboard: use memdup_user().
Date: Fri, 20 May 2016 18:37:32 +0530 [thread overview]
Message-ID: <20160520130732.GA12270@kp> (raw)
In-Reply-To: <20160520130325.GE3461@osiris>
On Fri, May 20, 2016 at 03:03:25PM +0200, Heiko Carstens wrote:
> On Fri, May 20, 2016 at 05:52:16PM +0530, Muhammad Falak R Wani wrote:
> > Use memdup_user to duplicate a memory region from user-space to
> > kernel-space, instead of open coding using kmalloc & copy_from_user.
> >
> > Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
> > + p = memdup_user(u_kbs->kb_string, len);
> > + if (IS_ERR(p))
> > + return PTR_ERR(p);
> > /*
> > * Make sure the string is terminated by 0. User could have
> > * modified it between us running strnlen_user() and copying it.
>
> Hi Muhammad, thanks for this patch. However could you change this to use
> memdup_user_nul() instead, so we can get rid of even more code?
>
Should I send V2 with the suggested changes ?
prev parent reply other threads:[~2016-05-20 13:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-20 12:22 [PATCH] ks390/keyboard: use memdup_user() Muhammad Falak R Wani
2016-05-20 13:03 ` Heiko Carstens
2016-05-20 13:07 ` Muhammad Falak R Wani [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=20160520130732.GA12270@kp \
--to=falakreyaz@gmail.com \
--cc=heiko.carstens@de.ibm.com \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.