lkml.org 
[lkml]   [2008]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectmmc/card/block.c : mmc_blk_open readonly mount bug?
Date
From
mmc_block_open increments md->usage although it returns with -EROFS when
default mounting a MMC/SD card with write protect switch on. This
reference counting bug prevents /dev/mmcblkX from being released on card
removal, and situation worsen with reinsertion until the minor number
range runs out.

"return -EROFS;"

should be replaced by

"
{
ret = -EROFS;
mmc_blk_put(md);
}
"


Best regards,
Sasi


\
 
 \ /
  Last update: 2008-09-04 12:19    [W:0.040 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site