Re: workqueue: Is flush_work() without INIT_WORK() OK?

2019-01-18 Thread Tejun Heo
Hello, Tetsuo. On Fri, Jan 18, 2019 at 08:58:49PM +0900, Tetsuo Handa wrote: > struct work_struct work; > memset(, 0, sizeof(work)); > flush_work(); > > . Is this behavior defined as "safe and no-op"? If this should be "safe and > no-op", Nope, that's a bug. > we need to

workqueue: Is flush_work() without INIT_WORK() OK?

2019-01-18 Thread Tetsuo Handa
Hello, Tejun. syzbot is reporting "INFO: trying to register non-static key in __flush_work" at https://syzkaller.appspot.com/bug?id=a5954455fcfa51c29ca2ab55b203076337e1c770 , and I think that the caller is passing a work_struct allocated by kzalloc() to flush_work(). But I can't judge which