summaryrefslogtreecommitdiffstats
path: root/drivers/char/raw.c
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-16 21:54:46 +0200
committerJonathan Corbet <corbet@lwn.net>2008-06-20 22:05:51 +0200
commitc0bed680f0ca603864375ed5f9fed4296a53aa62 (patch)
treed6421cd2f369309f0f9693083f3d3540e160e196 /drivers/char/raw.c
parenttlckl: BKL pushdown (diff)
downloadlinux-c0bed680f0ca603864375ed5f9fed4296a53aa62.tar.xz
linux-c0bed680f0ca603864375ed5f9fed4296a53aa62.zip
raw: BKL pushdown
Put explicit lock_kernel() calls into raw_open(), even though the existing locking looks adequate. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/char/raw.c')
-rw-r--r--drivers/char/raw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/raw.c b/drivers/char/raw.c
index bbfa0e241cba..505fcbe884a4 100644
--- a/drivers/char/raw.c
+++ b/drivers/char/raw.c
@@ -19,6 +19,7 @@
#include <linux/cdev.h>
#include <linux/device.h>
#include <linux/mutex.h>
+#include <linux/smp_lock.h>
#include <asm/uaccess.h>
@@ -53,6 +54,7 @@ static int raw_open(struct inode *inode, struct file *filp)
return 0;
}
+ lock_kernel();
mutex_lock(&raw_mutex);
/*
@@ -79,6 +81,7 @@ static int raw_open(struct inode *inode, struct file *filp)
bdev->bd_inode->i_mapping;
filp->private_data = bdev;
mutex_unlock(&raw_mutex);
+ unlock_kernel();
return 0;
out2: