[PATCH 02/12] workqueue: disallow set_cpus_allowed_ptr() from work item

2012-09-26 Thread Lai Jiangshan
workers depend on local-wake-up, if a work function change its CPU, it will corrupt workqueue, disallow this behavior. When set_cpus_allowed_ptr() is called from workqueue.c in worker_thread(), we clear the PF_WQ_WORKER before set_cpus_allowed_ptr() and set it back after. (rescuer thread has no PF

Re: [PATCH 02/12] workqueue: disallow set_cpus_allowed_ptr() from work item

2012-09-26 Thread Tejun Heo
On Thu, Sep 27, 2012 at 01:20:33AM +0800, Lai Jiangshan wrote: > workers depend on local-wake-up, if a work function change its CPU, it will > corrupt workqueue, disallow this behavior. > > When set_cpus_allowed_ptr() is called from workqueue.c in worker_thread(), > we clear the PF_WQ_WORKER befor