|
RE: Rfcomm Use Count: msg#00099linux.bluez.devel
Hi Marcel, > try to test your normal stuff to make sure that it doesn't break > anything else. So far so good. I'm setting up some automated testers to pound on it for a while. > > Does this change make the "if (sk->state == BT_CLOSED)" statement in > > bluez_accept_dequeue() redundant? > > I think so. Haven't thought about it so far. > > > This is important because if somehow a socket is in > BT_CLOSED state and is > > in the accept queue during shutdown, then > rfcomm_cleanup_listen() can't > > clean it up (because bluez_accept_dequeue() won't return > it). I think your > > changes make it impossible for there to ever be an rfcomm > socket (or l2cap > > socket) in the BT_CLOSED state in the accept queue. If > that's true, then > > this isn't an issue. Thoughts? > > Sorry, but I can't follow your point here. Please explain it again. Bluez_accept_dequeue() won't return a socket if it is in the closed state. So rfcomm_cleanup_listen() will never call close and kill on the socket because ...accept_dequeue() never returns it (it just unlinks it). And then we would have the use count problem. But if there is no possibility of a socket being in the closed state on the accept queue (for rfcomm at least), then this isn't an issue. I think this is fixed - so if I'm still talking nonsense, just ignore it. ;) > > Do you think we've covered the case where there are > incomming connections > > while things are at various stages of being shut down? I > think we're ok, but > > I wanted to bring it up. > > Actually I don't know. In general we should be protected against that > with our locking. As far as I could see the locking protects against it. But I did not spend enough time on it to fully understand how it works. If there is a problem, my testing should eventually uncover it. -Daryl. ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [2.6.8 ->] Problems, hci_usb dosn't work.: 00099, Ian Kumlien |
|---|---|
| Next by Date: | Re: [2.6.8 ->] Problems, hci_usb dosn't work.: 00099, Ian Kumlien |
| Previous by Thread: | RE: Rfcomm Use Counti: 00099, Marcel Holtmann |
| Next by Thread: | RE: Rfcomm Use Count: 00099, Marcel Holtmann |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |