From: Hugh Dickins <hughd@google.com>
To: Tejun Heo <tj@kernel.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>,
Yong Zhang <yong.zhang0@gmail.com>,
linux-kernel@vger.kernel.org
Subject: linux-next oops in __lock_acquire for process_one_work
Date: Mon, 7 May 2012 10:19:09 -0700 (PDT) [thread overview]
Message-ID: <alpine.LSU.2.00.1205070951170.1544@eggly.anvils> (raw)
Hi Tejun,
Running MM load on recent linux-nexts (e.g. 3.4.0-rc5-next-20120504),
with CONFIG_PROVE_LOCKING=y, I've been hitting an oops in __lock_acquire
called from lock_acquire called from process_one_work: serving mm/swap.c's
lru_add_drain_all - schedule_on_each_cpu(lru_add_drain_per_cpu).
In each case the oopsing address has been ffffffff00000198, and the
oopsing instruction is the "atomic_inc((atomic_t *)&class->ops)" in
__lock_acquire: so class is ffffffff00000000.
I notice Stephen's commit 0976dfc1d0cd80a4e9dfaf87bd8744612bde475a
workqueue: Catch more locking problems with flush_work()
in linux-next but not 3.4-rc, adding
lock_map_acquire(&work->lockdep_map);
lock_map_release(&work->lockdep_map);
to flush_work.
I believe that occasionally races with your
struct lockdep_map lockdep_map = work->lockdep_map;
in process_one_work, putting an entry into the class_cache
just as you're copying it, so you end up with half a pointer.
yes, the structure copy is using "rep movsl" not "rep movsq".
I've reverted Stephen's commit from my testing, and indeed it's
now run that MM load much longer than I've seen since this bug
first appeared. Though I suspect that strictly it's your
unlocked copying of the lockdep_map that's to blame. Probably
easily fixed by someone who understands lockdep - not me!
Hugh
next reply other threads:[~2012-05-07 17:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-07 17:19 Hugh Dickins [this message]
2012-05-07 17:57 ` Tejun Heo
2012-05-08 13:03 ` Peter Zijlstra
2012-05-08 16:58 ` Tejun Heo
2012-05-08 17:02 ` Peter Zijlstra
2012-05-08 18:11 ` Hugh Dickins
2012-05-08 22:31 ` Peter Zijlstra
2012-05-08 22:58 ` Hugh Dickins
2012-05-09 9:25 ` Ingo Molnar
2012-05-09 20:09 ` Hugh Dickins
2012-05-10 17:52 ` Hugh Dickins
2012-05-14 21:27 ` Tejun Heo
2012-05-15 11:11 ` Peter Zijlstra
2012-05-15 15:10 ` [PATCH] lockdep: fix oops in processing workqueue Tejun Heo
2012-05-15 15:29 ` Dave Jones
2012-05-15 15:31 ` Tejun Heo
2012-05-15 20:36 ` Hugh Dickins
2012-05-08 18:05 ` linux-next oops in __lock_acquire for process_one_work Hugh Dickins
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.LSU.2.00.1205070951170.1544@eggly.anvils \
--to=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sboyd@codeaurora.org \
--cc=tj@kernel.org \
--cc=yong.zhang0@gmail.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
all inboxes | Powered by JetHome®