All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Gagan Arneja <gaagaan@gmail.com>
Cc: Michael Chan <mchan@broadcom.com>, netdev@vger.kernel.org
Subject: Re: tg3 reset_task question
Date: Wed, 4 Apr 2007 15:10:07 -0700	[thread overview]
Message-ID: <20070404151007.2648621f@localhost> (raw)
In-Reply-To: <4614105B.4080105@gmail.com>

On Wed, 04 Apr 2007 13:53:47 -0700
Gagan Arneja <gaagaan@gmail.com> wrote:

> I like the counting semaphore idea.
> 
> --
> Gagan
> 
> Michael Chan wrote:
> > On Wed, 2007-04-04 at 13:34 -0700, Gagan Arneja wrote:
> >> Can't this BUG_ON be hit very easily:
> >>
> >> static void tg3_irq_quiesce(struct tg3 *tp)
> >> {
> >>         BUG_ON(tp->irq_sync);
> >> ...
> >> }
> >>
> >> tg3_reset_task could easily be racing with another thread, that calls
> >> tg3_full_lock(tp, 1); e.g tg3_change_mtu. Maybe I'm missing something
> >> obvious.
> >>
> > 
> > Yes, you're right.  Perhaps we should get the rtnl first before
> > tg3_full_lock(), or turn irq_sync into an atomic counter that allows
> > nesting.

When you start reinventing windows locks or the BKL, you know
you are going down the wrong path

  reply	other threads:[~2007-04-04 22:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-04 20:34 tg3 reset_task question Gagan Arneja
2007-04-04 21:37 ` Michael Chan
2007-04-04 20:53   ` Gagan Arneja
2007-04-04 22:10     ` Stephen Hemminger [this message]
2007-04-05 11:58       ` Herbert Xu

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=20070404151007.2648621f@localhost \
    --to=shemminger@linux-foundation.org \
    --cc=gaagaan@gmail.com \
    --cc=mchan@broadcom.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.