menuconfig: fix NULL pointer dereference when searching a symbol
authorLi Zefan <lizefan@huawei.com>
Tue, 7 May 2013 13:56:54 +0000 (15:56 +0200)
committerChristian Lamparter <chunkeey@googlemail.com>
Fri, 31 May 2013 15:57:24 +0000 (17:57 +0200)
commite5ef38a8fa9ef524c3ef061083ce35d1529e5ea0
tree56e342483f72e0d187bfb73f9b77ba029d37c706
parent38accb8265d899250a003e10f0916b8d997e2203
menuconfig: fix NULL pointer dereference when searching a symbol

Searching for PPC_EFIKA results in a segmentation fault, and it's
because get_symbol_prop() returns NULL.

In this case CONFIG_PPC_EFIKA is defined in arch/powerpc/platforms/
52xx/Kconfig, so it won't be parsed if ARCH!=PPC, but menuconfig knows
this symbol when it parses sound/soc/fsl/Kconfig:

    config SND_MPC52xx_SOC_EFIKA
        tristate "SoC AC97 Audio support for bbplan Efika and STAC9766"
        depends on PPC_EFIKA

This bug was introduced by commit bcdedcc1afd6 ("menuconfig: print more
info for symbol without prompts").

Reported-and-tested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Li Zefan <lizefan@huawei.com>
Tested-by: Libo Chen <libo.chen@huawei.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
config/menu.c