public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@sig21.net>
To: Arnd Bergmann <arnd@arndb.de>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: missing compat-ioctl for CDROM_DRIVE_STATUS + FDGETPRM
Date: Wed, 29 Jun 2011 17:09:07 +0200	[thread overview]
Message-ID: <20110629150907.GA3412@sig21.net> (raw)
In-Reply-To: <20110629125117.GA5739@sig21.net>

On Wed, Jun 29, 2011 at 02:51:17PM +0200, Johannes Stezenbach wrote:
> On Wed, Jun 29, 2011 at 02:30:42PM +0200, Arnd Bergmann wrote:
> > On Wednesday 29 June 2011, Johannes Stezenbach wrote:
> > > Do I get it right that just adding two IGNORE_IOCTL() to
> > > the ioctl_pointer array in linux/fs/compat_ioctl.c is sufficient,
> > > like in commit 3f001711?
> > 
> > Yes.

Hm, it only works for CDROM_DRIVE_STATUS, but I still get
the warning for FDGETPRM (801c0204).  Could you give
me a hint how to address this?

(tested with both 2.6.39.2 and 3.0-rc5-63-g0d72c6f)

diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index 61abb63..ae24aba 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -68,6 +68,8 @@
 
 #ifdef CONFIG_BLOCK
 #include <linux/loop.h>
+#include <linux/cdrom.h>
+#include <linux/fd.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_ioctl.h>
 #include <scsi/sg.h>
@@ -944,6 +946,9 @@ COMPATIBLE_IOCTL(FIOQSIZE)
 IGNORE_IOCTL(LOOP_CLR_FD)
 /* md calls this on random blockdevs */
 IGNORE_IOCTL(RAID_VERSION)
+/* qemu/qemu-img might calls these two on plain files for probing */
+IGNORE_IOCTL(CDROM_DRIVE_STATUS)
+IGNORE_IOCTL(FDGETPRM)
 /* SG stuff */
 COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
 COMPATIBLE_IOCTL(SG_GET_TIMEOUT)


Thanks,
Johannes

  reply	other threads:[~2011-06-29 15:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17  9:04 missing compat-ioctl for CDROM_DRIVE_STATUS + FDGETPRM Johannes Stezenbach
2011-06-17 13:02 ` Arnd Bergmann
2011-06-29 11:38   ` Johannes Stezenbach
2011-06-29 12:30     ` Arnd Bergmann
2011-06-29 12:51       ` Johannes Stezenbach
2011-06-29 15:09         ` Johannes Stezenbach [this message]
2011-06-29 15:36           ` Arnd Bergmann

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=20110629150907.GA3412@sig21.net \
    --to=js@sig21.net \
    --cc=arnd@arndb.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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