netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: chas3@users.sourceforge.net
Cc: linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org
Subject: Re: [Linux-ATM-General] RX/close vcc race with solos/atmtcp/usbatm/he
Date: Tue, 08 Jun 2010 17:25:26 +0100	[thread overview]
Message-ID: <1276014326.22896.3.camel@macbook.infradead.org> (raw)
In-Reply-To: <201006081505.o58F5Pt5006703@thirdoffive.cmf.nrl.navy.mil>

On Tue, 2010-06-08 at 11:05 -0400, Chas Williams (CONTRACTOR) wrote:
> In message <1275943792.17903.5119.camel@macbook.infradead.org>,David Woodhouse 
> writes:
> >On Mon, 2010-06-07 at 12:37 -0400, Chas Williams (CONTRACTOR) wrote:
> >> i dont understand.  if you do a sock_hold() in find_vcc(), and then call
> >> vcc->push() you should be able to call vcc->push() and then sock_put(). 
> >
> >Holding the reference doesn't stop the problem. The problem is
> >
> > vcc_release()
> > --> vcc_destroy_socket()
> >   --> br2684_push(vcc, NULL)
> >         sets vcc->user_back = NULL
> >         (which it what causes the oops when try try to feed it any
> >          subsequent packets).
> >
> > Only _later_ does vcc_release() call sock_put().
> 
> hmm... perhaps this routine needs to take the vcc_sklist_lock because
> it is going to modify the vcc.  or we need to use locking on the vcc
> itself. 

Or move the ->push(vcc, NULL) and anything else which destroys the
state, so that it happens later. Use a real socket destructor function
which will be called from sk_free() after the last sock_put().

> you took a reference to an object inside a hashed list and didnt do
> anything to prevent the object from leaving the hashed list. that is
> stil not correct IMHO.

Yeah yeah, but I fixed that already with the RCU-like approach of
synchronising with the tasklet on dev->ops->close(). So I don't _need_
the reference.

-- 
dwmw2


  reply	other threads:[~2010-06-08 16:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-26 11:16 RX/close vcc race with solos/atmtcp/usbatm/he David Woodhouse
2010-05-26 18:51 ` [Linux-ATM-General] " Stanislaw Gruszka
2010-05-28 10:46 ` David Miller
2010-05-28 13:33   ` David Woodhouse
2010-06-07 10:02 ` David Woodhouse
2010-06-16  0:33   ` Nathan Williams
2010-07-27 23:12   ` Nathan Williams
2010-06-07 13:44 ` [Linux-ATM-General] " Chas Williams (CONTRACTOR)
2010-06-07 14:13   ` David Woodhouse
2010-06-07 15:10     ` Chas Williams (CONTRACTOR)
2010-06-07 16:04       ` David Woodhouse
2010-06-07 16:37         ` Chas Williams (CONTRACTOR)
2010-06-07 20:49           ` David Woodhouse
2010-06-08 15:05             ` Chas Williams (CONTRACTOR)
2010-06-08 16:25               ` David Woodhouse [this message]
2010-08-06 16:17 ` [PATCH] solos-pci: Fix race condition in tasklet RX handling David Woodhouse
2010-08-08  6:02   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1276014326.22896.3.camel@macbook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=chas3@users.sourceforge.net \
    --cc=linux-atm-general@lists.sourceforge.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).