linux_dsm_epyc7002/drivers/gpu/drm/r128
Ben Hutchings 7dc482dfee drm/r128: Add test for initialisation to all ioctls that require it
Almost all r128's private ioctls require that the CCE state has
already been initialised.  However, most do not test that this has
been done, and will proceed to dereference a null pointer.  This may
result in a security vulnerability, since some ioctls are
unprivileged.

This adds a macro for the common initialisation test and changes all
ioctl implementations that require prior initialisation to use that
macro.

Also, r128_do_init_cce() does not test that the CCE state has not
been initialised already.  Repeated initialisation may lead to a crash
or resource leak.  This adds that test.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-08-31 09:09:30 +10:00
..
Makefile drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
r128_cce.c drm/r128: Add test for initialisation to all ioctls that require it 2009-08-31 09:09:30 +10:00
r128_drv.c drm: move drm vblank initialization/cleanup to driver load/unload 2008-11-25 09:49:03 +10:00
r128_drv.h drm/r128: Add test for initialisation to all ioctls that require it 2009-08-31 09:09:30 +10:00
r128_ioc32.c drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
r128_irq.c drm: move drm vblank initialization/cleanup to driver load/unload 2008-11-25 09:49:03 +10:00
r128_state.c drm/r128: Add test for initialisation to all ioctls that require it 2009-08-31 09:09:30 +10:00