Re: [PATCH 1/1] FS/OMFS: block number sanity check during fill_super operation

From: Fabian Frederick
Date: Thu Jun 26 2014 - 14:28:04 EST


On Thu, 26 Jun 2014 10:08:04 -0700
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Jun 26, 2014 10:05 AM, "Fabian Frederick" <fabf@xxxxxxxxx> wrote:
> >
> > +#define OMFS_MAX_BLOCKS (1 << 31)
>
> This is wrong. Think about the types, and what value this has...
>

Hello Linus,

Sorry but I don't see a problem with 2^31 value.
It's being compared to u64 value then used in DIV_ROUND_UP: divided by 8 to fit in unsigned int (maximum 2^32 - 1)... What value should I use ?

Thanks,
Fabian

> Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/