cxgb4: memory corruption in debugfs
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 18 Aug 2015 09:31:44 +0000 (12:31 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Aug 2015 02:06:58 +0000 (19:06 -0700)
commitc938a003448063382e0575aee2d381d4cd7aec34
tree11a561ba6172a59e832363088b7ba95dc7e35438
parent3dc33e23227de8d854a665157cf465303e7cbbce
cxgb4: memory corruption in debugfs

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 <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c