linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@surriel.com>
To: Andrea Arcangeli <aarcange@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, Roman Gushchin <guro@fb.com>,
	Michal Hocko <mhocko@kernel.org>
Subject: Re: [PATCH 1/1] fork,memcg: alloc_thread_stack_node needs to set tsk->stack
Date: Tue, 18 Jun 2019 21:22:56 -0400	[thread overview]
Message-ID: <e6fe65b301cba1db23d7fefb0031d8eb65574ee7.camel@surriel.com> (raw)
In-Reply-To: <20190619011450.28048-1-aarcange@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 841 bytes --]

On Tue, 2019-06-18 at 21:14 -0400, Andrea Arcangeli wrote:
> Commit 5eed6f1dff87bfb5e545935def3843edf42800f2 corrected two
> instances, but there was a third instance of this bug.
> 
> Without setting tsk->stack, if memcg_charge_kernel_stack fails, it'll
> execute free_thread_stack() on a dangling pointer.
> 
> Enterprise kernels are compiled with VMAP_STACK=y so this isn't
> critical, but custom VMAP_STACK=n builds should have some performance
> advantage, with the drawback of risking to fail fork because
> compaction didn't succeed. So as long as VMAP_STACK=n is a supported
> option it's worth fixing it upstream.
> 
> Fixes: 9b6f7e163cd0 ("mm: rework memcg kernel stack accounting")
> Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>

Reviewed-by: Rik van Riel <riel@surriel.com>

-- 
All Rights Reversed.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-06-19  1:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19  1:14 Andrea Arcangeli
2019-06-19  1:22 ` Rik van Riel [this message]
2019-06-19  3:49 ` Roman Gushchin
2019-06-19  5:18 ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e6fe65b301cba1db23d7fefb0031d8eb65574ee7.camel@surriel.com \
    --to=riel@surriel.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=guro@fb.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox