Possible dangling mutex_lock in function (rfcomm_tty_open) in file(linux3.3/net/bluetooth/rfcomm/tty.c)

From: Ahmed Tamrawi <hidden>
Date: 2014-08-20 16:37:38

Bug Report Filed: https://bugzilla.kernel.org/show_bug.cgi?id=82881
Linux Version [3.3]
Configuration: Default configuration for x86

Function Source:
http://lxr.free-electrons.com/source/net/bluetooth/rfcomm/tty.c?v=3.3#L669

In function (rfcomm_tty_open) in file(linux3.3/net/bluetooth/rfcomm/tty.c):

The mutex object locked by (tty_lock) at line 728 can possibly kept
locked after exiting the function when one of the breaks at lines
(715, 719, or 723) is executed. Causing race conditions if multiple
calls to the same functions occurs with the same errors. Or causing
dangling lock to the mutex object held by (tty_lock).

A possible solution is to call (tty_unlock) upon exiting the function.
Possibly before the break points at lines (715, 719, or 723).



Thanks,
Ahmed
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help