On Tue, Aug 26, 2025, at 14:39, bentiss@kernel.org wrote:
From: Arnd Bergmann arnd@arndb.de
The handling for variable-length ioctl commands in hidraw_ioctl() is rather complex and the check for the data direction is incomplete.
Simplify this code by factoring out the various ioctls grouped by dir and size, and using a switch() statement with the size masked out, to ensure the rest of the command is correctly matched.
Fixes: 9188e79ec3fd ("HID: add phys and name ioctls to hidraw") Signed-off-by: Arnd Bergmann arnd@arndb.de Signed-off-by: Benjamin Tissoires bentiss@kernel.org
Hi Benjamin,
Thanks for fixing my botched patch and sending the new version, looks good to me.
Since you already rewrote most of it, I think this should be attributed to you though, so maybe make that just 'Reported-by: Arnd Bergmann arnd@arndb.de' and make you the author?
Arnd