Messages in this thread | | | Date | Wed, 8 Oct 2014 08:15:02 -0400 | From | Tejun Heo <> | Subject | Re: [Workqueue] crash in process_one_work |
| |
Hello, Arun.
On Wed, Oct 08, 2014 at 05:30:20PM +0530, Arun KS wrote: > > I sure hope not. How reproducible is the issue? Can you try w/ > > CONFIG_DEBUG_OBJECTS_WORK enabled? > > Thanks for replying. > That was a problem with one of our driver. It was freeing the > memory(struct work) without flushing workqueue. > We caught faulty driver by adding a BUG_ON() in INIT_WORK and looking > at the func pointer in work_struct( which will be pointing to the > faulty driver work function) > > 1) faulty driver queue_work to system_unbownded_wq > 2) free work_struct memory, but it is still queued in the work queue. > 3) another driver request the memory from SLAB, go the same memory, it INIT_WORK > 4) process work try to execute the work queued by the faulty driver, > result in a crash.
Ah, good to hear. I think bugs like the above should be detectable with CONFIG_DEBUG_OBJECTS_WORK, so if you see something similar next time, please try it out.
Thanks.
-- tejun
| |