[CFR][PATCH] drm2: don't assume that dev->driver->max_ioctl > *dev->driver->compat_ioctls_nr

Konstantin Belousov kostikbel at gmail.com
Fri Nov 28 17:32:33 UTC 2014


On Fri, Nov 28, 2014 at 04:29:42PM +0300, Eygene Ryabinkin wrote:
> Konstantin, *, good day.
> 
> I noticed that the current ioctl processing code for drm2 implicitely
> assumes that the number of native ioctls is higher than that of 32-bit
> compat ones, so it immediately gives EINVAL when
> nr >= dev->driver->max_ioctl.  Seems that in future such assumption
> may not be true in all cases.
I very much doubt that it could become true. Compat32 ioctl cannot
exist without its wider counterpart.

> 
> This can be fixed with the following patch:
>   http://codelabs.ru/fbsd/patches/drm2/drm_drv-untangle-32bit-compat.diff
> 
> Any thoughts on it?
I think either current way or patch are fine, but why changing something
which is fine ?


More information about the freebsd-current mailing list