diff options
author | Dave Airlie <airlied@redhat.com> | 2019-08-09 15:45:02 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2019-08-09 15:45:09 +1000 |
commit | 359f1dcbae12b691fa40aae912fab4c129cb7561 (patch) | |
tree | 7f5d5eab96fc5d49cb7b9fd3ed0d333a41c5439c /drivers | |
parent | 6ca847a947d9da958047dba570d4727069a4861b (diff) | |
parent | f7ccbed656f78212593ca965d9a8f34bf24e0aab (diff) | |
download | linux-359f1dcbae12b691fa40aae912fab4c129cb7561.tar.gz linux-359f1dcbae12b691fa40aae912fab4c129cb7561.tar.bz2 linux-359f1dcbae12b691fa40aae912fab4c129cb7561.zip |
Merge tag 'drm-misc-fixes-2019-08-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
drm-misc-fixes for v5.3-rc4:
- Suspend fix for rockchip
- Fix unterminated strncpy cmdline mode parser
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ace294a6-6bb2-d9b1-695d-3260e1d60831@linux.intel.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/drm_modes.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 80fcd5dc1558..b0369e690f36 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -1770,7 +1770,9 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option, } if (named_mode) { - strncpy(mode->name, name, mode_end); + if (mode_end + 1 > DRM_DISPLAY_MODE_LEN) + return false; + strscpy(mode->name, name, mode_end + 1); } else { ret = drm_mode_parse_cmdline_res_mode(name, mode_end, parse_extras, diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index 95e5c517a15f..9aae3d8e99ef 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -432,7 +432,7 @@ static int rockchip_dp_resume(struct device *dev) static const struct dev_pm_ops rockchip_dp_pm_ops = { #ifdef CONFIG_PM_SLEEP - .suspend = rockchip_dp_suspend, + .suspend_late = rockchip_dp_suspend, .resume_early = rockchip_dp_resume, #endif }; |