Commit e5478166 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Danilo Krummrich
Browse files

drm/nouveau: check ioctl command codes better



nouveau_drm_ioctl() only checks the _IOC_NR() bits in the
DRM_NOUVEAU_NVIF command, but ignores the type and direction bits, so any
command with '7' in the low eight bits gets passed into
nouveau_abi16_ioctl() instead of drm_ioctl().

Check for all the bits except the size that is handled inside of the
handler.

Fixes: 27111a23 ("drm/nouveau: expose the full object/event interfaces to userspace")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
[ Fix up two checkpatch warnings and a typo. - Danilo ]
Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250711072458.2665325-1-arnd@kernel.org
parent bd46cece
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment