Re: 29-rc-mmotm - HID/USB wedge w/ WARNING: at kernel/workqueue.c:371

From: Lai Jiangshan
Date: Tue Mar 17 2009 - 23:28:20 EST


Andrew Morton wrote:
> On Wed, 18 Mar 2009 10:29:40 +0800 Lai Jiangshan <laijs@xxxxxxxxxxxxxx> wrote:
>
>
> static void run_workqueue(struct cpu_workqueue_struct *cwq)
> {
> spin_lock_irq(&cwq->lock);
> cwq->run_depth++;
> if (cwq->run_depth > 3) {
> /* morton gets to eat his hat */
> printk("%s: recursion depth exceeded: %d\n",
> __func__, cwq->run_depth);
> dump_stack();
> }
>
> That was added five or six years ago, and I never ever got to eat my hat.

If Valdis.Kletnieks let lockdep work, he will see the complain
from lockdep at first.

>
>> If it's hard for you avoid flush_scheduled_work() in
>> keventd's work fuction by other fix, you can create
>> another workqueue to handle your works, IMO.
>
> Why do we need to change anything here? No known bugs were fixed, and some
> new ones were added.
>

I prefer the code which has no known bugs and no known potential bugs.

I defend myself:
I did not add a new bug as you said, it's the new code hid_cease_io()
adds a new unsafe usage of workqueue.

Thanks, Lai.






--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/