Skip to content

Commit

Permalink
hfsplus: fix overflow in sector calculations in hfsplus_submit_bio
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Janne Kalliomäki authored and torvalds committed Jun 17, 2012
1 parent 485802a commit a6dc8c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/hfsplus/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a6dc8c0

Please sign in to comment.