ublk: reject FETCH from non-userspace context#787
Conversation
|
Upstream branch: e75a43c |
5a9f7c7 to
25a041f
Compare
|
Upstream branch: 66edb90 |
58dfbc2 to
8e0d980
Compare
25a041f to
6f75bd1
Compare
|
Upstream branch: 6d35786 |
8e0d980 to
3603bc2
Compare
6f75bd1 to
1f0d33a
Compare
|
Upstream branch: 6d35786 |
3603bc2 to
f30394b
Compare
1f0d33a to
b1870f6
Compare
|
Upstream branch: aa54b1d |
f30394b to
d6804d3
Compare
b1870f6 to
ca57796
Compare
|
Upstream branch: 70eda68 |
d6804d3 to
baebeb6
Compare
ca57796 to
c1feb59
Compare
|
Upstream branch: 8bc67e4 |
baebeb6 to
564b887
Compare
c1feb59 to
ea833a1
Compare
|
Upstream branch: 6779b50 |
564b887 to
154173e
Compare
ea833a1 to
7af85d1
Compare
|
Upstream branch: 79bd2dd |
154173e to
462c070
Compare
7af85d1 to
de94ac7
Compare
|
Upstream branch: eed108e |
__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>
462c070 to
87af82f
Compare
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