net: fujitsu: fix potential null-ptr-deref
mainline inclusion from mainline-v5.13-rc3 commit 52202be1 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9BGKK CVE: CVE-2021-47149 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=52202be1cd996cde6e8969a128dc27ee45a7cb5e -------------------------------- In fmvj18x_get_hwinfo(), if ioremap fails there will be NULL pointer deref. To fix this, check the return value of ioremap and return -1 to the caller in case of failure. Cc: "David S. Miller" <davem@davemloft.net> Acked-by:Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by:
Anirudh Rayabharam <mail@anirudhrb.com> Link: https://lore.kernel.org/r/20210503115736.2104747-16-gregkh@linuxfoundation.org Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
ZhangPeng <zhangpeng362@huawei.com>
Loading
Please sign in to comment