From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Julia Lawall <julia@diku.dk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux1394-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 12/27] drivers/ieee1394: Use memdup_user
Date: Mon, 31 May 2010 16:58:18 +0000 [thread overview]
Message-ID: <4C03EAAA.6050603@s5r6.in-berlin.de> (raw)
In-Reply-To: <Pine.LNX.4.64.1005221021460.13021@ask.diku.dk>
Julia Lawall wrote on 2010-05-22:
...
> --- a/drivers/ieee1394/video1394.c
> +++ b/drivers/ieee1394/video1394.c
> @@ -1045,14 +1045,9 @@ static long video1394_ioctl(struct file *file,
> if (get_user(qv, &p->packet_sizes))
> return -EFAULT;
>
> - psizes = kmalloc(buf_size, GFP_KERNEL);
> - if (!psizes)
> - return -ENOMEM;
> -
> - if (copy_from_user(psizes, qv, buf_size)) {
> - kfree(psizes);
> - return -EFAULT;
> - }
> + psizes = memdup_user(qv, buf_size);
> + if (IS_ERR(psizes))
> + return PTR_ERR(psizes);
> }
>
> spin_lock_irqsave(&d->lock,flags);
Committed to linux1394-2.6.git now, thanks. (Because akpm said that it
is worth it regardless of video1394 being at its end of life.)
--
Stefan Richter
-===-=-=- -=-= ==http://arcgraph.de/sr/
prev parent reply other threads:[~2010-05-31 16:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-22 8:22 [PATCH 12/27] drivers/ieee1394: Use memdup_user Julia Lawall
2010-05-22 9:25 ` Stefan Richter
2010-05-25 22:32 ` Andrew Morton
2010-05-25 23:25 ` Stefan Richter
2010-05-31 16:58 ` Stefan Richter [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=4C03EAAA.6050603@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=akpm@linux-foundation.org \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
/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