Messages in this thread | | | Date | Wed, 29 Jun 2011 10:43:29 +0200 | From | Tejun Heo <> | Subject | Re: workqueue question. |
| |
Hello,
On Tue, Jun 28, 2011 at 11:56:39AM -0700, Ben Greear wrote: > Is it OK to call INIT_WORK(&foo, bar) > if we are currently being called by the work-queue > using foo?
Yes, but if flush_work*() races with it, flushing can finish before execution is complete.
> Also, is it valid to free the memory containing foo > in a workqueue callback?
Yeap.
-- tejun
| |