projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8c71d7
)
raw: BKL pushdown
author
Jonathan Corbet
<corbet@lwn.net>
Fri, 16 May 2008 19:54:46 +0000
(13:54 -0600)
committer
Jonathan Corbet
<corbet@lwn.net>
Fri, 20 Jun 2008 20:05:51 +0000
(14:05 -0600)
Put explicit lock_kernel() calls into raw_open(), even though the existing
locking looks adequate.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
drivers/char/raw.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/char/raw.c
b/drivers/char/raw.c
index bbfa0e241cba38928c8a5b5157a7a2a3ac178d2a..505fcbe884a4aad394ae212396677d258b3d25fb 100644
(file)
--- 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: