mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Gerd Knorr <kraxel@bytesex.org>
Cc: linux@MichaelGeng.de, linux-kernel@vger.kernel.org,
	"viro@parcelfarce.linux.theplanet.co.uk" 
	<viro@parcelfarce.linux.theplanet.co.uk>
Subject: Re: video_usercopy() enforces change of VideoText IOCTLs since 2.6.8
Date: Fri, 8 Oct 2004 14:00:56 -0700	[thread overview]
Message-ID: <20041008140056.72b177d9.akpm@osdl.org> (raw)
In-Reply-To: <20041008105219.GA24842@bytesex>

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.

  reply	other threads:[~2004-10-08 20:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-07 16:54 Michael Geng
2004-10-08 10:52 ` Gerd Knorr
2004-10-08 21:00   ` Andrew Morton [this message]
2004-10-09  9:28     ` Gerd Knorr
2004-10-09 11:28       ` Michael Geng
2004-10-09 12:18         ` Gerd Knorr
2004-10-10  8:55           ` Michael Geng
2004-10-11 15:14             ` Gerd Knorr
2004-10-11 16:21               ` Michael Geng
2004-10-13 11:00                 ` Alan Cox
2004-10-13 14:42                   ` Michael Geng

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=20041008140056.72b177d9.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=kraxel@bytesex.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@MichaelGeng.de \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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

Powered by JetHome