lkml.org 
[lkml]   [2005]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 4/4] ->compat_ioctl for 390 tape_char
Date
On Freedag 04 November 2005 23:18, Christoph Hellwig wrote:
> The only own ioctl, TAPE390_DISPLAY, is compat_clean, everything else
> is routed through common translation code.
>
>

> +tapechar_compat_ioctl(struct file *filp, unsigned int no, unsigned long data)
> +{
> +       struct tape_device *device = filp->private_data;
> +       int rval = -ENOIOCTLCMD;
> +
> +       if (device->discipline->ioctl_fn) {
> +               lock_kernel();
> +               rval = device->discipline->ioctl_fn(device, no, data);
> +               unlock_kernel();
> +       }
> +
> +       return rval;
> +}

Hmm, isn't ->compat_ioctl called before the translation lookup? If so,
this code would return -EINVAL from tape_34xx_ioctl and result in never
entering the conversion for MTIO* at all.

The same problem seems to be in the other patches of this series, but
I could also be mistaken.

BTW, I now have a set of 25 patches that moves all handlers from
fs/compat_ioctl.c over to the respective drivers and subsystems,
but I'm not sure how to best test that.
I intend to at least give it a test run on my Opteron for the whatever
ioctls I normally use, but the rest is just guesswork. Christoph,
can you review those patches?

Arnd <><
-
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-11-05 00:11    [W:1.949 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site