From: Jens Axboe <axboe@kernel.dk>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org, stable@kernel.org,
avillaci@ceibo.fiec.espol.edu.ec
Subject: Re: [PATCH] block: use the passed in @bdev when claiming if partno is zero
Date: Mon, 13 Jun 2011 14:44:18 +0200 [thread overview]
Message-ID: <4DF60622.7020804@kernel.dk> (raw)
In-Reply-To: <20110613104440.GB16021@htj.dyndns.org>
On 2011-06-13 12:44, Tejun Heo wrote:
> 6b4517a791 (block: implement bd_claiming and claiming block)
> introduced claiming block to support O_EXCL blkdev opens properly.
>
> bd_start_claiming() looks up the part 0 bdev and starts claiming
> block. The function assumed that there is only one part 0 bdev and
> always used bdget_disk(disk, 0) to look it up; unfortunately, this
> isn't true for some drivers (floppy) which use multiple block devices
> to denote different operating parameters for the same physical device.
> There can be multiple part 0 bdev's for the same device number.
>
> This incorrect assumption caused the wrong bdev to be used during
> claiming leading to unbalanced bd_holders as reported in the following
> bug.
>
> https://bugzilla.kernel.org/show_bug.cgi?id=28522
>
> This patch updates bd_start_claiming() such that it uses the bdev
> specified as argument if its partno is zero.
>
> Note that this means that different bdev's can be used for the same
> device and O_EXCL check can be effectively bypassed. It has always
> been broken that way and floppy is fortunately on its way out. Leave
> that breakage alone.
Thanks, applied for 3.0.
--
Jens Axboe
prev parent reply other threads:[~2011-06-13 12:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-13 10:44 [PATCH] block: use the passed in @bdev when claiming if partno is zero Tejun Heo
2011-06-13 12:44 ` Jens Axboe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DF60622.7020804@kernel.dk \
--to=axboe@kernel.dk \
--cc=avillaci@ceibo.fiec.espol.edu.ec \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox