[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1255280490.25061.280.camel@localhost>
Date: Sun, 11 Oct 2009 18:01:30 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, Eric Sesterhenn <snakebyte@....de>,
Roman Zippel <zippel@...ux-m68k.org>, 550010@...s.debian.org
Subject: Re: [PATCH] hfsplus: Refuse to mount volumes larger than 2TB
On Sun, 2009-10-11 at 00:51 -0700, Andrew Morton wrote:
[...]
> > --- a/fs/hfsplus/wrapper.c
> > +++ b/fs/hfsplus/wrapper.c
> > @@ -99,6 +99,10 @@
> >
> > if (hfsplus_get_last_session(sb, &part_start, &part_size))
> > return -EINVAL;
> > + if (part_start + part_size > 0x100000000) {
> > + pr_err("hfs: volumes larger than 2TB are not supported yet\n");
> > + return -EINVAL;
> > + }
>
> part_start and part_size are sector_t. This code will do weird overflow
> things when sector_t is 32-bit.
Sorry, I forgot CONFIG_LBD is still optional.
> Also 32-bit compilers will get upset at the excessively large hex constant.
[...]
Good point.
Ben.
--
Ben Hutchings
DNRC Motto: I can please only one person per day.
Today is not your day. Tomorrow isn't looking good either.
Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)
Powered by blists - more mailing lists