Re: [PATCH] workqueue: Try to catch flush_work() without INIT_WORK().

2019-01-25 Thread Tejun Heo
On Wed, Jan 23, 2019 at 09:44:12AM +0900, Tetsuo Handa wrote: > Daniel Jordan wrote: > > On Sat, Jan 19, 2019 at 11:41:22AM +0900, Tetsuo Handa wrote: > > > On 2019/01/19 4:48, Daniel Jordan wrote: > > > > On Sat, Jan 19, 2019 at 02:04:58AM +0900, Tetsuo Handa wrote: > > > > __queue_work has a sani

Re: [PATCH] workqueue: Try to catch flush_work() without INIT_WORK().

2019-01-22 Thread Daniel Jordan
On Wed, Jan 23, 2019 at 09:44:12AM +0900, Tetsuo Handa wrote: > Daniel Jordan wrote: > > On Sat, Jan 19, 2019 at 11:41:22AM +0900, Tetsuo Handa wrote: > > > On 2019/01/19 4:48, Daniel Jordan wrote: > > > > On Sat, Jan 19, 2019 at 02:04:58AM +0900, Tetsuo Handa wrote: > > > > __queue_work has a sani

Re: [PATCH] workqueue: Try to catch flush_work() without INIT_WORK().

2019-01-22 Thread Tetsuo Handa
Daniel Jordan wrote: > On Sat, Jan 19, 2019 at 11:41:22AM +0900, Tetsuo Handa wrote: > > On 2019/01/19 4:48, Daniel Jordan wrote: > > > On Sat, Jan 19, 2019 at 02:04:58AM +0900, Tetsuo Handa wrote: > > > __queue_work has a sanity check already for work, but using list_empty. > > > Seems > > > sli

Re: [PATCH] workqueue: Try to catch flush_work() without INIT_WORK().

2019-01-22 Thread Daniel Jordan
On Sat, Jan 19, 2019 at 11:41:22AM +0900, Tetsuo Handa wrote: > On 2019/01/19 4:48, Daniel Jordan wrote: > > On Sat, Jan 19, 2019 at 02:04:58AM +0900, Tetsuo Handa wrote: > > __queue_work has a sanity check already for work, but using list_empty. > > Seems > > slightly better to be consistent? >

Re: [PATCH] workqueue: Try to catch flush_work() without INIT_WORK().

2019-01-18 Thread Tetsuo Handa
On 2019/01/19 4:48, Daniel Jordan wrote: > On Sat, Jan 19, 2019 at 02:04:58AM +0900, Tetsuo Handa wrote: >> syzbot found a flush_work() caller who forgot to call INIT_WORK() >> because that work_struct was allocated by kzalloc(). But the message >> >> INFO: trying to register non-static key. >>

Re: [PATCH] workqueue: Try to catch flush_work() without INIT_WORK().

2019-01-18 Thread Daniel Jordan
On Sat, Jan 19, 2019 at 02:04:58AM +0900, Tetsuo Handa wrote: > syzbot found a flush_work() caller who forgot to call INIT_WORK() > because that work_struct was allocated by kzalloc(). But the message > > INFO: trying to register non-static key. > the code is fine but needs lockdep annotation.

[PATCH] workqueue: Try to catch flush_work() without INIT_WORK().

2019-01-18 Thread Tetsuo Handa
syzbot found a flush_work() caller who forgot to call INIT_WORK() because that work_struct was allocated by kzalloc(). But the message INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. by lock_map_acquire()