Re: [PATCH] xfs: fix signed integer overflow

2016-09-13 Thread Xie XiuQi
On 2016/9/13 14:57, Dave Chinner wrote: > On Fri, Sep 09, 2016 at 03:16:48PM +0800, Xie XiuQi wrote: >> On 2016/9/9 14:42, Joe Perches wrote: >>> On Fri, 2016-09-09 at 14:38 +0800, Xie XiuQi wrote: Use 1U for unsigned long, or we'll meet a overflow issue with UBSAN. >>> trivia: misleading comm

Re: [PATCH] xfs: fix signed integer overflow

2016-09-12 Thread Dave Chinner
On Fri, Sep 09, 2016 at 03:16:48PM +0800, Xie XiuQi wrote: > On 2016/9/9 14:42, Joe Perches wrote: > > On Fri, 2016-09-09 at 14:38 +0800, Xie XiuQi wrote: > >> Use 1U for unsigned long, or we'll meet a overflow issue with UBSAN. > > > > trivia: misleading commit message > > > > 1U is for unsigned

Re: [PATCH] xfs: fix signed integer overflow

2016-09-09 Thread Xie XiuQi
On 2016/9/9 14:42, Joe Perches wrote: > On Fri, 2016-09-09 at 14:38 +0800, Xie XiuQi wrote: >> Use 1U for unsigned long, or we'll meet a overflow issue with UBSAN. > > trivia: misleading commit message > > 1U is for unsigned int not unsigned long int > Sorry, my fault. Thank you for your commen

Re: [PATCH] xfs: fix signed integer overflow

2016-09-08 Thread Joe Perches
On Fri, 2016-09-09 at 14:38 +0800, Xie XiuQi wrote: > Use 1U for unsigned long, or we'll meet a overflow issue with UBSAN. trivia: misleading commit message 1U is for unsigned int not unsigned long int

[PATCH] xfs: fix signed integer overflow

2016-09-08 Thread Xie XiuQi
Use 1U for unsigned long, or we'll meet a overflow issue with UBSAN. [ 31.910858] UBSAN: Undefined behaviour in fs/xfs/xfs_buf_item.c:889:25 [ 31.911252] signed integer overflow: [ 31.911478] -2147483648 - 1 cannot be represented in type 'int' [ 31.911846] CPU: 1 PID: 1011 Comm: tuned Tain