mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Campbell <icampbell@arcom.com>
To: Nicolas Pitre <nico@cam.org>
Cc: linux-kernel@vger.kernel.org
Subject: "deadlock" between smc91x driver and link_watch
Date: Tue, 23 Nov 2004 17:16:34 +0000	[thread overview]
Message-ID: <1101230194.14370.12.camel@icampbell-debian> (raw)

Hi,

I'm seeing a deadlock in linkwatch_event() when bringing down an
Ethernet interface using the smc91x driver (drivers/net/smc91x.c).

What I am seeing is that smc_close() is calling netif_carrier_off which
has the call chain:
	netif_carrier_off
	-> linkwatch_fire_event
	   -> schedule_work or schedule_delayed_work
The function that is scheduled is linkwatch_event().

smc_close() then goes on to call flush_scheduled_work() in order to
ensure that it's own pending workqueue stuff (smc_phy_configure()) is
completed before powering down the PHY.

What I am seeing is that linkwatch_event() is deadlocking trying take
rtnl_sem via rtnl_shlock(). The lock appears to already be held by a
call to rtnl_lock() from devinet_ioctl().

Any ideas? Perhaps smc_phy_configure calls could just check that the
interface is up before continuing, then there would be no need to flush
the queue to get rid of it.

Ian.

-- 
Ian Campbell, Senior Design Engineer
                                        Web: http://www.arcom.com
Arcom, Clifton Road,                    Direct: +44 (0)1223 403 465
Cambridge CB1 7EA, United Kingdom       Phone:  +44 (0)1223 411 200


             reply	other threads:[~2004-11-23 17:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-23 17:16 Ian Campbell [this message]
2004-11-23 23:31 ` Andrew Morton
2004-11-24  9:41   ` Ian Campbell
2004-11-24  9:46     ` Andrew Morton
2004-11-24  9:58       ` Ian Campbell
2004-11-24 15:21         ` Nicolas Pitre
2004-11-24 15:52           ` Ian Campbell
2004-11-24 16:57             ` Nicolas Pitre
2004-11-24 17:13               ` Ian Campbell
2004-11-25  9:59               ` Ian Campbell
2004-11-25 16:31                 ` Nicolas Pitre

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=1101230194.14370.12.camel@icampbell-debian \
    --to=icampbell@arcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico@cam.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

all inboxes | Powered by JetHome®