Commit 2db3637b authored by Peter Hurley's avatar Peter Hurley Committed by Srinivas Krovvidi
Browse files

Bluetooth: bnep: Fix deadlock in session deletion



Commit f4d7cd4a introduced the usage of kthread API.
kthread_stop is a blocking function which returns only when
the thread exits. In this case, the thread can't exit because it's
waiting for the write lock, which is being held by bnep_del_connection()
which is waiting for the thread to exit -- deadlock.

Use atomic_t/wake_up_process instead to signal to the thread to exit.

Change-Id: I538cd17c102cb31b3212c794086a9c2baedb4b14
Signed-off-by: default avatarJaikumar Ganesh <jaikumar@google.com>
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
[skrovvid@codeaurora.org: kthread_should_stop api call is avoided]
Signed-off-by: default avatarSrinivas Krovvidi <skrovvid@codeaurora.org>
parent e8992f22
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment