io_uring/futex: get rid of struct io_futex addr union

Rather than use a union of a u32 and struct futex_waitv user address,
consolidate it into a single void __user pointer instead. This also
makes prep easier to use as the store happens to the member that will
be used.

No functional changes in this patch.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
pull/1259/head
Jens Axboe 2025-06-04 08:49:32 -06:00
parent 607d09d1a0
commit 6a8118a77e
1 changed files with 2 additions and 5 deletions

View File

@ -14,10 +14,7 @@
struct io_futex {
struct file *file;
union {
u32 __user *uaddr;
struct futex_waitv __user *uwaitv;
};
void __user *uaddr;
unsigned long futex_val;
unsigned long futex_mask;
unsigned long futexv_owned;
@ -186,7 +183,7 @@ int io_futexv_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
if (!futexv)
return -ENOMEM;
ret = futex_parse_waitv(futexv, iof->uwaitv, iof->futex_nr,
ret = futex_parse_waitv(futexv, iof->uaddr, iof->futex_nr,
io_futex_wakev_fn, req);
if (ret) {
kfree(futexv);