summaryrefslogtreecommitdiff
path: root/scripts/kconfig/symbol.c
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2010-08-14 16:40:00 +0400
committerMichal Marek <mmarek@suse.cz>2010-08-15 02:32:13 +0400
commit3643f849d7da5c12da589beb03c12303fe79b841 (patch)
tree60cfbd4ee780bbcde2d7013a2ed8c1dc6ace42c0 /scripts/kconfig/symbol.c
parent84062dd3a6a045395a43de1d9adc9b8eb2d1426e (diff)
downloadlinux-3643f849d7da5c12da589beb03c12303fe79b841.tar.xz
kconfig: fix segfault when detecting recursive dependency
Following sample Kconfig generated a segfault: config FOO bool select PERF_EVENTS if HAVE_HW_BREAKPOINT config PERF_EVENTS bool config HAVE_HW_BREAKPOINT bool depends on PERF_EVENTS Fix by reverting back to a valid property if there was no property on the stack of symbols. The above pattern were seen in sh Kconfig. A fix for the Kconfig file has been sent to the sh folks. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kconfig/symbol.c')
-rw-r--r--scripts/kconfig/symbol.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index e95718fea355..943712ca6c0a 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -937,6 +937,8 @@ static void sym_check_print_recursive(struct symbol *last_sym)
sym = stack->sym;
next_sym = stack->next ? stack->next->sym : last_sym;
prop = stack->prop;
+ if (prop == NULL)
+ prop = stack->sym->prop;
/* for choice values find the menu entry (used below) */
if (sym_is_choice(sym) || sym_is_choice_value(sym)) {