Skip to content
Commit 37d204e0 authored by Johan Hedberg's avatar Johan Hedberg
Browse files

Bluetooth: Fix giving back pkts semaphore when disconnecting



The TX fiber might be blocked waiting for the num_pkts semaphore when
a disconnection occurs. If we only give back the semaphore once
exiting the while-loop we may end up in a deadlock. Giving back the
semaphore in the connection disconnect handler solves this.

An additional fix this patch does is to ensure that we don't perform
integer underflow because of the last iteration.

Change-Id: Ia67dc506885d0c2bad25c598ea349f1fd251218b
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent c31fcf4e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment