From: Elizabeth Figura <zfigura@codeweavers.com>
To: Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
wine-devel@list.winehq.org, linux-kselftest@vger.kernel.org,
linux-doc@vger.kernel.org,
"Iván Ezequiel Rodriguez" <ivanrwcm25@gmail.com>,
"Elizabeth Figura" <zfigura@codeweavers.com>
Subject: [PATCH v2 3/5] ntsync: reject wait ioctls with zero owner
Date: Thu, 23 Jul 2026 15:12:59 -0500 [thread overview]
Message-ID: <20260723201301.11826-4-zfigura@codeweavers.com> (raw)
In-Reply-To: <20260723201301.11826-1-zfigura@codeweavers.com>
From: Iván Ezequiel Rodriguez <ivanrwcm25@gmail.com>
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.
Signed-off-by: Iván Ezequiel Rodriguez <ivanrwcm25@gmail.com>
Reviewed-by: Elizabeth Figura <zfigura@codeweavers.com>
Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
---
drivers/misc/ntsync.c | 3 +++
1 file changed, 3 insertions(+)
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;
+ if (!args->owner)
+ return -EINVAL;
+
if (size >= sizeof(fds))
return -EINVAL;
--
2.53.0
next prev parent reply other threads:[~2026-07-23 20:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 20:12 [PATCH v2 0/5] ntsync miscellaneous patches Elizabeth Figura
2026-07-23 20:12 ` [PATCH v2 1/5] selftests: ntsync: fix wake_all CREATE_EVENT fd expectation Elizabeth Figura
2026-07-23 20:12 ` [PATCH v2 2/5] selftests: ntsync: add wait argument validation tests Elizabeth Figura
2026-07-23 20:12 ` Elizabeth Figura [this message]
2026-07-23 20:13 ` [PATCH v2 4/5] docs: ntsync: align ioctl names and struct layouts with uapi Elizabeth Figura
2026-07-23 20:13 ` [PATCH v2 5/5] selftests: ntsync: test absolute MONOTONIC waits under time namespaces Elizabeth Figura
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260723201301.11826-4-zfigura@codeweavers.com \
--to=zfigura@codeweavers.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=ivanrwcm25@gmail.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=wine-devel@list.winehq.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox