aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-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 @@
19#include <linux/cdev.h> 19#include <linux/cdev.h>
20#include <linux/device.h> 20#include <linux/device.h>
21#include <linux/mutex.h> 21#include <linux/mutex.h>
22#include <linux/smp_lock.h>
22 23
23#include <asm/uaccess.h> 24#include <asm/uaccess.h>
24 25
@@ -53,6 +54,7 @@ static int raw_open(struct inode *inode, struct file *filp)
53 return 0; 54 return 0;
54 } 55 }
55 56
57 lock_kernel();
56 mutex_lock(&raw_mutex); 58 mutex_lock(&raw_mutex);
57 59
58 /* 60 /*
@@ -79,6 +81,7 @@ static int raw_open(struct inode *inode, struct file *filp)
79 bdev->bd_inode->i_mapping; 81 bdev->bd_inode->i_mapping;
80 filp->private_data = bdev; 82 filp->private_data = bdev;
81 mutex_unlock(&raw_mutex); 83 mutex_unlock(&raw_mutex);
84 unlock_kernel();
82 return 0; 85 return 0;
83 86
84out2: 87out2: