[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-netdev
Subject:    Re: Deadlock in sungem/ip_auto_config/linkwatch
From:       Stefan Rompf <srompf () isg ! de>
Date:       2004-01-05 16:50:55
Message-ID: 200401051750.56233.srompf () isg ! de
[Download RAW message or body]


Am Montag, 05. Januar 2004 17:19 schrieb Michal Ostrowski:

> Suppose the linkwatch code backs-off in the case that rtnl_sem is held
> legitimately by thread A.  Meanwhile, thread B is doing a
> flush_scheduled_work in order to wait for pending linkwatch events to
> complete.

This won't happen. If a pending linkwatch event needs to be scheduled 
synchronously (f.e. when a device is unregistered), it is executed in context 
of the calling process, not inside the workqueue thread.

> My initial though was to use a seperate work-queue, un-entangled with
> the global queue used for flush_scheduled_work. This would allow
> linkwatch events to be synchronized against explicitly.

That's overkill, and if I understand flush_workqueue() right, it doesn't care 
about work that is queued with delay, so it even wouldn't help. That's why I 
thought about a function to unregister pending work.

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

["smime.p7s" (application/pkcs7-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic