Re: video_usercopy() enforces change of VideoText IOCTLs since 2.6.8

From: Gerd Knorr
Date: Fri Oct 08 2004 - 06:02:31 EST


On Thu, Oct 07, 2004 at 06:54:10PM +0200, Michael Geng wrote:
> from kernel 2.6.7 to 2.6.8 function video_usercopy() in
> videodev.c was modified

> case _IOC_NONE:
> ===> 2.6.7:
> parg = (void *)arg;
> ===> 2.6.8:
> parg = NULL;
> ...

Yes, that change is wrong. It breaks all ioctls which use arg to pass
a integer value directly (i.e. not a pointer to a integer).

The patch below reverses it. Please apply,

Gerd

Index: linux-2.6.8/drivers/media/video/videodev.c
===================================================================
--- linux-2.6.8.orig/drivers/media/video/videodev.c 2004-10-08 11:55:08.000000000 +0200
+++ linux-2.6.8/drivers/media/video/videodev.c 2004-10-08 12:46:12.571630864 +0200
@@ -183,7 +183,7 @@ video_usercopy(struct inode *inode, stru
/* Copy arguments into temp kernel buffer */
switch (_IOC_DIR(cmd)) {
case _IOC_NONE:
- parg = NULL;
+ parg = (void*)arg;
break;
case _IOC_READ:
case _IOC_WRITE:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/