Re: [patch] ext4: underflow in alignment check

2016-06-21 Thread Dan Carpenter
On Tue, Jun 21, 2016 at 09:43:53AM +0200, Jan Kara wrote: > On Mon 20-06-16 22:53:26, Dan Carpenter wrote: > > On Mon, Jun 20, 2016 at 06:02:04PM +0200, Jan Kara wrote: > > > On Thu 16-06-16 10:07:09, Dan Carpenter wrote: > > > > My static checker complains that this can underflow if arg is negativ

Re: [patch] ext4: underflow in alignment check

2016-06-21 Thread Jan Kara
On Mon 20-06-16 22:53:26, Dan Carpenter wrote: > On Mon, Jun 20, 2016 at 06:02:04PM +0200, Jan Kara wrote: > > On Thu 16-06-16 10:07:09, Dan Carpenter wrote: > > > My static checker complains that this can underflow if arg is negative > > > which is true. > > > > > > Signed-off-by: Dan Carpenter

Re: [patch] ext4: underflow in alignment check

2016-06-20 Thread Dan Carpenter
On Mon, Jun 20, 2016 at 06:02:04PM +0200, Jan Kara wrote: > On Thu 16-06-16 10:07:09, Dan Carpenter wrote: > > My static checker complains that this can underflow if arg is negative > > which is true. > > > > Signed-off-by: Dan Carpenter > > How come? (1 << 30) fits even into 32-bit signed type.

Re: [patch] ext4: underflow in alignment check

2016-06-20 Thread Jan Kara
On Thu 16-06-16 10:07:09, Dan Carpenter wrote: > My static checker complains that this can underflow if arg is negative > which is true. > > Signed-off-by: Dan Carpenter How come? (1 << 30) fits even into 32-bit signed type. So where's the problem?

[patch] ext4: underflow in alignment check

2016-06-16 Thread Dan Carpenter
My static checker complains that this can underflow if arg is negative which is true. Signed-off-by: Dan Carpenter diff --git a/fs/ext4/super.c b/fs/ext4/super.c index b1a3471..a2a17e9 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1576,7 +1576,7 @@ static int handle_mount_opt(struct sup