[HEADSUP] bluetooth sockets layer in 7-current is broken

Robert Watson rwatson at FreeBSD.org
Fri Aug 4 23:43:01 UTC 2006


On Fri, 4 Aug 2006, Maksim Yevmenkin wrote:

> it has come to my attention that bluetooth sockets layer in 7-current is 
> broken. there are few lor's and panics.
>
> this was caused by me not paying closer attention to Robert Watson's ongoing 
> socket work.
>
> i will try to fix the code as soon as possible (but no specific date is 
> given :)
>
> in the mean time, stick with 6-stable if you are using bluetooth.

Sorry about that -- I'm unable to test bluetooth locally, but I'm happy to 
help debugging in any way I can.  The most recent set of changes, possibly the 
ones that have triggered the problem, was to change things from pru_abort and 
pru_detach being for abort and close, respectively, with both freeing protocol 
state, to pru_abort and pru_close notifying of connection tear-down, and 
pru_detach freeing protocol state once both the socket and protocol layers are 
done with the socket.  Until yesterday, there was a change in place so that 
calls to notify the socket layer of events in pru_detach, such as 
soisdisconnected(), resulted in a panic as the kqueue state had already been 
torn down.  Really, soisdisconnected() should be called prior to pru_detach 
being invoked.  However, since a number of protocols still call 
soisdisconnected() in pru_detach, I've changed the order of events in sofree() 
so that this is still permitted, as I find myself slightly undecided on 
exactly if/when various protocols should do the fairly socket notification. 
So if there were lock order reversals and panics due to soisdisconnected(), 
those are most likely now fixed, FYI.

Robert N M Watson
Computer Laboratory
University of Cambridge


More information about the freebsd-bluetooth mailing list