bluetooth: wait for write_work from protocol layer to finish
Simplify the line discipline close function. The write work in line
discipline might be called from three places - namely tty driver, hci
device and protocol. During line discipline close, stop hci device and
protocol layer from submitting new work. Then perform cancel_work_sync.
Further, protocol close will free protocol device but it can referenced
in work handler. Use a lock at line discipline (parent of protocol) to
prevent NULL pointer dereference.
Change-Id: I96137194873627ce9e1c72e5883e7e45cd01842a
Signed-off-by:
Rupesh Tatiya <rtatiya@codeaurora.org>
Loading
Please register or sign in to comment