mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
io_uring: add missing BUILD_BUG_ON() checks for new io_uring_sqe fields
Signed-off-by: Stefan Metzmacher <metze@samba.org> Link: https://lore.kernel.org/r/ffcaf8dc4778db4af673822df60dbda6efdd3065.1660201408.git.metze@samba.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
f2ccb5aed7
commit
9c71d39aa0
@@ -58,6 +58,9 @@ int io_uring_cmd_prep_async(struct io_kiocb *req)
|
||||
struct io_uring_cmd *ioucmd = io_kiocb_to_cmd(req, struct io_uring_cmd);
|
||||
size_t cmd_size;
|
||||
|
||||
BUILD_BUG_ON(uring_cmd_pdu_size(0) != 16);
|
||||
BUILD_BUG_ON(uring_cmd_pdu_size(1) != 80);
|
||||
|
||||
cmd_size = uring_cmd_pdu_size(req->ctx->flags & IORING_SETUP_SQE128);
|
||||
|
||||
memcpy(req->async_data, ioucmd->cmd, cmd_size);
|
||||
|
Reference in New Issue
Block a user