diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 13:15:40 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 16:05:55 -0400 |
commit | 8324af6dddac11f9f7e9df8b784f6949ddb61b5d (patch) | |
tree | 037541390197b28dd7a20b58e6846114cfb62604 /drivers/bluetooth | |
parent | 986837badea28a8d32864ced7cbc2fb80b9f7c91 (diff) |
bluetooth-vhci: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/bluetooth')
-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 @@ | |||
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/smp_lock.h> | ||
31 | #include <linux/types.h> | 32 | #include <linux/types.h> |
32 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
33 | #include <linux/sched.h> | 34 | #include <linux/sched.h> |
@@ -263,9 +264,11 @@ static int vhci_open(struct inode *inode, struct file *file) | |||
263 | skb_queue_head_init(&data->readq); | 264 | skb_queue_head_init(&data->readq); |
264 | init_waitqueue_head(&data->read_wait); | 265 | init_waitqueue_head(&data->read_wait); |
265 | 266 | ||
267 | lock_kernel(); | ||
266 | hdev = hci_alloc_dev(); | 268 | hdev = hci_alloc_dev(); |
267 | if (!hdev) { | 269 | if (!hdev) { |
268 | kfree(data); | 270 | kfree(data); |
271 | unlock_kernel(); | ||
269 | return -ENOMEM; | 272 | return -ENOMEM; |
270 | } | 273 | } |
271 | 274 | ||
@@ -286,10 +289,12 @@ static int vhci_open(struct inode *inode, struct file *file) | |||
286 | BT_ERR("Can't register HCI device"); | 289 | BT_ERR("Can't register HCI device"); |
287 | kfree(data); | 290 | kfree(data); |
288 | hci_free_dev(hdev); | 291 | hci_free_dev(hdev); |
292 | unlock_kernel(); | ||
289 | return -EBUSY; | 293 | return -EBUSY; |
290 | } | 294 | } |
291 | 295 | ||
292 | file->private_data = data; | 296 | file->private_data = data; |
297 | unlock_kernel(); | ||
293 | 298 | ||
294 | return nonseekable_open(inode, file); | 299 | return nonseekable_open(inode, file); |
295 | } | 300 | } |