In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: Fix potential null pointer dereference in dcdmubsrv
Fixes potential null pointer dereference warnings in the dcdmubsrvcmdlistqueueexecute() and dcdmubsrvishwpwrup() functions.
In both functions, the 'dcdmubsrv' variable was being dereferenced before it was checked for null. This could lead to a null pointer dereference if 'dcdmubsrv' is null. The fix is to check if 'dcdmubsrv' is null before dereferencing it.
Thus moving the null checks for 'dcdmubsrv' to the beginning of the functions to ensure that 'dcdmubsrv' is not null when it is dereferenced.
Found by smatch & thus fixing the below: drivers/gpu/drm/amd/amdgpu/../display/dc/dcdmubsrv.c:133 dcdmubsrvcmdlistqueueexecute() warn: variable dereferenced before check 'dcdmubsrv' (see line 128) drivers/gpu/drm/amd/amdgpu/../display/dc/dcdmubsrv.c:1167 dcdmubsrvishwpwrup() warn: variable dereferenced before check 'dcdmubsrv' (see line 1164)