mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2025-04-19 20:58:31 +09:00
io_uring/waitid: use io_is_compat()
Use io_is_compat() for consistency. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Reviewed-by: Anuj Gupta <anuj20.g@samsung.com> Link: https://lore.kernel.org/r/28c5b5f1f1bf7f4d18869dafe6e4147ce1bbf0f5.1740400452.git.asml.silence@gmail.com Link: https://lore.kernel.org/r/20250224172337.2009871-1-csander@purestorage.com [axboe: fold in improvement from Caleb, see link] Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
52524b281d
commit
0cd64345c4
@ -42,7 +42,6 @@ static void io_waitid_free(struct io_kiocb *req)
|
||||
req->flags &= ~REQ_F_ASYNC_DATA;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
static bool io_waitid_compat_copy_si(struct io_waitid *iw, int signo)
|
||||
{
|
||||
struct compat_siginfo __user *infop;
|
||||
@ -67,7 +66,6 @@ Efault:
|
||||
ret = false;
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool io_waitid_copy_si(struct io_kiocb *req, int signo)
|
||||
{
|
||||
@ -77,10 +75,8 @@ static bool io_waitid_copy_si(struct io_kiocb *req, int signo)
|
||||
if (!iw->infop)
|
||||
return true;
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
if (req->ctx->compat)
|
||||
if (io_is_compat(req->ctx))
|
||||
return io_waitid_compat_copy_si(iw, signo);
|
||||
#endif
|
||||
|
||||
if (!user_write_access_begin(iw->infop, sizeof(*iw->infop)))
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user