lkml.org 
[lkml]   [2001]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2.4.10-ac9 CDRW Packet Fix
On Mon, Oct 08 2001, Toby Milne wrote:
> The ac tree is missing some braces - without these the userspace buffer
> contents never get copied into the kernel buffer.
>
> --- linux/drivers/cdrom/cdrom.c Mon Oct 8 19:20:56 2001
> +++ linux-2.4.10-ac9/drivers/cdrom/cdrom.c Mon Oct 8 19:19:04 2001
> @@ -1983,10 +1983,10 @@
> if (usense && !access_ok(VERIFY_WRITE, usense, sizeof(*usense)))
> goto out;
>
> - if (cgc->data_direction == CGC_DATA_READ)
> + if (cgc->data_direction == CGC_DATA_READ) {
> if (!access_ok(VERIFY_READ, ubuf, cgc->buflen))
> goto out;
> - else if (cgc->data_direction == CGC_DATA_WRITE)
> + } else if (cgc->data_direction == CGC_DATA_WRITE)
> if (copy_from_user(cgc->buffer, ubuf, cgc->buflen))
> goto out;

Thanks, definitely a braino!

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:05    [W:0.058 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site