Skip to content
Commit 2673b4cf authored by Rabin Vincent's avatar Rabin Vincent Committed by Wu Fengguang
Browse files

backing-dev: fix wakeup timer races with bdi_unregister()



While 7a401a97 ("backing-dev: ensure wakeup_timer is deleted")
addressed the problem of the bdi being freed with a queued wakeup
timer, there are other races that could happen if the wakeup timer
expires after/during bdi_unregister(), before bdi_destroy() is called.

wakeup_timer_fn() could attempt to wakeup a task which has already has
been freed, or could access a NULL bdi->dev via the wake_forker_thread
tracepoint.

Cc: <stable@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Reported-by: default avatarChanho Min <chanho.min@lge.com>
Reviewed-by: default avatarNamjae Jeon <linkinjeon@gmail.com>
Signed-off-by: default avatarRabin Vincent <rabin@rab.in>
Signed-off-by: default avatarWu Fengguang <fengguang.wu@intel.com>
parent 62aa2b53
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment