]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit1bf7f1c641c7c83b9ed9099c5da4e6011e1664e2
treea3651ace429474263bfaac136a44db70d8fdcab8
parent6680c082386abdfa6d04272ec1e839e625a8c187
block: pass no-op callback to INIT_WORK().

BugLink: https://bugs.launchpad.net/bugs/1838459
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
block/blk-core.c