Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: Fix ioc32 compat layer

Previously any ioctls that weren't explicitly listed in the compat ioctl
table would fail with ENOTTY. If the incoming ioctl number is outside the
range of the table, assume that it Just Works, and pass it off to drm_ioctl.
This make the fence related ioctls work on 64-bit PowerPC.

Signed-off-by: Dave Airlie <airlied@linux.ie>

authored by

Ian Romanick and committed by
Dave Airlie
7ffa05e0 47a184a8

+5 -1
+5 -1
drivers/char/drm/drm_ioc32.c
··· 1051 1051 drm_ioctl_compat_t *fn; 1052 1052 int ret; 1053 1053 1054 + /* Assume that ioctls without an explicit compat routine will just 1055 + * work. This may not always be a good assumption, but it's better 1056 + * than always failing. 1057 + */ 1054 1058 if (nr >= ARRAY_SIZE(drm_compat_ioctls)) 1055 - return -ENOTTY; 1059 + return drm_ioctl(filp->f_dentry->d_inode, filp, cmd, arg); 1056 1060 1057 1061 fn = drm_compat_ioctls[nr]; 1058 1062