All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Francois Romieu <romieu@fr.zoreil.com>,
	netdev@vger.kernel.org, Kyle Lucke <klucke@us.ibm.com>,
	Raghavendra Koushik <raghavendra.koushik@neterion.com>,
	Al Viro <viro@ftp.linux.org.uk>
Subject: Re: [BUG] RTNL and flush_scheduled_work deadlocks
Date: Wed, 14 Feb 2007 13:44:23 -0800	[thread overview]
Message-ID: <45D382B7.9020901@candelatech.com> (raw)
In-Reply-To: <20070214132729.479793ac@freekitty>

Stephen Hemminger wrote:
> Ben found this but the problem seems pretty widespread.
> 
> The following places are subject to deadlock between flush_scheduled_work
> and the RTNL mutex. What can happen is that a work queue routine (like
> bridge port_carrier_check) is waiting forever for RTNL, and the driver
> routine has called flush_scheduled_work with RTNL held and is waiting
> for the work queue to clear.
> 
> Several other places have comments like: "can't call flush_scheduled_work
> here or it will deadlock". Most of the problem places are in device close
> routine. My recommendation would be to add a check for device netif_running in
> what ever work routine is used, and move the flush_scheduled_work to the
> remove routine.

I seem to be able to trigger this within about 1 minute on a
particular 2.6.18.2 system with some 8139too devices, so if someone
has a patch that could be tested, I'll gladly test it.  For
whatever reason, I haven't hit this problem on 2.6.20 yet, but
that could easily be dumb luck, and I haven't been running .20
very much.

To add to the list below, tg3 has this problem as well, as far as I
can tell by looking at the code.

Thanks,
Ben

> 
> 8139too.c: rtl8139_close --> rtl8139_stop_thread
> r8169.c:   rtl8169_down
> cassini.c: cas_change_mtu
> iseries_veth.c: veth_stop_connection
> s2io.c: s2io_close
> sis190.c: sis190_down
> 


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


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

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-14 21:27 [BUG] RTNL and flush_scheduled_work deadlocks Stephen Hemminger
2007-02-14 21:44 ` Ben Greear [this message]
2007-02-14 23:54   ` Francois Romieu
2007-02-15 18:58     ` Ben Greear
2007-02-15 22:37 ` [PATCH 1/4] r8169: RTNL and flush_scheduled_work deadlock Francois Romieu
2007-02-20 16:18   ` Jeff Garzik
2007-02-15 22:37 ` [PATCH 2/4] sis190: " Francois Romieu
2007-02-15 22:37 ` [PATCH 3/4] 8139too: " Francois Romieu
2007-02-16  7:59   ` Jarek Poplawski
2007-02-16 20:20     ` Francois Romieu
2007-02-16 20:36       ` Stephen Hemminger
2007-02-17 20:54         ` Francois Romieu
2007-02-19 12:05       ` Jarek Poplawski
2007-02-19 21:08         ` Francois Romieu
2007-04-04 23:38   ` Ben Greear
2007-04-05 11:17     ` Francois Romieu
2007-02-15 22:37 ` [PATCH 4/4] s2io: " Francois Romieu
2007-02-16  7:29 ` [BUG] RTNL and flush_scheduled_work deadlocks Jarek Poplawski
2007-02-16  7:40   ` Ben Greear
2007-02-16  8:10     ` Jarek Poplawski
2007-02-16  8:23       ` Ben Greear
2007-02-16  9:04         ` Jarek Poplawski
2007-02-16 12:12           ` Jarek Poplawski
2007-02-16 16:06             ` Ben Greear
2007-02-20  8:23               ` Jarek Poplawski
2007-02-16 18:31     ` Stephen Hemminger
2007-02-16 19:04       ` Ben Greear
2007-02-19  6:13         ` [PATCH 1/2] " Jarek Poplawski
2007-02-19  6:27           ` Ben Greear
2007-02-19  7:11             ` Jarek Poplawski
2007-02-19  7:40               ` Jarek Poplawski
2007-03-05  8:36             ` [PATCH v.2] " Jarek Poplawski
2007-02-19  6:55         ` [PATCH 2/2] " Jarek Poplawski
2007-02-19  7:18           ` Jarek Poplawski

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=45D382B7.9020901@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=klucke@us.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=raghavendra.koushik@neterion.com \
    --cc=romieu@fr.zoreil.com \
    --cc=shemminger@linux-foundation.org \
    --cc=viro@ftp.linux.org.uk \
    /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.