Thread (17 messages) 17 messages, 5 authors, 2010-08-08

Re: [Linux-ATM-General] RX/close vcc race with solos/atmtcp/usbatm/he

From: David Woodhouse <dwmw2@infradead.org>
Date: 2010-06-07 16:04:10

On Mon, 2010-06-07 at 11:10 -0400, Chas Williams (CONTRACTOR) wrote:
In message [ref],David Woodhouse 
writes:
quoted
On Mon, 2010-06-07 at 09:44 -0400, Chas Williams (CONTRACTOR) wrote:
quoted
vcc's are really sockets, so you could just increase the refcount --
sock_hold().
There are rules about where we're allowed to call sock_hold(), and I
don't think our find_vcc() functions can be made to meet them.
if you are using find_vcc() then you should already have a lock on the
hash table for the vccs.  you can safely increment the ref count at
this point.
You can still hit the oops that way -- br2684_push() is setting
vcc->user_back to NULL before the final sock_put() anyway, and that's
what was causing the oops.
quoted
In that case I think we might as well stick with the RCU-like solution I
already implemented in the vcc close function -- which is just to wait
for the tasklet to complete, thus ensuring that it's no longer using the
defunct vcc.
the driver shouldnt close the vcc while the tasklet is running and
using the vcc in question.  i guess the safest thing is to simply
do as you are doing and not close while running the tasklet.
OK. :)

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help