Commit e547816
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: 27111a2 ("drm/nouveau: expose the full object/event interfaces to userspace")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[ Fix up two checkpatch warnings and a typo. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250711072458.2665325-1-arnd@kernel.org1 parent bd46cec commit e547816
1 file changed
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
1287 | 1290 | | |
1288 | 1291 | | |
1289 | 1292 | | |
| |||
1297 | 1300 | | |
1298 | 1301 | | |
1299 | 1302 | | |
1300 | | - | |
1301 | | - | |
| 1303 | + | |
1302 | 1304 | | |
1303 | | - | |
1304 | | - | |
| 1305 | + | |
1305 | 1306 | | |
1306 | | - | |
1307 | | - | |
1308 | 1307 | | |
1309 | 1308 | | |
1310 | 1309 | | |
| |||
0 commit comments