[Devel] [PATCH hci-8.1 v6 02/12] dm-ploop: fix lost wakeup in ploop_allocator()
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Tue Oct 13 14:21:09 MSK 2026
> ploop_allocator() checks prealloc_size and kthread_should_stop() before
> setting TASK_INTERRUPTIBLE. If ploop_req_prealloc() sets prealloc_size
> and calls wake_up_process() in between, the wakeup finds the task
> running and is lost, so the allocator goes to sleep with a pending
> preallocation request. Later requests for the same size return early
> without waking it up, so the request may stay pending forever and
> waiters on dispatcher_wq_prealloc hang. The same applies to
> kthread_stop().
>
> Set the task state before checking the conditions, as the canonical
> kthread loop does. set_current_state() implies a full barrier, which
> pairs with the one in try_to_wake_up().
>
> https://virtuozzo.atlassian.net/browse/VSTOR-148171
> Feature: dm-ploop: ploop target driver
>
> Signed-off-by: Alexander Ivanov <alexander.ivanov at virtuozzo.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261013111604.142989-1-alexander.ivanov@virtuozzo.com?part=2
More information about the Devel
mailing list