* [BUG] drm/amdgpu: possible null-pointer dereference in dce_vXX_0_afmt_setmode()
@ 2021-08-10 9:28 Tuo Li
0 siblings, 0 replies; only message in thread
From: Tuo Li @ 2021-08-10 9:28 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, Xinhui.Pan, airlied, daniel,
evan.quan, luben.tuikov, tzimmermann, lee.jones, mh12gx2825,
sakari.ailus, zhangqilong3, pmladek
Cc: amd-gfx, dri-devel, Linux Kernel, baijiaju1990
Hello,
Our static analysis tool finds some possible null-pointer dereferences
in the amdgpu driver in Linux 5.14.0-rc3:
In dce_v10_0.c:
The variable encoder->crtc is checked in:
1591: if (encoder->crtc)
This indicates that encoder->crtc can be NULL.
Then the function dce_v10_0_audio_set_dto() is called with the argument
encoder:
1600: ce_v10_0_audio_set_dto(encoder, mode->clock);
However, encoder->crtc is dereferenced in this function:
1545: struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(encoder->crtc);
1559: tmp = REG_SET_FIELD(tmp, DCCG_AUDIO_DTO_SOURCE,
DCCG_AUDIO_DTO0_SOURCE_SEL, amdgpu_crtc->crtc_id);
In dce_v11_0.c and dce_v8_0.c, situations are the same.
I am not quite sure whether these possible null-pointer dereferences are
real and how to fix them if they are real.
Any feedback would be appreciated, thanks!
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Best wishes,
Tuo Li
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-10 9:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 9:28 [BUG] drm/amdgpu: possible null-pointer dereference in dce_vXX_0_afmt_setmode() Tuo Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®