[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <7d751e65-e695-e23b-9cec-ef3f44289a56@i-love.sakura.ne.jp>
Date: Fri, 18 Jan 2019 20:58:49 +0900
From: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To: Tejun Heo <tj@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: workqueue: Is flush_work() without INIT_WORK() OK?
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.
Powered by blists - more mailing lists