drm/msm: Fix null pointer dereference on pointer edp
stable inclusion from stable-v4.19.213 commit 7f642b93710b6b1119bdff90be01e6b5a2a5d669 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9RB7E CVE: CVE-2021-47445 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7f642b93710b6b1119bdff90be01e6b5a2a5d669 -------------------------------- commit 2133c4fc upstream. The initialization of pointer dev dereferences pointer edp before edp is null checked, so there is a potential null pointer deference issue. Fix this by only dereferencing edp after edp has been null checked. Addresses-Coverity: ("Dereference before null check") Fixes: ab5b0107 ("drm/msm: Initial add eDP support in msm drm driver (v5)") Signed-off-by:Colin Ian King <colin.king@canonical.com> Reviewed-by:
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20210929121857.213922-1-colin.king@canonical.com Signed-off-by:
Rob Clark <robdclark@chromium.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Liu Chuang <liuchuang40@huawei.com>
Loading
Please sign in to comment