netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: mchan@broadcom.com
Cc: mcarlson@broadcom.com, netdev@vger.kernel.org, gaagaan@gmail.com
Subject: Re: [1/5][TG3]: Fix irq_sync race condition.
Date: Wed, 11 Jul 2007 19:47:29 -0700 (PDT)	[thread overview]
Message-ID: <20070711.194729.51420145.davem@davemloft.net> (raw)
In-Reply-To: <1184196705.5211.8.camel@dell>

From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 11 Jul 2007 16:31:45 -0700

> [TG3]: Fix irq_sync race condition.
> 
> Gagan Arneja <gaagaan@gmail.com> pointed out that tg3_reset_task()
> could potentially race with another thread calling tg3_full_lock()
> such as the ethtool_set_xxx() functions.  This may trigger the
> BUG_ON() in tg3_irq_quiesce() or cause the irq_sync flag to be out-
> of-sync.
> 
> I think the easiest way to fix this is to get the tp->lock first
> before setting the irq_sync flag.  This is safe to do because the
> tp->lock is never grabbed by the irq handler.  This change will
> guarantee that the irq_sync flag updates will be serialized.  We also
> have to change one spot to call tg3_netif_start() (which clears the
> irq_sync flag) before releasing the tp->lock.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied, thanks Michael.

      reply	other threads:[~2007-07-12  2:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-11 23:31 [1/5][TG3]: Fix irq_sync race condition Michael Chan
2007-07-12  2:47 ` David Miller [this message]

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=20070711.194729.51420145.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=gaagaan@gmail.com \
    --cc=mcarlson@broadcom.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 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).