From: Janne Kalliomäki Date: Sun, 17 Jun 2012 21:05:24 +0000 (-0400) Subject: hfsplus: fix overflow in sector calculations in hfsplus_submit_bio X-Git-Tag: v3.5~169^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6dc8c04218eb752ff79cdc24a995cf51866caed;p=platform%2Fkernel%2Flinux-amlogic.git hfsplus: fix overflow in sector calculations in hfsplus_submit_bio The variable io_size was unsigned int, which caused the wrong sector number to be calculated after aligning it. This then caused mount to fail with big volumes, as backup volume header information was searched from a wrong sector. Signed-off-by: Janne Kalliomäki Signed-off-by: Christoph Hellwig Signed-off-by: Linus Torvalds --- diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c index 7daf4b8..90effcc 100644 --- a/fs/hfsplus/wrapper.c +++ b/fs/hfsplus/wrapper.c @@ -56,7 +56,7 @@ int hfsplus_submit_bio(struct super_block *sb, sector_t sector, DECLARE_COMPLETION_ONSTACK(wait); struct bio *bio; int ret = 0; - unsigned int io_size; + u64 io_size; loff_t start; int offset;