RE: mmc/card/block.c : mmc_blk_open readonly mount bug?
From: sasin
Date: Fri Sep 05 2008 - 01:35:05 EST
Guess nobody tests with readonly? We had a socket on our board that
flipped the write protect signal, and the rest you know :-)
-----Original Message-----
From: Pierre Ossman [mailto:drzeus-list@xxxxxxxxx]
Sent: Friday, September 05, 2008 1:07 PM
To: Andrew Morton
Cc: Sasi Nair; linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: mmc/card/block.c : mmc_blk_open readonly mount bug?
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/