Re: [Patch] kernel/sys.c: fix an incorrect error branch in orderly_poweroff()

From: Kees Cook
Date: Wed Jul 04 2012 - 22:59:56 EST


On Tue, Jul 3, 2012 at 8:31 PM, Cong Wang <amwang@xxxxxxxxxx> wrote:
> From: WANG Cong <xiyou.wangcong@xxxxxxxxx>
>
> When argv_split() fails, argv is NULL, thus we should avoid calling
> agrv_free(argv), and should jump after it.
>
> Cc: Cyrill Gorcunov <gorcunov@xxxxxxxxxx>
> Cc: Kees Cook <keescook@xxxxxxxxxxxx>
> Cc: Serge Hallyn <serge.hallyn@xxxxxxxxxxxxx>
> Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: WANG Cong <xiyou.wangcong@xxxxxxxxx>

Good catch!

Acked-by: Kees Cook <keescook@xxxxxxxxxxxx>

--
Kees Cook
Chrome OS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/