Re: Subject: [PATCH] block: fix __blkdev_get() for removable devices

Borislav Petkov
2008-11-05T09:05:17Z

On Tue, Nov 04, 2008 at 01:16:07PM +0900, Tejun Heo wrote:
> Commit 0762b8bde9729f10f8e6249809660ff2ec3ad735 moved disk_get_part()
> in front of recursive get on the whole disk, which caused removable
> devices to try disk_get_part() before rescanning after a new media is
> inserted, which might fail legit open attempts or give the old
> partition.
>
> This patch fixes the problem by moving disk_get_part() after
> __blkdev_get() on the whole disk.
>
> This problem was spotted by Borislav Petkov.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: <Borislav Petkov> petkovbb@googlemail.com
> ---
> Borislav, can you please verify this patch? Thanks.

Yep, it works. Thanks.

Tested-by: Borislav Petkov <petkovbb@gmail.com>

--
Regards/Gruss,
Boris.