All of lore.kernel.org
 help / color / mirror / Atom feed
From: Enrik Berkhan <Enrik.Berkhan@ge.com>
To: Pierre Ossman <drzeus-mmc@drzeus.cx>
Cc: linux-kernel@vger.kernel.org
Subject: Reference counting of MMC host driver modules
Date: Fri, 09 Jan 2009 18:07:15 +0100	[thread overview]
Message-ID: <49678443.8040909@ge.com> (raw)

Hi,

I've noticed recently that the MMC/SD block driver does not reference 
count the MMC/SD host driver module that it uses via the MMC/SD core 
layer. Thus, I can rmmod my host driver module while, for example, a 
partition on a SD card is mounted.

Assuming this does not happen intentionally, what would be the correct 
fix? Is a try_module_get(card->host->parent->driver->owner) in 
mmc_blk_alloc() in drivers/mmc/card/block.c the right thing to do? If 
so, I could provide a patch fixing the issue. If not, please give me 
advice how to do it better :) (May be I'm missing something that has to 
do with hotplugging, as the devices I'm using are non-removeable).

Or am I possibly doing something wrong in my host driver and this 
problem is not present for others at all?

Enrik

             reply	other threads:[~2009-01-09 17:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-09 17:07 Enrik Berkhan [this message]
2009-01-09 18:20 ` Reference counting of MMC host driver modules 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

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=49678443.8040909@ge.com \
    --to=enrik.berkhan@ge.com \
    --cc=drzeus-mmc@drzeus.cx \
    --cc=linux-kernel@vger.kernel.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.