tree:
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rxgk
head: 7f002a9b47c3c704b8ccdd1e900b04cd10a44285
commit: 6b9115ba99232a4775b3572048f8462aad710d22 [15/18] rxrpc: Hand server key parsing
off to the security class
config: i386-randconfig-m021-20200920 (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(a)intel.com>
New smatch warnings:
net/rxrpc/server_key.c:82 rxrpc_preparse_s() warn: unsigned 'sec' is never less
than zero.
Old smatch warnings:
net/rxrpc/server_key.c:126 rxrpc_server_keyring() warn: passing a valid pointer to
'PTR_ERR'
#
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/com...
git remote add dhowells-fs
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs rxrpc-rxgk
git checkout 6b9115ba99232a4775b3572048f8462aad710d22
vim +/sec +82 net/rxrpc/server_key.c
63
64 /*
65 * Preparse a server secret key.
66 */
67 static int rxrpc_preparse_s(struct key_preparsed_payload *prep)
68 {
69 const struct rxrpc_security *sec;
70 unsigned int service, sec_class;
71 int n;
72
73 _enter("%zu", prep->datalen);
74
75 if (!prep->orig_description)
76 return -EINVAL;
77
78 if (sscanf(prep->orig_description, "%u:%u%n", &service,
&sec_class, &n) != 2)
79 return -EINVAL;
80
81 sec = rxrpc_security_lookup(sec_class);
82 if (sec < 0)
83 return -ENOPKG;
84
85 prep->payload.data[1] = (struct rxrpc_security *)sec;
86
87 return sec->preparse_server_key(prep);
88 }
89
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org