Commit c0bed680 authored by Jonathan Corbet's avatar Jonathan Corbet

raw: BKL pushdown

Put explicit lock_kernel() calls into raw_open(), even though the existing
locking looks adequate.
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent b8c71d7a
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/cdev.h> #include <linux/cdev.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -53,6 +54,7 @@ static int raw_open(struct inode *inode, struct file *filp) ...@@ -53,6 +54,7 @@ static int raw_open(struct inode *inode, struct file *filp)
return 0; return 0;
} }
lock_kernel();
mutex_lock(&raw_mutex); mutex_lock(&raw_mutex);
/* /*
...@@ -79,6 +81,7 @@ static int raw_open(struct inode *inode, struct file *filp) ...@@ -79,6 +81,7 @@ static int raw_open(struct inode *inode, struct file *filp)
bdev->bd_inode->i_mapping; bdev->bd_inode->i_mapping;
filp->private_data = bdev; filp->private_data = bdev;
mutex_unlock(&raw_mutex); mutex_unlock(&raw_mutex);
unlock_kernel();
return 0; return 0;
out2: out2:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment