Michael Buesch <[EMAIL PROTECTED]> wrote:
> cancel_rearming_delayed_work{queue} is broken, because it is
> possible to enter an infinite loop if:
> We call the function on a work that is currently not executing or pending.
Why are you calling it on a work that was never scheduled? Sounds like
a bug to me.
> void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq,
> struct work_struct *work)
> {
> - while (!cancel_delayed_work(work))
> + do {
> + cancel_delayed_work(work);
> flush_workqueue(wq);
> + } while (test_bit(0, &work->pending));
This is broken. If the work just starts running before your test_bit
you'd exit without cancelling it properly.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html