summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/rockchip
diff options
context:
space:
mode:
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>2015-12-11 11:20:27 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-12-15 13:52:38 +0100
commit399368aab39135cd9bc5e20b55b8b4d48658f904 (patch)
tree51a6768930b14cb09fb0c773c8a067011d093b7f /drivers/gpu/drm/rockchip
parentd7955fcff889ec9a78bac387aec929154465423a (diff)
downloadlinux-0-day-399368aab39135cd9bc5e20b55b8b4d48658f904.tar.gz
linux-0-day-399368aab39135cd9bc5e20b55b8b4d48658f904.tar.xz
drm: make drm_dev_set_unique() not use a format string
drm_dev_set_unique() uses a format string to define the unique name of a device. This feature is not used as currently all the calls to this function either use "%s" as a format string or directly use dev_name(). Even though this second kind of call does not introduce security problems, because there cannot be "%" characters in dev_name() results, gcc issues a warning when building with -Wformat-security flag ("warning: format string is not a string literal (potentially insecure)"). This warning is useful to find real bugs like the one fixed by commit 3958b79266b1 ("configfs: fix kernel infoleak through user-controlled format string"). False positives which do not bring an extra value make the work of finding real bugs harder. Therefore remove the format-string feature from drm_dev_set_unique(). Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Link: http://patchwork.freedesktop.org/patch/msgid/1449829228-4425-1-git-send-email-nicolas.iooss_linux@m4x.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/rockchip')
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_drm_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index f22e1e1ee64aa..215d6c44af55b 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -450,7 +450,7 @@ static int rockchip_drm_bind(struct device *dev)
if (!drm)
return -ENOMEM;
- ret = drm_dev_set_unique(drm, "%s", dev_name(dev));
+ ret = drm_dev_set_unique(drm, dev_name(dev));
if (ret)
goto err_free;