mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* workqueue: Is flush_work() without INIT_WORK() OK?
@ 2019-01-18 11:58 Tetsuo Handa
  2019-01-18 14:05 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Tetsuo Handa @ 2019-01-18 11:58 UTC (permalink / raw)
  To: Tejun Heo; +Cc: LKML

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 problem (the caller side or the WQ side) without knowing
the behavior of

	struct work_struct work;
	memset(&work, 0, sizeof(work));
	flush_work(&work);

. Is this behavior defined as "safe and no-op"? If this should be "safe and no-op",
we need to check whether INIT_WORK() was called before starting lockdep checks
at __flush_work(). If this is not "safe and no-op", I want to emit a warning if
INIT_WORK() was not called.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-18 14:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-18 11:58 workqueue: Is flush_work() without INIT_WORK() OK? Tetsuo Handa
2019-01-18 14:05 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®