From: Arnd Bergmann <arnd@arndb.de>
To: Christoph Hellwig <hch@lst.de>
Cc: akpm@osdl.org, schwidefsky@de.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] ->compat_ioctl for 390 tape_char
Date: Sat, 5 Nov 2005 00:10:46 +0100 [thread overview]
Message-ID: <200511050010.47138.arnd@arndb.de> (raw)
In-Reply-To: <20051104221816.GD9384@lst.de>
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 <><
next prev parent reply other threads:[~2005-11-04 23:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-04 22:18 [PATCH 4/4] ->compat_ioctl for 390 tape_char Christoph Hellwig
2005-11-04 23:10 ` Arnd Bergmann [this message]
2005-11-04 23:51 ` Christoph Hellwig
2005-11-05 1:16 ` Arnd Bergmann
2005-11-07 4:01 ` Christoph Hellwig
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=200511050010.47138.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=akpm@osdl.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
/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