Re: [PATCH] Btrfs: fix an integer overflow check

2017-03-27 Thread David Sterba
On Fri, Mar 17, 2017 at 11:51:20PM +0300, Dan Carpenter wrote: > This isn't super serious because you need CAP_ADMIN to run this code. > > I added this integer overflow check last year but apparently I am > rubbish at writing integer overflow checks... There are two issues. > First, access_ok() w

[PATCH] Btrfs: fix an integer overflow check

2017-03-17 Thread Dan Carpenter
This isn't super serious because you need CAP_ADMIN to run this code. I added this integer overflow check last year but apparently I am rubbish at writing integer overflow checks... There are two issues. First, access_ok() works on unsigned long type and not u64 so on 32 bit systems the access_ok