drm/nouveau: add nv_encoder pointer check for NULL
stable inclusion from stable-v5.10.185 commit 6ab91d1adb5a57d7380e902ff3b89564f138c4e7 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8L5XP Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6ab91d1adb5a57d7380e902ff3b89564f138c4e7 -------------------------------- [ Upstream commit 55b94bb8 ] Pointer nv_encoder could be dereferenced at nouveau_connector.c in case it's equal to NULL by jumping to goto label. This patch adds a NULL-check to avoid it. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 3195c5f9 ("drm/nouveau: set encoder for lvds") Signed-off-by:Natalia Petrova <n.petrova@fintech.ru> Reviewed-by:
Lyude Paul <lyude@redhat.com> [Fixed patch title] Signed-off-by:
Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230512103320.82234-1-n.petrova@fintech.ru Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment