diff options
author | Paweł Gronowski <me@woland.xyz> | 2020-07-19 17:54:53 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-07-21 15:37:40 -0400 |
commit | 9cb268215dbb186f4eaed589bda1a7a50ccabdc8 (patch) | |
tree | 53c16e9d11d41b1244cff4d432fd86ed7088ec58 /drivers/gpu/drm/tilcdc | |
parent | 0c56c862e712001e4d86bc4f43d74f2425c010c2 (diff) | |
download | linux-stable-9cb268215dbb186f4eaed589bda1a7a50ccabdc8.tar.gz linux-stable-9cb268215dbb186f4eaed589bda1a7a50ccabdc8.tar.bz2 linux-stable-9cb268215dbb186f4eaed589bda1a7a50ccabdc8.zip |
drm/amdgpu: Fix NULL dereference in dpm sysfs handlers
NULL dereference occurs when string that is not ended with space or
newline is written to some dpm sysfs interface (for example pp_dpm_sclk).
This happens because strsep replaces the tmp with NULL if the delimiter
is not present in string, which is then dereferenced by tmp[0].
Reproduction example:
sudo sh -c 'echo -n 1 > /sys/class/drm/card0/device/pp_dpm_sclk'
Signed-off-by: Paweł Gronowski <me@woland.xyz>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/tilcdc')
0 files changed, 0 insertions, 0 deletions