Skip to content

Conversation

@blktests-ci
Copy link

@blktests-ci blktests-ci bot commented Jan 12, 2026

Pull request for series with
subject: ublk: fix error handling if start_dev pid validation failed
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1040992

@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 12, 2026

Upstream branch: 623fb99
series: https://patchwork.kernel.org/project/linux-block/list/?series=1040992
version: 1

Ming Lei added 2 commits January 14, 2026 06:30
When ublk_ctrl_start_dev() fails after waiting for completion, the
device needs to be properly cancelled to prevent leaving it in an
inconsistent state. Without this, pending I/O commands may remain
uncompleted and the device cannot be cleanly removed.

Add ublk_cancel_dev() call in the error path to ensure proper cleanup
when START_DEV fails.

Cc: <stable@vger.kernel.org>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Fix several issues in kublk:

1. Initialize _evtfd to -1 in struct dev_ctx to prevent garbage output
   in foreground mode. Without this, _evtfd is zero-initialized to 0
   (stdin), and when ublk_send_dev_event() is called on failure, it
   writes binary data to stdin which appears as garbage on the terminal.

2. Move fail label in ublk_start_daemon() to ensure pthread_join() is
   called before queue deinit on the error path. This ensures proper
   thread cleanup when startup fails.

3. Add async parameter to ublk_ctrl_del_dev() and use async deletion
   when the daemon fails to start. This prevents potential hangs when
   deleting a device that failed during startup.

Also fix a debug message format string that was missing __func__ and
had wrong escape character.

Fixes: 6aecda0 ("selftests: ublk: add kernel selftests for ublk")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 13, 2026

Upstream branch: b543459
series: https://patchwork.kernel.org/project/linux-block/list/?series=1040992
version: 1

@blktests-ci blktests-ci bot force-pushed the series/1040992=>linus-master branch from 8f7fed4 to 6c58c0d Compare January 13, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant