Re: [PATCH 4/4] ntsync: reject wait ioctls with zero owner
Elizabeth Figura <[email protected]> Wed, 01 Jul 2026 11:38:46 -0500
| Newsgroups | gmane.linux.kernel,gmane.comp.emulators.wine.devel |
|---|---|
| Message-ID | <5081647.GXAFRqVoOG@camazotz> |
On Saturday, 27 June 2026 21:42:39 CDT Iv=C3=A1n Ezequiel Rodriguez wrote: > setup_wait() already validates pad and flags but not owner, while > Documentation/userspace-api/ntsync.rst requires EINVAL when owner is > zero. Reject early before queueing waiters. >=20 > Signed-off-by: Iv=C3=A1n Ezequiel Rodriguez <[email protected]> > --- > drivers/misc/ntsync.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/drivers/misc/ntsync.c b/drivers/misc/ntsync.c > index 02c9d1192812..4a805919bb0c 100644 > --- a/drivers/misc/ntsync.c > +++ b/drivers/misc/ntsync.c > @@ -875,6 +875,9 @@ static int setup_wait(struct ntsync_device *dev, > if (args->pad || (args->flags & ~NTSYNC_WAIT_REALTIME)) > return -EINVAL; > =20 > + if (!args->owner) > + return -EINVAL; > + > if (size >=3D sizeof(fds)) > return -EINVAL; > =20 >=20 Reviewed-by: Elizabeth Figura <[email protected]>