public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the bkl-ioctl tree with my fixes tree
@ 2010-04-27  5:06 Stephen Rothwell
  2010-04-27  9:02 ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2010-04-27  5:06 UTC (permalink / raw)
  To: "Frédéric Weisbecker"
  Cc: linux-next, linux-kernel, Arnd Bergmann, Linus Torvalds

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

Hi Frédéric,

Today's linux-next merge of the bkl-ioctl tree got a aconflics in
drivers/block/pktcdvd.c between commit
30d32c9015af1fa56795c5ba8d7d6635d6bef8bf ("pktcdvd: improve BKL and
compat_ioctl.c usage") from my fixes tree and commit
1dd97d3d546aa14db7efa5366b21d1336b91379e ("Rename 'struct
file_operations' 'ioctl' fn pointer to 'bkl_ioctl'") from the bkl-ioctl
tree.

I used the version from my fixes tree for today.

Arnd, are you going to submit this change to Linus sometime soon, or
should I drop it?
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the bkl-ioctl tree with my fixes tree
  2010-04-27  5:06 linux-next: manual merge of the bkl-ioctl tree with my fixes tree Stephen Rothwell
@ 2010-04-27  9:02 ` Arnd Bergmann
  2010-04-28  6:22   ` Stephen Rothwell
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2010-04-27  9:02 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Frédéric Weisbecker, linux-next, linux-kernel,
	Linus Torvalds

On Tuesday 27 April 2010, Stephen Rothwell wrote:
> Today's linux-next merge of the bkl-ioctl tree got a aconflics in
> drivers/block/pktcdvd.c between commit
> 30d32c9015af1fa56795c5ba8d7d6635d6bef8bf ("pktcdvd: improve BKL and
> compat_ioctl.c usage") from my fixes tree and commit
> 1dd97d3d546aa14db7efa5366b21d1336b91379e ("Rename 'struct
> file_operations' 'ioctl' fn pointer to 'bkl_ioctl'") from the bkl-ioctl
> tree.
> 
> I used the version from my fixes tree for today.
> 
> Arnd, are you going to submit this change to Linus sometime soon, or
> should I drop it?

It's not clear yet how we do it. Ideally "pktcdvd: improve BKL and
compat_ioctl.c usage" should find its way into -rc1 in some way, but
we need to reshuffle the BKL removal trees to make that go in nicely.

Where is your fixes tree? Maybe Frederic can take all BKL related
patches from that into one of his trees.

	Arnd

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the bkl-ioctl tree with my fixes tree
  2010-04-27  9:02 ` Arnd Bergmann
@ 2010-04-28  6:22   ` Stephen Rothwell
  2010-04-28 12:36     ` [PATCH] pktcdvd: improve BKL and compat_ioctl.c usage Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2010-04-28  6:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: "Frédéric Weisbecker", linux-next, linux-kernel,
	Linus Torvalds

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

Hi Arndt,

On Tue, 27 Apr 2010 11:02:35 +0200 Arnd Bergmann <arnd@arndb.de> wrote:
>
> It's not clear yet how we do it. Ideally "pktcdvd: improve BKL and
> compat_ioctl.c usage" should find its way into -rc1 in some way, but
> we need to reshuffle the BKL removal trees to make that go in nicely.
> 
> Where is your fixes tree? Maybe Frederic can take all BKL related
> patches from that into one of his trees.

My fixes tree is here: ssh://master.kernel.org/~sfr/next-fixes.git it
currently only contains your pktcdvd patch.  My understanding was that
this patch was a fix for a build problem with Linus' tree.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] pktcdvd: improve BKL and compat_ioctl.c usage
  2010-04-28  6:22   ` Stephen Rothwell
@ 2010-04-28 12:36     ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2010-04-28 12:36 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Frédéric Weisbecker, linux-next, linux-kernel,
	Linus Torvalds, Randy Dunlap, Jens Axboe, Peter Osterlund,
	Akinobu Mita, Ingo Molnar

The pktcdvd driver uses proper locking and does not need the
BKL in the ioctl and llseek functions of the character device,
so kill both. Moving the compat_ioctl handling from common code
into the driver itself fixes build problems when CONFIG_BLOCK is
disabled.

Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
On Wednesday 28 April 2010, Stephen Rothwell wrote:
 
> My fixes tree is here: ssh://master.kernel.org/~sfr/next-fixes.git it
> currently only contains your pktcdvd patch.  My understanding was that
> this patch was a fix for a build problem with Linus' tree.

Ah, I had forgotten that this was still needed and Jens or Peter
obviously never picked it up.

Linus, could you merge this now to fix building with CONFIG_BLOCK
disabled? It's fallout of a patch c5ecc484c "pktcdvd: use BIO list
management functions", but I fixed it because the problem appeared
in compat_ioctl handling. It now came up because the patch conflicted
with the BKL pushdown, which the original patch does as a side-effect.

	Arnd

diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index ddf1942..8a549db 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -48,6 +48,7 @@
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
+#include <linux/compat.h>
 #include <linux/kthread.h>
 #include <linux/errno.h>
 #include <linux/spinlock.h>
@@ -2984,7 +2985,7 @@ static void pkt_get_status(struct pkt_ctrl_command *ctrl_cmd)
 	mutex_unlock(&ctl_mutex);
 }
 
-static int pkt_ctl_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+static long pkt_ctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
 	void __user *argp = (void __user *)arg;
 	struct pkt_ctrl_command ctrl_cmd;
@@ -3021,10 +3022,20 @@ static int pkt_ctl_ioctl(struct inode *inode, struct file *file, unsigned int cm
 	return ret;
 }
 
+#ifdef CONFIG_COMPAT
+static long pkt_ctl_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+{
+	return pkt_ctl_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
+}
+#endif
 
 static const struct file_operations pkt_ctl_fops = {
-	.ioctl	 = pkt_ctl_ioctl,
-	.owner	 = THIS_MODULE,
+	.open		= nonseekable_open,
+	.unlocked_ioctl	= pkt_ctl_ioctl,
+#ifdef CONFIG_COMPAT
+	.compat_ioctl	= pkt_ctl_compat_ioctl,
+#endif
+	.owner		= THIS_MODULE,
 };
 
 static struct miscdevice pkt_misc = {
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index c32a1b6..641640d 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -102,7 +102,6 @@
 #include <linux/nbd.h>
 #include <linux/random.h>
 #include <linux/filter.h>
-#include <linux/pktcdvd.h>
 
 #include <linux/hiddev.h>
 
@@ -1126,8 +1125,6 @@ COMPATIBLE_IOCTL(PPGETMODE)
 COMPATIBLE_IOCTL(PPGETPHASE)
 COMPATIBLE_IOCTL(PPGETFLAGS)
 COMPATIBLE_IOCTL(PPSETFLAGS)
-/* pktcdvd */
-COMPATIBLE_IOCTL(PACKET_CTRL_CMD)
 /* Big A */
 /* sparc only */
 /* Big Q for sound/OSS */

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-28 12:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-27  5:06 linux-next: manual merge of the bkl-ioctl tree with my fixes tree Stephen Rothwell
2010-04-27  9:02 ` Arnd Bergmann
2010-04-28  6:22   ` Stephen Rothwell
2010-04-28 12:36     ` [PATCH] pktcdvd: improve BKL and compat_ioctl.c usage Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox