Skip to content

ublk: reject FETCH from non-userspace context#787

Open
blktests-ci[bot] wants to merge 1 commit intolinus-master_basefrom
series/1088461=>linus-master
Open

ublk: reject FETCH from non-userspace context#787
blktests-ci[bot] wants to merge 1 commit intolinus-master_basefrom
series/1088461=>linus-master

Conversation

@blktests-ci
Copy link
Copy Markdown

@blktests-ci blktests-ci Bot commented May 1, 2026

Pull request for series with
subject: ublk: reject FETCH from non-userspace context
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1088461

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 1, 2026

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

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 3, 2026

Upstream branch: 66edb90
series: https://patchwork.kernel.org/project/linux-block/list/?series=1088461
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1088461=>linus-master branch from 58dfbc2 to 8e0d980 Compare May 3, 2026 02:16
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 25a041f to 6f75bd1 Compare May 4, 2026 10:57
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 4, 2026

Upstream branch: 6d35786
series: https://patchwork.kernel.org/project/linux-block/list/?series=1088461
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1088461=>linus-master branch from 8e0d980 to 3603bc2 Compare May 4, 2026 11:07
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 6f75bd1 to 1f0d33a Compare May 5, 2026 15:39
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 5, 2026

Upstream branch: 6d35786
series: https://patchwork.kernel.org/project/linux-block/list/?series=1088461
version: 1

__ublk_fetch() sets io->task to current, which is later checked
against io_uring_cmd_get_task() in ublk_uring_cmd_cancel_fn().
With REQ_F_FORCE_ASYNC, the FETCH uring_cmd can be issued from
task work, which can be run from io_uring's fallback workqueue,
causing a task mismatch and triggering the WARN in cancel_fn.

Reject FETCH if current is not a real userspace task, and it is
reasonable for failing it in case of io_uring fallback.

Fixes: 3421c7f ("ublk: make sure io cmd handled in submitter task context")
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
@blktests-ci blktests-ci Bot force-pushed the series/1088461=>linus-master branch from 3603bc2 to f30394b Compare May 5, 2026 15:51
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