aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/arc
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2020-12-15 22:23:07 +0200
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2021-01-05 07:20:36 +0200
commit2c8aba81d32bd90e202ba05249433ab7b1c28c7d (patch)
tree8e921cfdbd9fd72a234f1934d29fb3014f3ba5c3 /drivers/gpu/drm/arc
parentdrm: Use a const drm_driver for legacy PCI devices (diff)
downloadlinux-dev-2c8aba81d32bd90e202ba05249433ab7b1c28c7d.tar.xz
linux-dev-2c8aba81d32bd90e202ba05249433ab7b1c28c7d.zip
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>
Diffstat (limited to 'drivers/gpu/drm/arc')
-rw-r--r--drivers/gpu/drm/arc/arcpgu_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
index f164818ec477..077d006b1fbf 100644
--- a/drivers/gpu/drm/arc/arcpgu_drv.c
+++ b/drivers/gpu/drm/arc/arcpgu_drv.c
@@ -145,7 +145,7 @@ static void arcpgu_debugfs_init(struct drm_minor *minor)
}
#endif
-static struct drm_driver arcpgu_drm_driver = {
+static const struct drm_driver arcpgu_drm_driver = {
.driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,
.name = "arcpgu",
.desc = "ARC PGU Controller",