]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Constify drm_driver in drivers that don't modify it
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 15 Dec 2020 20:23:07 +0000 (22:23 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 5 Jan 2021 05:20:36 +0000 (07:20 +0200)
commita66e43792580beee3c2e28c7be1d5b08e1b8cc9c
tree8e921cfdbd9fd72a234f1934d29fb3014f3ba5c3
parentce4bde2e16689d37a446672399789cf4801e1b41
drm: Constify drm_driver in drivers that don't modify it

A non-const structure containing function pointers is a possible attack
vector. The drm_driver structure is already const in most drivers, but
there are a few exceptions. Constify the structure in the drivers that
don't need to modify at, as a low-hanging fruit. The rest of the drivers
will need a more complex fix.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/arc/arcpgu_drv.c
drivers/gpu/drm/kmb/kmb_drv.c
drivers/gpu/drm/tdfx/tdfx_drv.c