netdev
[Top] [All Lists]

Re: Deadlock in sungem/ip_auto_config/linkwatch

To: Michal Ostrowski <mostrows@xxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
Subject: Re: Deadlock in sungem/ip_auto_config/linkwatch
From: Stefan Rompf <srompf@xxxxxx>
Date: Mon, 5 Jan 2004 15:50:50 +0100
In-reply-to: <1073307882.2041.98320.camel@xxxxxxxxxxxxxxxxxxxx>
References: <1073307882.2041.98320.camel@xxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: KMail/1.5.94
Am Montag, 05. Januar 2004 14:07 schrieb Michal Ostrowski:

> ic_open_devs grabs rtnl_sem with an rtnl_shlock() call.
>
> The sungem driver at some point calls gem_init_one, which calls
> netif_carrier_*, which in turn calls schedule_work (linkwatch_event).
>
> linkwatch_event in turn needs rtnl_sem.

Good catch! The sungem driver shows clearly that we need some way to remove 
queued work without scheduling and waiting for other events.

I will change the linkwatch code to use rtnl_shlock_nowait() and backoff and 
retry in case of failure this week. Call it a workaround, but it increases 
overall system stability.

Btw, what is the planned difference between rtnl_shlock() and rtnl_exlock()? 
Even though the later is a null operation right now, I don't want to hold 
more locks than needed in the linkwatch code.

Stefan

-- 
"doesn't work" is not a magic word to explain everything.

<Prev in Thread] Current Thread [Next in Thread>