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:
Jonathan Corbet 2008-05-18 15:32:43 -06:00
commit f2b9857eee
21 changed files with 45 additions and 55 deletions

View file

@ -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);
}

View file

@ -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);
}