> > +
> > + if (range.start > ULLONG_MAX - BBSIZE)
> > + return -XFS_ERROR(EINVAL);
> > +
>
> There's no point checking for overflow on the range start - what we
> need to check is whether it is larger than the size of the
> filesystem. We do that after the conversion of range.start to
On Mon, Jul 30, 2012 at 10:13:44AM +0200, Tomas Racek wrote:
> If range.start argument was between ULLONG_MAX - BBSIZE and ULLONG_MAX,
> BTOBB macro resulted in overflow which caused start to be set to 0.
> Now, invalid argument error is returned instead.
>
> Signed-off-by: Tomas Racek
> ---
> f
If range.start argument was between ULLONG_MAX - BBSIZE and ULLONG_MAX,
BTOBB macro resulted in overflow which caused start to be set to 0.
Now, invalid argument error is returned instead.
Signed-off-by: Tomas Racek
---
fs/xfs/xfs_discard.c |4
1 files changed, 4 insertions(+), 0 deleti
3 matches
Mail list logo