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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

---
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;

-- 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux