lkml.org 
[lkml]   [2004]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: video_usercopy() enforces change of VideoText IOCTLs since 2.6.8
Gerd Knorr <kraxel@bytesex.org> wrote:
>
> 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;

(the typecast is unneeded)

Seems that with this change we are now sometimes passing a user pointer
into (*func)(). And we're sometimes passing a kernel pointer, yes?

Are all the implementations of (*func)() handling that correctly?

It all looks fishy.
-
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 14:06    [from the cache]
©2003-2011 Jasper Spaans