From: Arnd Bergmann Date: Tue, 20 May 2008 17:15:40 +0000 (+0200) Subject: bluetooth-vhci: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~75 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8324af6dddac11f9f7e9df8b784f6949ddb61b5d;p=linux-2.6-omap-h63xx.git bluetooth-vhci: BKL pushdown Signed-off-by: Arnd Bergmann --- diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index 0638730a4a1..7734bc9af3c 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -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); }