mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Add a bunch of cycle_kernel_lock() calls
All of the open() functions which don't need the BKL on their face may still depend on its acquisition to serialize opens against driver initialization. So make those functions acquire then release the BKL to be on the safe side. Signed-off-by: Jonathan Corbet <[email protected]>
This commit is contained in:
parent
0b28067688
commit
f2b9857eee
21 changed files with 45 additions and 55 deletions
|
|
@ -17,6 +17,7 @@
|
|||
#include <linux/poll.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
#include "platform.h"
|
||||
|
|
@ -400,6 +401,7 @@ static unsigned int um_idi_poll(struct file *file, poll_table * wait)
|
|||
|
||||
static int um_idi_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
cycle_kernel_lock();
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include <linux/list.h>
|
||||
#include <linux/poll.h>
|
||||
#include <linux/kmod.h>
|
||||
#include <linux/smp_lock.h>
|
||||
|
||||
#include "platform.h"
|
||||
#undef ID_MASK
|
||||
|
|
@ -580,6 +581,7 @@ xdi_copy_from_user(void *os_handle, void *dst, const void __user *src, int lengt
|
|||
*/
|
||||
static int divas_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
cycle_kernel_lock();
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue