Re: [patch] cxgb4: memory corruption in debugfs

2015-08-18 Thread David Miller
From: Dan Carpenter Date: Tue, 18 Aug 2015 12:31:44 +0300 > You can't use kstrtoul() with an int or it causes memory corruption. > Also j should be unsigned or we have underflow bugs. > > I considered changing "j" to unsigned long but everything fits in a u32. > > Fixes: 8e3d04fd7d70 ('cxgb4: A

Re: [patch] cxgb4: memory corruption in debugfs

2015-08-18 Thread Tetsuo Handa
Dan Carpenter wrote: > You can't use kstrtoul() with an int or it causes memory corruption. > Also j should be unsigned or we have underflow bugs. > > I considered changing "j" to unsigned long but everything fits in a u32. Excuse me, but kstrtouint()'s last argument is not "u32 *" but "unsigned

Re: [patch] cxgb4: memory corruption in debugfs

2015-08-18 Thread Dan Carpenter
On Tue, Aug 18, 2015 at 07:28:53PM +0900, Tetsuo Handa wrote: > Dan Carpenter wrote: > > You can't use kstrtoul() with an int or it causes memory corruption. > > Also j should be unsigned or we have underflow bugs. > > > > I considered changing "j" to unsigned long but everything fits in a u32. >

[patch] cxgb4: memory corruption in debugfs

2015-08-18 Thread Dan Carpenter
You can't use kstrtoul() with an int or it causes memory corruption. Also j should be unsigned or we have underflow bugs. I considered changing "j" to unsigned long but everything fits in a u32. Fixes: 8e3d04fd7d70 ('cxgb4: Add MPS tracing support') Signed-off-by: Dan Carpenter diff --git a/dri