Re: Stale expression reference causing use-after-free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Catalin,

On Tue, Sep 21, 2010 at 8:32 AM, Catalin Marinas
<catalin.marinas@xxxxxxx> wrote:
> From: Catalin Marinas <catalin.marinas@xxxxxxx>
>
> Commit 246cf9c26b introduced the tracking of direct dependency to
> provide additional warning when they are not met. With some complex
> dependencies, the expr_copy() function called on such expressions may
> cause stack exhaustion. The patch removes the superfluous expr_copy()
> call since expr_transform handles symbol duplication already.
>
I'm afraid this is just moving the problem from expr_copy() to
expr_transform() as the first thing the latter do is to recurse. on
the sub-expressions. I'm not sure that the expression causing the
stack exhaustion is even correct, or its reference is still valid.

 - Arnaud

> Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxx>
> Reported-by: Arnaud Lacombe <lacombar@xxxxxxxxx>
> ---
>  scripts/kconfig/menu.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
> index 4fb5902..7298806 100644
> --- a/scripts/kconfig/menu.c
> +++ b/scripts/kconfig/menu.c
> @@ -292,7 +292,7 @@ void menu_finalize(struct menu *parent)
>                        menu_finalize(menu);
>        } else if (sym) {
>                /* ignore inherited dependencies for dir_dep */
> -               sym->dir_dep.expr = expr_transform(expr_copy(parent->dir_dep));
> +               sym->dir_dep.expr = expr_transform(parent->dir_dep);
>                sym->dir_dep.expr = expr_eliminate_dups(sym->dir_dep.expr);
>
>                basedep = parent->prompt ? parent->prompt->visible.expr : NULL;
>
>
> --
> Catalin
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux