Skip to content

Commit 767e33c

Browse files
vireshkjgross1
authored andcommitted
xen: irqfd: Use _IOW instead of the internal _IOC() macro
_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: f8941e6 ("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> Reviewed-by: Juergen Gross <jgross@suse.com> Link: https://lore.kernel.org/r/599ca6f1b9dd2f0e6247ea37bee3ea6827404b6d.1697439990.git.viresh.kumar@linaro.org Signed-off-by: Juergen Gross <jgross@suse.com>
1 parent 8dd765a commit 767e33c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/uapi/xen/privcmd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,6 @@ struct privcmd_irqfd {
138138
#define IOCTL_PRIVCMD_MMAP_RESOURCE \
139139
_IOC(_IOC_NONE, 'P', 7, sizeof(struct privcmd_mmap_resource))
140140
#define IOCTL_PRIVCMD_IRQFD \
141-
_IOC(_IOC_NONE, 'P', 8, sizeof(struct privcmd_irqfd))
141+
_IOW('P', 8, struct privcmd_irqfd)
142142

143143
#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */

0 commit comments

Comments
 (0)