diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2023-11-17 18:22:47 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2023-11-17 14:41:14 -0500 |
commit | 38cfff568169ff9f99784948f79f62ca1af5a187 (patch) | |
tree | 1fa6c1c54e4ba0909a52bfd4ebf39023ab7a950b /tools/net/ynl/generated/devlink-user.c | |
parent | 6fc45b6ed921dc00dfb264dc08c7d67ee63d2656 (diff) |
dm-delay: fix bugs introduced by kthread mode
This commit fixes the following bugs introduced by commit 70bbeb29fab0
("dm delay: for short delays, use kthread instead of timers and wq"):
* the function flush_worker_fn has no exit path - on unload, this
function will just loop and consume 100% CPU without any progress
* the wake-up mechanism in flush_worker_fn is racy - a wake up will be
missed if the process adds entries to the delayed_bios list just
before set_current_state(TASK_INTERRUPTIBLE)
* flush_delayed_bios_fast submits a bio while holding a global mutex;
this may deadlock if we have multiple stacked dm-delay devices and
the underlying device attempts to acquire the mutex too
* if the target constructor fails, it will call delay_dtr. delay_dtr
would attempt to free dc->timer_lock without it being initialized by
the constructor.
* if the target constructor's kthread allocation fails, delay_dtr
would crash trying to dereference dc->worker because it is non-NULL
due to ERR_PTR.
Fixes: 70bbeb29fab0 ("dm delay: for short delays, use kthread instead of timers and wq")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'tools/net/ynl/generated/devlink-user.c')
0 files changed, 0 insertions, 0 deletions