Skip to content

Commit 22327f6

Browse files
Al Virogregkh
authored andcommitted
unbreak allmodconfig KCONFIG_ALLCONFIG=...
commit 6b87b70c5339f30e3c5b32085e69625906513dc2 upstream. Prior to 3.13 make allmodconfig KCONFIG_ALLCONFIG=/dev/null used to be equivalent to make allmodconfig; these days it hardwires MODULES to n. In fact, any KCONFIG_ALLCONFIG that doesn't set MODULES explicitly is treated as if it set it to n. Regression had been introduced by commit cfa98f ("kconfig: do not override symbols already set"); what happens is that conf_read_simple() does sym_calc_value(modules_sym) on exit, which leaves SYMBOL_VALID set and has conf_set_all_new_symbols() skip modules_sym. It's pretty easy to fix - simply move that call of sym_calc_value() into the callers, except for the ones in KCONFIG_ALLCONFIG handling. Objections? Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Fixes: cfa98f2 ("kconfig: do not override symbols already set") Signed-off-by: Michal Marek <mmarek@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e91b1db commit 22327f6

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

scripts/kconfig/confdata.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,8 @@ int conf_read_simple(const char *name, int def)
267267
if (in)
268268
goto load;
269269
sym_add_change_count(1);
270-
if (!sym_defconfig_list) {
271-
sym_calc_value(modules_sym);
270+
if (!sym_defconfig_list)
272271
return 1;
273-
}
274272

275273
for_all_defaults(sym_defconfig_list, prop) {
276274
if (expr_calc_value(prop->visible.expr) == no ||
@@ -403,7 +401,6 @@ int conf_read_simple(const char *name, int def)
403401
}
404402
free(line);
405403
fclose(in);
406-
sym_calc_value(modules_sym);
407404
return 0;
408405
}
409406

@@ -414,8 +411,12 @@ int conf_read(const char *name)
414411

415412
sym_set_change_count(0);
416413

417-
if (conf_read_simple(name, S_DEF_USER))
414+
if (conf_read_simple(name, S_DEF_USER)) {
415+
sym_calc_value(modules_sym);
418416
return 1;
417+
}
418+
419+
sym_calc_value(modules_sym);
419420

420421
for_all_symbols(i, sym) {
421422
sym_calc_value(sym);
@@ -846,6 +847,7 @@ static int conf_split_config(void)
846847

847848
name = conf_get_autoconfig_name();
848849
conf_read_simple(name, S_DEF_AUTO);
850+
sym_calc_value(modules_sym);
849851

850852
if (chdir("include/config"))
851853
return 1;

0 commit comments

Comments
 (0)