From: Christoph Hellwig <hch@infradead.org>
To: torvalds@linux-foundation.org
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Janne Kalliom??ki <janne@tuxera.com>
Subject: [PATCH 1/2] hfsplus: fix overflow in sector calculations in hfsplus_submit_bio
Date: Sun, 17 Jun 2012 17:05:24 -0400 [thread overview]
Message-ID: <20120617210632.922931341@bombadil.infradead.org> (raw)
In-Reply-To: 20120617210523.088906451@bombadil.infradead.org
[-- Attachment #1: hfsplus-mount-fix.diff --]
[-- Type: text/plain, Size: 779 bytes --]
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>
---
fs/hfsplus/wrapper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c
index 5d2aa0c..1cc3920 100644
--- a/fs/hfsplus/wrapper.c
+++ b/fs/hfsplus/wrapper.c
@@ -70,7 +70,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;
next prev parent reply other threads:[~2012-06-17 21:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-17 21:05 [PATCH 0/2] hfsplus fixes for Linux 3.5 Christoph Hellwig
2012-06-17 21:05 ` Christoph Hellwig [this message]
2012-06-17 21:05 ` [PATCH 2/2] hfsplus: fix bless ioctl when used with hardlinks Christoph Hellwig
2012-06-17 21:09 ` [PATCH 0/2] hfsplus fixes for Linux 3.5 Christoph Hellwig
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=20120617210632.922931341@bombadil.infradead.org \
--to=hch@infradead.org \
--cc=janne@tuxera.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).