From: Enrik Berkhan <Enrik.Berkhan@ge.com>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Pierre Ossman <drzeus-mmc@drzeus.cx>,
David Vrabel <david.vrabel@csr.com>,
linux-kernel@vger.kernel.org
Subject: Re: Reference counting of MMC host driver modules
Date: Mon, 12 Jan 2009 21:01:56 +0100 [thread overview]
Message-ID: <20090112200156.GA22537@ngeserver2.localdomain> (raw)
In-Reply-To: <496B7969.5050706@s5r6.in-berlin.de>
Stefan Richter wrote:
> Enrik Berkhan wrote:
> > When removing the mmc_host_driver, everything seems to be fine; the
> > MMC/SD block device has been deactivated by mmc_blk_remove(), that in
> > turn has stopped the queue via mmc_cleanup_queue(). mmc_cleanup_queue()
> > calls blk_cleanup_queue() on the underlying struct request_queue. By
> > this, the reference count of the struct request_queues kboj drops to
> > zero. The MD driver still has the block device open and, actually,
> > things work fine unless the memory of the struct request_queue isn't
> > touched, because it is marked dead. Of course, accessing the MD device
> > returns EIO, but that's fine.
> >
> > When the mmc_host_driver is reloaded, new struct request_queues will be
> > allocated and with some probability, the old memory will be re-used for
> > them or the old memory locations will be re-used for something else. The
> > key point is that the queues still in use by the MD layer will
> > effectively no longer be marked dead or completely corrupted.
>
> So in short, the request_queue's reference count goes to zero even
> though something still points to it?
Exactly. AFAICS.
I haven't checked yet if this happens using other block device
infrastructure, too.
Enrik
prev parent reply other threads:[~2009-01-12 20:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-09 17:07 Enrik Berkhan
2009-01-09 18:20 ` David Vrabel
2009-01-09 20:00 ` Enrik Berkhan
2009-01-10 9:49 ` Stefan Richter
2009-01-11 9:41 ` Pierre Ossman
2009-01-12 15:41 ` Enrik Berkhan
2009-01-12 17:10 ` Stefan Richter
2009-01-12 20:01 ` Enrik Berkhan [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=20090112200156.GA22537@ngeserver2.localdomain \
--to=enrik.berkhan@ge.com \
--cc=david.vrabel@csr.com \
--cc=drzeus-mmc@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=stefanr@s5r6.in-berlin.de \
/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®