linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: David Mackey <tdmackey@twitter.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Andi Kleen <ak@linux.intel.com>,
	penberg@kernel.org, cl@linux.com
Subject: Re: [PATCH v4] slab/mempolicy: always use local policy from interrupt context
Date: Thu, 31 May 2012 13:41:29 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1205311340170.2764@chino.kir.corp.google.com> (raw)
In-Reply-To: <1338429749-5780-1-git-send-email-tdmackey@twitter.com>

On Wed, 30 May 2012, David Mackey wrote:

> From: Andi Kleen <ak@linux.intel.com>
> 
> slab_node() could access current->mempolicy from interrupt context.
> However there's a race condition during exit where the mempolicy
> is first freed and then the pointer zeroed.
> 
> Using this from interrupts seems bogus anyways. The interrupt
> will interrupt a random process and therefore get a random
> mempolicy. Many times, this will be idle's, which noone can change.
> 
> Just disable this here and always use local for slab
> from interrupts. I also cleaned up the callers of slab_node a bit
> which always passed the same argument.
> 
> I believe the original mempolicy code did that in fact,
> so it's likely a regression.
> 
> v2: send version with correct logic
> v3: simplify. fix typo.
> Reported-by: Arun Sharma <asharma@fb.com>
> Cc: penberg@kernel.org
> Cc: cl@linux.com
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> [tdmackey@twitter.com: Rework patch logic and avoid dereference of current 
> task if in interrupt context.]
> Signed-off-by: David Mackey <tdmackey@twitter.com>

Acked-by: David Rientjes <rientjes@google.com>

Thanks for following up on this.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      parent reply	other threads:[~2012-05-31 20:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1336431315-29736-1-git-send-email-andi@firstfloor.org>
2012-05-31  2:02 ` David Mackey
2012-05-31  4:22   ` Andi Kleen
2012-05-31  4:59     ` KOSAKI Motohiro
2012-05-31  7:50       ` Pekka Enberg
2012-05-31 20:41   ` David Rientjes [this message]

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=alpine.DEB.2.00.1205311340170.2764@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=ak@linux.intel.com \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=tdmackey@twitter.com \
    /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