Re: mmc/card/block.c : mmc_blk_open readonly mount bug?

From: Pierre Ossman
Date: Fri Sep 05 2008 - 01:07:35 EST


On Thu, 4 Sep 2008 16:08:08 -0700
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
>
> 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.
>
> Reported-by: <sasin@xxxxxxxxxxxxxxxxxxx>
> Cc: Pierre Ossman <drzeus-list@xxxxxxxxx>
> Cc: <stable@xxxxxxxxxx> [2.6.25.x, 2.6.26.x]
> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> ---

I wonder how that bug has been able to go unnoticed for so long...

Acked-by: Pierre Ossman <drzeus@xxxxxxxxx>

--
-- Pierre Ossman

Linux kernel, MMC maintainer http://www.kernel.org
rdesktop, core developer http://www.rdesktop.org

WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.

Attachment: signature.asc
Description: PGP signature