Skip to content

Commit 8a3876f

Browse files
u-ragregkh
authored andcommitted
kconfig: Update config changed flag before calling callback
[ Upstream commit ee06a3e ] Prior to commit 5ee5465 ("kconfig: change sym_change_count to a boolean flag"), the conf_updated flag was set to the new value *before* calling the callback. xconfig's save action depends on this behaviour, because xconfig calls conf_get_changed() directly from the callback and now sees the old value, thus never enabling the save button or the shortcut. Restore the previous behaviour. Fixes: 5ee5465 ("kconfig: change sym_change_count to a boolean flag") Signed-off-by: Jurica Vukadin <jura@vukad.in> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent fc331de commit 8a3876f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/kconfig/confdata.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,10 +1226,12 @@ static void (*conf_changed_callback)(void);
12261226

12271227
void conf_set_changed(bool val)
12281228
{
1229-
if (conf_changed_callback && conf_changed != val)
1230-
conf_changed_callback();
1229+
bool changed = conf_changed != val;
12311230

12321231
conf_changed = val;
1232+
1233+
if (conf_changed_callback && changed)
1234+
conf_changed_callback();
12331235
}
12341236

12351237
bool conf_get_changed(void)

0 commit comments

Comments
 (0)