Re: [NET]: Fix possible dev_deactivate race condition

2007-10-19 Thread Herbert Xu
On Fri, Oct 19, 2007 at 09:35:19AM +0200, Peter Zijlstra wrote: > > > /* Wait for outstanding qdisc_run calls. */ > > - while (test_bit(__LINK_STATE_QDISC_RUNNING, &dev->state)) > > - yield(); > > + do { > > + while (test_bit(__LINK_STATE_QDISC_RUNNIN

Re: [NET]: Fix possible dev_deactivate race condition

2007-10-19 Thread Peter Zijlstra
On Fri, 2007-10-19 at 13:36 +0800, Herbert Xu wrote: > On Fri, Oct 19, 2007 at 12:20:25PM +0800, Herbert Xu wrote: > > > > In fact this bug exists elsewhere too. For example, the network > > stack does this in net/sched/sch_generic.c: > > > > /* Wait for outstanding qdisc_run calls. */ >

Re: [NET]: Fix possible dev_deactivate race condition

2007-10-18 Thread David Miller
From: Herbert Xu <[EMAIL PROTECTED]> Date: Fri, 19 Oct 2007 13:36:24 +0800 > [NET]: Fix possible dev_deactivate race condition > > The function dev_deactivate is supposed to only return when > all outstanding transmissions have completed. Unfortunately > it is possible fo

[NET]: Fix possible dev_deactivate race condition

2007-10-18 Thread Herbert Xu
NNING, &dev->state)) > yield(); > > This has the same problem as the current synchronize_irq code. OK here is the fix for that case. [NET]: Fix possible dev_deactivate race condition The function dev_deactivate is supposed to only return when all outstanding transmissi