Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Aug 2006 00:42:58 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
Cc:        FreeBSD_Bluetooth <freebsd-bluetooth@freebsd.org>
Subject:   Re: [HEADSUP] bluetooth sockets layer in 7-current is broken
Message-ID:  <20060805003953.B45647@fledge.watson.org>
In-Reply-To: <44D3DA58.5080506@savvis.net>
References:  <44D3DA58.5080506@savvis.net>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060805003953.B45647>