diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 19:15:40 +0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 14:05:55 -0600 |
commit | 8324af6dddac11f9f7e9df8b784f6949ddb61b5d (patch) | |
tree | 037541390197b28dd7a20b58e6846114cfb62604 | |
parent | 986837badea28a8d32864ced7cbc2fb80b9f7c91 (diff) |
bluetooth-vhci: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | drivers/bluetooth/hci_vhci.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index 0638730a4a19..7734bc9af3ca 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c @@ -28,6 +28,7 @@ #include <linux/kernel.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/smp_lock.h> #include <linux/types.h> #include <linux/errno.h> #include <linux/sched.h> @@ -263,9 +264,11 @@ static int vhci_open(struct inode *inode, struct file *file) skb_queue_head_init(&data->readq); init_waitqueue_head(&data->read_wait); + lock_kernel(); hdev = hci_alloc_dev(); if (!hdev) { kfree(data); + unlock_kernel(); return -ENOMEM; } @@ -286,10 +289,12 @@ static int vhci_open(struct inode *inode, struct file *file) BT_ERR("Can't register HCI device"); kfree(data); hci_free_dev(hdev); + unlock_kernel(); return -EBUSY; } file->private_data = data; + unlock_kernel(); return nonseekable_open(inode, file); } |