regmap: fix NULL deref on lookup
stable inclusion from stable-v4.19.135 commit 7219c6b8fa24ec55a19d7a5ea58fb09151e37950 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8LTOI CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7219c6b8fa24ec55a19d7a5ea58fb09151e37950 ------------------------------------- commit c6df8433 upstream. Not all regmaps have a name so make sure to check for that to avoid dereferencing a NULL pointer when dev_get_regmap() is used to lookup a named regmap. Fixes: e84861fe ("regmap: dev_get_regmap_match(): fix string comparison") Cc: stable@vger.kernel.org # 5.8 Cc: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by:Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20231006082104.16707-1-johan+linaro@kernel.org Signed-off-by:
Mark Brown <broonie@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Zhang Zekun <zhangzekun11@huawei.com>
Loading
Please sign in to comment