public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Reference counting of MMC host driver modules
@ 2009-01-09 17:07 Enrik Berkhan
  2009-01-09 18:20 ` David Vrabel
  0 siblings, 1 reply; 8+ messages in thread
From: Enrik Berkhan @ 2009-01-09 17:07 UTC (permalink / raw)
  To: Pierre Ossman; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-01-12 20:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-09 17:07 Reference counting of MMC host driver modules 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox