[congwang:bpf2 1/4] include/linux/skmsg.h:462:43: error: 'sock_map_close' undeclared; did you mean 'sk_msg_clone'?
From: kernel test robot
Date: Mon Sep 27 2021 - 18:51:46 EST
tree: https://github.com/congwang/linux.git bpf2
head: ec3836e59604af89a5f07045ea7a3a1f60ff2cf4
commit: 2efd7231bb06db2dc0ca0414b9873aa139d9684c [1/4] skmsg: introduce sk_psock_get_checked()
config: nds32-buildonly-randconfig-r002-20210927 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/congwang/linux/commit/2efd7231bb06db2dc0ca0414b9873aa139d9684c
git remote add congwang https://github.com/congwang/linux.git
git fetch --no-tags congwang bpf2
git checkout 2efd7231bb06db2dc0ca0414b9873aa139d9684c
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash kernel/bpf/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from kernel/bpf/btf.c:22:
include/linux/skmsg.h: In function 'sk_psock_get_checked':
>> include/linux/skmsg.h:462:43: error: 'sock_map_close' undeclared (first use in this function); did you mean 'sk_msg_clone'?
462 | if (sk->sk_prot->close != sock_map_close) {
| ^~~~~~~~~~~~~~
| sk_msg_clone
include/linux/skmsg.h:462:43: note: each undeclared identifier is reported only once for each function it appears in
kernel/bpf/btf.c: In function 'btf_seq_show':
kernel/bpf/btf.c:5748:29: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
5748 | seq_vprintf((struct seq_file *)show->target, fmt, args);
| ^~~~~~~~
kernel/bpf/btf.c: In function 'btf_snprintf_show':
kernel/bpf/btf.c:5785:9: warning: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
5785 | len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
| ^~~
vim +462 include/linux/skmsg.h
454
455 static inline struct sk_psock *sk_psock_get_checked(struct sock *sk)
456 {
457 struct sk_psock *psock;
458
459 rcu_read_lock();
460 psock = sk_psock(sk);
461 if (psock) {
> 462 if (sk->sk_prot->close != sock_map_close) {
463 psock = ERR_PTR(-EBUSY);
464 goto out;
465 }
466
467 if (!refcount_inc_not_zero(&psock->refcnt))
468 psock = ERR_PTR(-EBUSY);
469 }
470 out:
471 rcu_read_unlock();
472 return psock;
473 }
474
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip