From: Matthew Wilcox <willy@infradead.org>
To: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: linux-stable <stable@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org, rcu@vger.kernel.org,
lkft-triage@lists.linaro.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
"Paul E. McKenney" <paulmck@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: WARNING: bad unlock balance detected! - mkfs.ext4/426 is trying to release lock (rcu_read_lock)
Date: Mon, 7 Dec 2020 06:07:46 +0000 [thread overview]
Message-ID: <20201207060746.GT11935@casper.infradead.org> (raw)
In-Reply-To: <CA+G9fYs=nR-d0n8kV4=OWD+v=GR2ufOEWU9S4oG1_fZRxhGouQ@mail.gmail.com>
On Mon, Dec 07, 2020 at 11:17:29AM +0530, Naresh Kamboju wrote:
> While running "mkfs -t ext4" on arm64 juno-r2 device connected with SSD drive
> the following kernel warning reported on stable rc 5.9.13-rc1 kernel.
>
> Steps to reproduce:
> ------------------
> # boot arm64 Juno-r2 device with stable-rc 5.9.13-rc1.
> # Connect SSD drive
> # Format the file system ext4 type
> mkfs -t ext4 <SSD-drive>
> # you will notice this warning
Does it happen easily? Can you bisect?
> Crash log:
> --------------
> Writing superblocks and filesystem accounting information: 0/895
> [ 86.131095]
> [ 86.132592] =====================================
> [ 86.137300] WARNING: bad unlock balance detected!
> [ 86.142012] 5.9.13-rc1 #1 Not tainted
> [ 86.145675] -------------------------------------
> [ 86.150384] mkfs.ext4/426 is trying to release lock (rcu_read_lock) at:
> [ 86.157020] [<ffff80001063478c>] blk_queue_exit+0xcc/0x1b0
> [ 86.162511] but there are no more locks to release!
This really doesn't make much sense. blk_queue_exit() in 5.9.12 does:
percpu_ref_put(&q->q_usage_counter);
(literally, that's the entire function)
percpu_ref_put() does:
rcu_read_lock();
if (__ref_is_percpu(ref, &percpu_count))
this_cpu_sub(*percpu_count, nr);
else if (unlikely(atomic_long_sub_and_test(nr, &ref->count)))
ref->release(ref);
rcu_read_unlock();
Unless ->release() has an unbalanced rcu_read_unlock(), there definitely
is a lock to release! Some archaeology says that ->release is
blk_queue_usage_counter_release(), which calls
wake_up_all(&q->mq_freeze_wq);
which doesn't appear to use RCU at all. So this trace makes no sense,
and all I can do is ask you to bisect it.
next prev parent reply other threads:[~2020-12-07 6:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 5:47 Naresh Kamboju
2020-12-07 6:07 ` Matthew Wilcox [this message]
2020-12-07 10:37 ` Naresh Kamboju
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=20201207060746.GT11935@casper.infradead.org \
--to=willy@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkft-triage@lists.linaro.org \
--cc=mark.rutland@arm.com \
--cc=miquel.raynal@bootlin.com \
--cc=naresh.kamboju@linaro.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
/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®