]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 13 Nov 2014 18:01:57 +0000 (19:01 +0100)
commitbf0736629bf30132d5429c118e4b6e5a856ddd0a
treea528dca6c75f240b3c30ffc7a24816362587fb70
parent7a121aac1bebe3ba625142e0227c973d5d589b11
Bluetooth: Fix crash in the Marvell driver initialization codepath

commit 8500d791c458ccbbb3e2d3fa9a0320ffd5729069 upstream.

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/bluetooth/btmrvl_main.c