LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] 2.4.10-ac9 CDRW Packet Fix
@ 2001-10-08 19:35 Toby Milne
  2001-10-10  6:41 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Toby Milne @ 2001-10-08 19:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox

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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] 2.4.10-ac9 CDRW Packet Fix
  2001-10-08 19:35 [PATCH] 2.4.10-ac9 CDRW Packet Fix Toby Milne
@ 2001-10-10  6:41 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2001-10-10  6:41 UTC (permalink / raw)
  To: Toby Milne; +Cc: linux-kernel, Alan Cox

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-10  6:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-08 19:35 [PATCH] 2.4.10-ac9 CDRW Packet Fix Toby Milne
2001-10-10  6:41 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).