Skip to content

Commit a6dc8c0

Browse files
Janne Kalliomäkitorvalds
authored andcommitted
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 <janne@tuxera.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 485802a commit a6dc8c0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/hfsplus/wrapper.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int hfsplus_submit_bio(struct super_block *sb, sector_t sector,
5656
DECLARE_COMPLETION_ONSTACK(wait);
5757
struct bio *bio;
5858
int ret = 0;
59-
unsigned int io_size;
59+
u64 io_size;
6060
loff_t start;
6161
int offset;
6262

0 commit comments

Comments
 (0)