]> git.baikalelectronics.ru Git - kernel.git/commit
s390/netiucv: improve checking of sysfs attribute buffer
authorUrsula Braun <ubraun@linux.vnet.ibm.com>
Wed, 12 Oct 2016 10:38:50 +0000 (12:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Oct 2016 14:59:45 +0000 (10:59 -0400)
commit12ecc39d12f07aed76e21d78c6047a4f05120055
tree6fb4ecd3d0b26dd6702dcffe6370fb0d28a9b065
parent24bfcf1df2535918c9b83a99753ead9c5b9bce3f
s390/netiucv: improve checking of sysfs attribute buffer

High values are always wrong for netiucv's sysfs attribute "buffer".
But the current code does not detect values between 2**31 and 2**32
as invalid. Choosing type "unsigned int" for variable "bs1" and making
use of "kstrtouint()" improves the syntax checking for "buffer".

Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/netiucv.c