netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: NetDev <netdev@vger.kernel.org>
Subject: Re: deadlock in 2.6.18.2 related to bridging?
Date: Wed, 14 Feb 2007 13:26:08 -0800	[thread overview]
Message-ID: <45D37E70.9090304@candelatech.com> (raw)
In-Reply-To: <20070214131205.1ace04ba@freekitty>

Stephen Hemminger wrote:

> The bug is in r8139too.c driver. It calls flush_scheduled_work
> with RTNL mutex held, so any other work using it will get stuck.

It looks like a fairly common problem, as tg3 has the same issue
(though it seems someone tried to hack around one particular case):

static int tg3_close(struct net_device *dev)
{
         struct tg3 *tp = netdev_priv(dev);

         /* Calling flush_scheduled_work() may deadlock because
          * linkwatch_event() may be on the workqueue and it will try to get
          * the rtnl_lock which we are holding.
          */
         while (tp->tg3_flags & TG3_FLAG_IN_RESET_TASK)
                 msleep(1);

         netif_stop_queue(dev);


e1000 appears clean, at least, but there are a lot of other
drivers that are calling that method (I didn't check to see
if they might be holding rtnl when called.)


Thanks,
Ben




> 
>> Has this been fixed in later releases?
> 
> No but a different race (with device removal) has been fixed.
> 
> 
> 


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


  reply	other threads:[~2007-02-14 21:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-14  1:23 deadlock in 2.6.18.2 related to bridging? Ben Greear
2007-02-14 21:12 ` Stephen Hemminger
2007-02-14 21:26   ` Ben Greear [this message]
2007-02-14 23:37     ` Francois Romieu

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=45D37E70.9090304@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.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).