]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix crash in the Marvell driver initialization codepath
authorAnatol Pomozov <anatol.pomozov@gmail.com>
Wed, 30 Jul 2014 22:57:03 +0000 (15:57 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 30 Jul 2014 23:07:28 +0000 (01:07 +0200)
commitd37a156ea4844603575b08943b4d153c03618fc0
tree281f1d7bb7e6562dfe3ffd68d56ff83531dd4507
parent18d7c1ba4d939594631e76f517af0a0d96266ed8
Bluetooth: Fix crash in the Marvell driver initialization codepath

btmrvl_add_card() function calls kthread_run that might return error
(e.g. if current thread is killed). If one tries to use the error
value as a pointer then invalid memory access oops happens.

Check kthread_run() return value, if it is an error then release resources
correctly.

TEST=boot computer with BT modules enabled. I see the error message that
BT device initialization failed. Now kernel does not crash. Hint: to enable
BT run 'rmmod btmrvl_sdio; modprobe btmrvl_sdio'

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btmrvl_main.c