提交 8864086e 编写于 作者: P Pavel Begunkov 提交者: Zheng Zengkai

io_uring: use better types for cflags

stable inclusion
from stable-5.10.43
commit ec72cb50c1db39816eae7296686449bba8ca0b2e
bugzilla: 109284
CVE: NA

--------------------------------

[ Upstream commit 8c3f9cd1 ]

__io_cqring_fill_event() takes cflags as long to squeeze it into u32 in
an CQE, awhile all users pass int or unsigned. Replace it with unsigned
int and store it as u32 in struct io_completion to match CQE.
Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 e95c9692
......@@ -546,7 +546,7 @@ struct io_statx {
struct io_completion {
struct file *file;
struct list_head list;
int cflags;
u32 cflags;
};
struct io_async_connect {
......@@ -1712,7 +1712,8 @@ static void io_cqring_overflow_flush(struct io_ring_ctx *ctx, bool force,
}
}
static void __io_cqring_fill_event(struct io_kiocb *req, long res, long cflags)
static void __io_cqring_fill_event(struct io_kiocb *req, long res,
unsigned int cflags)
{
struct io_ring_ctx *ctx = req->ctx;
struct io_uring_cqe *cqe;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册