diff options
author | Tejun Heo <htejun@gmail.com> | 2010-08-04 17:59:39 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 11:09:14 -0700 |
commit | acdc70839d626fa98417b8905bfa1e88087f3097 (patch) | |
tree | c726e8db60168cb8ddfee44a4eab918413518541 /fs/jffs2/malloc.c | |
parent | 2812c8f70ec3a6c5abd0305a42366c880a18a85a (diff) |
block_dev: always serialize exclusive open attempts
commit e75aa85892b2ee78c79edac720868cbef16e62eb upstream.
bd_prepare_to_claim() incorrectly allowed multiple attempts for
exclusive open to progress in parallel if the attempting holders are
identical. This triggered BUG_ON() as reported in the following bug.
https://bugzilla.kernel.org/show_bug.cgi?id=16393
__bd_abort_claiming() is used to finish claiming blocks and doesn't
work if multiple openers are inside a claiming block. Allowing
multiple parallel open attempts to continue doesn't gain anything as
those are serialized down in the call chain anyway. Fix it by always
allowing only single open attempt in a claiming block.
This problem can easily be reproduced by adding a delay after
bd_prepare_to_claim() and attempting to mount two partitions of a
disk.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/jffs2/malloc.c')
0 files changed, 0 insertions, 0 deletions