[patch 8/9] compat_ioctl: call disk->fops->compat_ioctl without BKL

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jens Axboe <jens.axboe@...>
Cc: <linux-kernel@...>, <davem@...>, <hch@...>, Al Viro <viro@...>
Date: Saturday, October 6, 2007 - 2:19 pm

Normally, all compat_ioctl operations are called without the BKL, the
block device operations are an exception to this rule.

Make this work the same as the other handlers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
It would be good to find out whether it has been using the BKL
on purpose or by accident, before this patch gets applied.


Index: linux-2.6/block/compat_ioctl.c
===================================================================
--- linux-2.6.orig/block/compat_ioctl.c
+++ linux-2.6/block/compat_ioctl.c
@@ -804,10 +804,10 @@ long compat_blkdev_ioctl(struct file *fi
 
 	lock_kernel();
 	ret = compat_blkdev_locked_ioctl(inode, file, bdev, cmd, arg);
-	/* FIXME: why do we assume -> compat_ioctl needs the BKL? */
+	unlock_kernel();
+
 	if (ret == -ENOIOCTLCMD && disk->fops->compat_ioctl)
 		ret = disk->fops->compat_ioctl(file, cmd, arg);
-	unlock_kernel();
 
 	if (ret != -ENOIOCTLCMD)
 		return ret;

-- 

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 8/9] compat_ioctl: call disk->fops->compat_ioct..., Arnd Bergmann, (Sat Oct 6, 2:19 pm)