From: Christopher Lameter <cl@linux.com>
To: akpm@linuxfoundation.org
Cc: "Steven J. Hill" <steven.hill@cavium.com>, linux-mm@kvack.org
Subject: mm/vmstat.c: fix vmstat_update() preemption BUG
Date: Thu, 29 Mar 2018 11:32:44 -0500 (CDT) [thread overview]
Message-ID: <alpine.DEB.2.20.1803291126230.27735@nuc-kabylake> (raw)
Just saw
commit c7f26ccfb2c31eb1bf810ba13d044fcf583232db
Author: Steven J. Hill <steven.hill@cavium.com>
Date: Wed Mar 28 16:01:09 2018 -0700
mm/vmstat.c: fix vmstat_update() preemption BUG
Attempting to hotplug CPUs with CONFIG_VM_EVENT_COUNTERS enabled can
cause vmstat_update() to report a BUG due to preemption not being
disabled around smp_processor_id().
The fix is wrong.
vmstat_update cannot be moved to a differentprocessor and thus
preemption should be off.
vmstat_update repeatedly accesses per cpu information.
vmstat_update first checks if there are counter to be updated on the
current cpu and then updates the counters. This cannot happen if the
process can be moved to a different cpu.
The patch "switches off" preemption after the check if there are changes
to the local per cpu counter.
Lets find out what changed in the callers of vmstat_update() that caused
the BUG to be triggered.
next reply other threads:[~2018-03-29 16:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-29 16:32 Christopher Lameter [this message]
2018-03-29 17:50 ` Andrew Morton
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.20.1803291126230.27735@nuc-kabylake \
--to=cl@linux.com \
--cc=akpm@linuxfoundation.org \
--cc=linux-mm@kvack.org \
--cc=steven.hill@cavium.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