Bluetooth: btmrvl: fix race issue while stopping main thread
authorAmitkumar Karwar <akarwar@marvell.com>
Thu, 1 Jan 2015 08:13:39 +0000 (00:13 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 6 Jan 2015 15:19:35 +0000 (16:19 +0100)
btmrvl_remove_card() calls kthread_stop() to stop the main thread,
but kthread_should_stop() is checked when all the activities are done
in the main thread before sleeping.
We will have kthread_should_stop() check as soon as main thread is
woken up. This fixes a crash issue caused due to an invalid memory
access while unnecessarily processing interrupts after card removal.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btmrvl_main.c

Simple merge