From: Al Viro <viro@ZenIV.linux.org.uk>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Rusty Russell <rusty@rustcorp.com.au>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jari Ruusu <jariruusu@users.sourceforge.net>
Subject: Re: 2.6.35-rc2 module reference counting broken
Date: Wed, 9 Jun 2010 00:48:14 +0100 [thread overview]
Message-ID: <20100608234814.GA19826@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20100607064412.GK31073@ZenIV.linux.org.uk>
On Mon, Jun 07, 2010 at 07:44:12AM +0100, Al Viro wrote:
> On Mon, Jun 07, 2010 at 08:20:30AM +0300, Jari Ruusu wrote:
> > Someone broke block device module reference counting. Problem occours when a
> > modular block device is mounted and unmounted. Not when it is directly read.
> > 2.6.34 kernel works OK, but 2.6.35-rc2 kernel seems to increase usage count
> > by one for each mount + umount pair.
>
> Very interesting... Looks like mount() bumps refcount by 2. umount() after
> that drops refcount by 1, so it's not leaking superblocks.
>
> Which probably means that open_bdev_exclusive() is fscked. Interesting...
> FWIW, quick look through the history seems to point to this:
> commit 6b4517a7913a09d3259bb1d21c9cb300f12294bd
> Author: Tejun Heo <tj@kernel.org>
> Date: Wed Apr 7 18:53:59 2010 +0900
>
> block: implement bd_claiming and claiming block
>
> I'm far too sleepy right now, but I'd start with reviewing what that
> thing is doing to module refcounting...
Yeah... bd_start_claiming() grabs a reference to gendisk and we never
let it go. There's your leak...
next prev parent reply other threads:[~2010-06-08 23:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-07 5:20 2.6.35-rc2 module reference counting broken Jari Ruusu
2010-06-07 6:44 ` Al Viro
2010-06-08 23:48 ` Al Viro [this message]
2010-06-09 7:01 ` Tejun Heo
2010-06-10 6:34 ` Jari Ruusu
2010-06-10 11:31 ` Tejun Heo
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=20100608234814.GA19826@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=jariruusu@users.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.