From: Viresh Kumar <viresh.kumar@linaro.org>
To: Juergen Gross <jgross@suse.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Vincent Guittot" <vincent.guittot@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
stratos-dev@op-lists.linaro.org,
"Erik Schilling" <erik.schilling@linaro.org>,
"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
"Mathieu Poirier" <mathieu.poirier@linaro.org>,
"Arnd Bergmann" <arnd@kernel.org>,
xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Subject: [PATCH V4 2/4] xen: irqfd: Use _IOW instead of the internal _IOC() macro
Date: Mon, 16 Oct 2023 12:41:25 +0530 [thread overview]
Message-ID: <599ca6f1b9dd2f0e6247ea37bee3ea6827404b6d.1697439990.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1697439990.git.viresh.kumar@linaro.org>
_IOC() an internal helper that we should not use in driver code. In
particular, we got the data direction wrong here, which breaks a number
of tools, as having "_IOC_NONE" should never be paired with a nonzero
size.
Use _IOW() instead.
Fixes: f8941e6c4c71 ("xen: privcmd: Add support for irqfd")
Reported-by: Arnd Bergmann <arnd@kernel.org>
Closes: https://lore.kernel.org/all/268a2031-63b8-4c7d-b1e5-8ab83ca80b4a@app.fastmail.com/
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
include/uapi/xen/privcmd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/xen/privcmd.h b/include/uapi/xen/privcmd.h
index b143fafce84d..e145bca5105c 100644
--- a/include/uapi/xen/privcmd.h
+++ b/include/uapi/xen/privcmd.h
@@ -138,6 +138,6 @@ struct privcmd_irqfd {
#define IOCTL_PRIVCMD_MMAP_RESOURCE \
_IOC(_IOC_NONE, 'P', 7, sizeof(struct privcmd_mmap_resource))
#define IOCTL_PRIVCMD_IRQFD \
- _IOC(_IOC_NONE, 'P', 8, sizeof(struct privcmd_irqfd))
+ _IOW('P', 8, struct privcmd_irqfd)
#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */
--
2.31.1.272.g89b43f80a514
next prev parent reply other threads:[~2023-10-16 7:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 7:11 [PATCH V4 0/4] xen: privcmd: Add ioeventfd and fix irqfd support Viresh Kumar
2023-10-16 7:11 ` [PATCH V4 1/4] xen: Make struct privcmd_irqfd's layout architecture independent Viresh Kumar
2023-10-16 7:13 ` Juergen Gross
2023-10-16 7:11 ` Viresh Kumar [this message]
2023-10-16 7:14 ` [PATCH V4 2/4] xen: irqfd: Use _IOW instead of the internal _IOC() macro Juergen Gross
2023-10-16 7:11 ` [PATCH V4 3/4] xen: evtchn: Allow shared registration of IRQ handers Viresh Kumar
2023-10-16 7:17 ` Juergen Gross
2023-10-16 7:11 ` [PATCH V4 4/4] xen: privcmd: Add support for ioeventfd Viresh Kumar
2023-10-16 7:25 ` Juergen Gross
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=599ca6f1b9dd2f0e6247ea37bee3ea6827404b6d.1697439990.git.viresh.kumar@linaro.org \
--to=viresh.kumar@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=arnd@kernel.org \
--cc=erik.schilling@linaro.org \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manos.pitsidianakis@linaro.org \
--cc=mathieu.poirier@linaro.org \
--cc=oleksandr_tyshchenko@epam.com \
--cc=sstabellini@kernel.org \
--cc=stratos-dev@op-lists.linaro.org \
--cc=vincent.guittot@linaro.org \
--cc=xen-devel@lists.xenproject.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
all inboxes | Powered by JetHome®