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).