Re: [PATCH] fork, memcg: fix cached_stacks case

From: Rik van Riel
Date: Fri Jan 04 2019 - 15:15:10 EST


On Wed, 2019-01-02 at 10:01 -0800, Shakeel Butt wrote:
> Commit 5eed6f1dff87 ("fork,memcg: fix crash in free_thread_stack on
> memcg charge fail") fixes a crash caused due to failed memcg charge
> of
> the kernel stack. However the fix misses the cached_stacks case which
> this patch fixes. So, the same crash can happen if the memcg charge
> of
> a cached stack is failed.
>
> Fixes: 5eed6f1dff87 ("fork,memcg: fix crash in free_thread_stack on
> memcg charge fail")
> Signed-off-by: Shakeel Butt <shakeelb@xxxxxxxxxx>
> Cc: Rik van Riel <riel@xxxxxxxxxxx>
> Cc: Roman Gushchin <guro@xxxxxx>
> Cc: Michal Hocko <mhocko@xxxxxxxx>
> Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
> Cc: Tejun Heo <tj@xxxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx>

Good catch. Thank you.

Acked-by: Rik van Riel <riel@xxxxxxxxxxx>

--
All Rights Reversed.

Attachment: signature.asc
Description: This is a digitally signed message part