From: Michael Ellerman <mpe@ellerman•id.au>
To: Sebastian Siewior <bigeasy@linutronix•de>,
Benjamin Herrenschmidt <benh@kernel•crashing.org>
Cc: Paul Mackerras <paulus@samba•org>,
"Aneesh Kumar K.V" <aneesh.kumar@linux•vnet.ibm.com>,
Scott Wood <scottwood@freescale•com>,
Christoph Lameter <cl@linux•com>,
linuxppc-dev@lists•ozlabs.org
Subject: Re: [v2] powerpc: mm: fixup preempt undefflow with huge pages
Date: Thu, 31 Mar 2016 10:29:45 +1100 (AEDT) [thread overview]
Message-ID: <3qb3lF4HnXz9ssP@ozlabs.org> (raw)
In-Reply-To: <20160308090356.GA21842@linutronix.de>
On Tue, 2016-08-03 at 09:03:56 UTC, Sebastian Siewior wrote:
> hugepd_free() used __get_cpu_var() once. Nothing ensured that the code
> accessing the variable did not migrate from one CPU to another and soon
> this was noticed by Tiejun Chen in 94b09d755462 ("powerpc/hugetlb:
> Replace __get_cpu_var with get_cpu_var"). So we had it fixed.
>
> Christoph Lameter was doing his __get_cpu_var() replaces and forgot
> PowerPC. Then he noticed this and sent his fixed up batch again which
> got applied as 69111bac42f5 ("powerpc: Replace __get_cpu_var uses").
>
> The careful reader will noticed one little detail: get_cpu_var() got
> replaced with this_cpu_ptr(). So now we have a put_cpu_var() which does
> a preempt_enable() and nothing that does preempt_disable() so we
> underflow the preempt counter.
>
> Cc: Benjamin Herrenschmidt <benh@kernel•crashing.org>
> Cc: Christoph Lameter <cl@linux•com>
> Cc: Michael Ellerman <mpe@ellerman•id.au>
> Cc: <stable@vger•kernel.org>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix•de>
> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux•vnet.ibm.com>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/08a5bb2921e490939f78f38fd0
cheers
prev parent reply other threads:[~2016-03-30 23:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 13:55 [PATCH] powerpc: mm: fixup preempt undefflow with huge pages Sebastian Andrzej Siewior
2016-03-07 15:34 ` Aneesh Kumar K.V
2016-03-07 23:41 ` Benjamin Herrenschmidt
2016-03-08 8:08 ` Sebastian Andrzej Siewior
2016-03-08 9:03 ` [PATCH v2] " Sebastian Andrzej Siewior
2016-03-09 19:34 ` Aneesh Kumar K.V
2016-03-29 13:40 ` Sebastian Andrzej Siewior
2016-03-30 0:41 ` Michael Ellerman
2016-03-30 8:17 ` Sebastian Andrzej Siewior
2016-03-30 23:29 ` Michael Ellerman [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=3qb3lF4HnXz9ssP@ozlabs.org \
--to=mpe@ellerman$(echo .)id.au \
--cc=aneesh.kumar@linux$(echo .)vnet.ibm.com \
--cc=benh@kernel$(echo .)crashing.org \
--cc=bigeasy@linutronix$(echo .)de \
--cc=cl@linux$(echo .)com \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=paulus@samba$(echo .)org \
--cc=scottwood@freescale$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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