On 10/7/20 11:23 AM, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing > head: 6a89c9390e62e16ede591ae920b38e276207f1a4 > commit: 99b153b74559d9e3a6456ea5f0eaae03c8dcad79 [8/17] can: add ISO 15765-2:2016 transport protocol > config: x86_64-randconfig-m001-20201005 (attached as .config) > compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot <lkp@xxxxxxxxx> > > smatch warnings: > net/can/isotp.c:1159 isotp_setsockopt() warn: unsigned 'optlen' is never less than zero. > > vim +/optlen +1159 net/can/isotp.c > > 1149 > 1150 static int isotp_setsockopt(struct socket *sock, int level, int optname, > 1151 sockptr_t optval, unsigned int optlen) > 1152 { > 1153 struct sock *sk = sock->sk; > 1154 struct isotp_sock *so = isotp_sk(sk); > 1155 int ret = 0; > 1156 > 1157 if (level != SOL_CAN_ISOTP) > 1158 return -EINVAL; >> 1159 if (optlen < 0) > 1160 return -EINVAL; I'll just delete that line. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: OpenPGP digital signature