block: pass no-op callback to INIT_WORK().
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Wed, 30 Jan 2019 13:21:45 +0000 (22:21 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2019 05:21:51 +0000 (07:21 +0200)
commit96e4471d3881206054f033b7c272be7cb09f1e4b
tree6ab04f6374e3702bd77e12a7e0f7db46ca8cbf64
parent14f3c36b47ed994b58b033e2d574b520675e6ef8
block: pass no-op callback to INIT_WORK().

[ Upstream commit 2e3c18d0ada16f145087b2687afcad1748c0827c ]

syzbot is hitting flush_work() warning caused by commit 4d43d395fed12463
("workqueue: Try to catch flush_work() without INIT_WORK().") [1].
Although that commit did not expect INIT_WORK(NULL) case, calling
flush_work() without setting a valid callback should be avoided anyway.
Fix this problem by setting a no-op callback instead of NULL.

[1] https://syzkaller.appspot.com/bug?id=e390366bc48bc82a7c668326e0663be3b91cbd29

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-and-tested-by: syzbot <syzbot+ba2a929dcf8e704c180e@syzkaller.appspotmail.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
[sl: rename blk_timeout_work]
Signed-off-by: Sasha Levin <sashal@kernel.org>
block/blk-core.c