Re: [PATCH v2] kconfig: fix dangling check_top after an unexpected recursive dependency

From: Nicolas Schier

Date: Thu Nov 05 2026 - 02:32:21 EST


On Thu, 08 Oct 2026 11:45:28 -0500, Leizhen Zhang wrote:
> If the last symbol of a recursive dependency is a choice value,
> sym_check_print_recursive() pushes the on-stack cv_stack onto the
> dependency stack. If the choice is then not found on the stack, the
> function prints "unexpected recursive dependency error" and returns
> without removing cv_stack again. check_top is left pointing into the
> stack frame of the returned function, and the next dep_stack_remove()
> dereferences it:
>
> [...]

Applied to kbuild/linux.git (kbuild-next-unstable), thanks!

[1/1] kconfig: fix dangling check_top after an unexpected recursive dependency
https://git.kernel.org/kbuild/c/fa887263

Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped,
reverted or modified (e.g. trailers).

Patches applied to the kbuild-next-unstable branch are accepted pending
wider testing in linux-next and any post-commit review; they will
generally be moved to the kbuild-next branch in about a week if no
issues are found.

Best regards,
--
Nicolas