Skip to content

Commit 2983701

Browse files
committed
Merge tag 'io_uring-5.19-2022-07-08' of git://git.kernel.dk/linux-block
Pull io_uring tweak from Jens Axboe: "Just a minor tweak to an addition made in this release cycle: padding a 32-bit value that's in a 64-bit union to avoid any potential funkiness from that" * tag 'io_uring-5.19-2022-07-08' of git://git.kernel.dk/linux-block: io_uring: explicit sqe padding for ioctl commands
2 parents 086ff84 + bdb2c48 commit 2983701

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

fs/io_uring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5066,7 +5066,7 @@ static int io_uring_cmd_prep(struct io_kiocb *req,
50665066
{
50675067
struct io_uring_cmd *ioucmd = &req->uring_cmd;
50685068

5069-
if (sqe->rw_flags)
5069+
if (sqe->rw_flags || sqe->__pad1)
50705070
return -EINVAL;
50715071
ioucmd->cmd = sqe->cmd;
50725072
ioucmd->cmd_op = READ_ONCE(sqe->cmd_op);

include/uapi/linux/io_uring.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ struct io_uring_sqe {
2222
union {
2323
__u64 off; /* offset into file */
2424
__u64 addr2;
25-
__u32 cmd_op;
25+
struct {
26+
__u32 cmd_op;
27+
__u32 __pad1;
28+
};
2629
};
2730
union {
2831
__u64 addr; /* pointer to buffer or iovecs */

0 commit comments

Comments
 (0)