From: Felipe W Damasio <felipewd@terra.com.br>
To: Alexey Dobriyan <adobriyan@mail.ru>
Cc: Jens Axboe <axboe@suse.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] check copy_from_user return value in sony535
Date: Mon, 06 Oct 2003 13:05:58 -0300 [thread overview]
Message-ID: <3F8192E6.1010302@terra.com.br> (raw)
In-Reply-To: <E1A6XJm-0003Vi-00.adobriyan-mail-ru@f20.mail.ru>
[-- Attachment #1: Type: text/plain, Size: 273 bytes --]
Hi Alexey,
Alexey Dobriyan wrote:
> Fell free to nuke verify_area() right before 'return err;' ;-)
Right :)
> Moving copy_from_user() before spin_up_drive() then also seems right thing to do.
Oh, ok.
Jens, please apply this patch instead.
Thanks Alexey,
Felipe
[-- Attachment #2: sonycd535-copy_from_user.patch --]
[-- Type: text/plain, Size: 637 bytes --]
--- linux-2.6.0-test6/drivers/cdrom/sonycd535.c.orig 2003-10-06 10:46:56.000000000 -0300
+++ linux-2.6.0-test6/drivers/cdrom/sonycd535.c 2003-10-06 13:03:13.000000000 -0300
@@ -1153,12 +1153,10 @@
break;
case CDROMPLAYMSF: /* Play starting at the given MSF address. */
- err = verify_area(VERIFY_READ, (char *)arg, 6);
- if (err)
- return err;
+ if (copy_from_user(params, (void *)arg, 6))
+ return -EFAULT;
spin_up_drive(status);
set_drive_mode(SONY535_AUDIO_DRIVE_MODE, status);
- copy_from_user(params, (void *)arg, 6);
/* The parameters are given in int, must be converted */
for (i = 0; i < 3; i++) {
next parent reply other threads:[~2003-10-06 16:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1A6XJm-0003Vi-00.adobriyan-mail-ru@f20.mail.ru>
2003-10-06 16:05 ` Felipe W Damasio [this message]
2003-10-06 16:10 ` [PATCH] check copy_from_user return value in sony535 Jens Axboe
2003-10-06 13:53 Felipe W Damasio
2003-10-06 13:52 ` Jens Axboe
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=3F8192E6.1010302@terra.com.br \
--to=felipewd@terra.com.br \
--cc=adobriyan@mail.ru \
--cc=axboe@suse.de \
--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