Hi Leonard,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on 2a2b6e3640c43a808dcb5226963e2cc0669294b1]
url:
https://github.com/0day-ci/linux/commits/Leonard-Crestez/tcp-Initial-supp...
base: 2a2b6e3640c43a808dcb5226963e2cc0669294b1
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 10.3.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/0day-ci/linux/commit/005169774b59da76d502cc81cfd0bcfb4...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Leonard-Crestez/tcp-Initial-support-for-RFC5925-auth-option/20210810-053824
git checkout 005169774b59da76d502cc81cfd0bcfb4f6af7b3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> net/ipv4/tcp_authopt.c:9:30: warning: no previous prototype for
'__tcp_authopt_key_info_lookup' [-Wmissing-prototypes]
9 | struct
tcp_authopt_key_info *__tcp_authopt_key_info_lookup(const struct sock *sk,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/ipv4/tcp_authopt.c: In function 'tcp_set_authopt':
net/ipv4/tcp_authopt.c:60:62: error: expected ';' before ')' token
60 | info->flags = opt.flags & TCP_AUTHOPT_FLAG_REJECT_UNEXPECTED);
| ^
| ;
net/ipv4/tcp_authopt.c:60:62: error: expected statement before ')' token
net/ipv4/tcp_authopt.c: At top level:
> net/ipv4/tcp_authopt.c:90:6: warning: no previous prototype for
'__tcp_authopt_info_free' [-Wmissing-prototypes]
90 | void
__tcp_authopt_info_free(struct sock *sk, struct tcp_authopt_info *info)
| ^~~~~~~~~~~~~~~~~~~~~~~
vim +/__tcp_authopt_key_info_lookup +9 net/ipv4/tcp_authopt.c
8
9 struct tcp_authopt_key_info *__tcp_authopt_key_info_lookup(const
struct sock *sk,
10 struct tcp_authopt_info *info,
11 int key_id)
12 {
13 struct tcp_authopt_key_info *key;
14
15 hlist_for_each_entry_rcu(key, &info->head, node, lockdep_sock_is_held(sk))
16 if (key->local_id == key_id)
17 return key;
18
19 return NULL;
20 }
21
22 static struct tcp_authopt_info *__tcp_authopt_info_get_or_create(struct sock *sk)
23 {
24 struct tcp_sock *tp = tcp_sk(sk);
25 struct tcp_authopt_info *info;
26
27 info = rcu_dereference_check(tp->authopt_info, lockdep_sock_is_held(sk));
28 if (info)
29 return info;
30
31 info = kmalloc(sizeof(*info), GFP_KERNEL | __GFP_ZERO);
32 if (!info)
33 return ERR_PTR(-ENOMEM);
34
35 sk_nocaps_add(sk, NETIF_F_GSO_MASK);
36 INIT_HLIST_HEAD(&info->head);
37 rcu_assign_pointer(tp->authopt_info, info);
38
39 return info;
40 }
41
42 int tcp_set_authopt(struct sock *sk, sockptr_t optval, unsigned int optlen)
43 {
44 struct tcp_authopt opt;
45 struct tcp_authopt_info *info;
46
47 WARN_ON(!lockdep_sock_is_held(sk));
48
49 /* If userspace optlen is too short fill the rest with zeros */
50 if (optlen > sizeof(opt))
51 return -EINVAL;
52 memset(&opt, 0, sizeof(opt));
53 if (copy_from_sockptr(&opt, optval, optlen))
54 return -EFAULT;
55
56 info = __tcp_authopt_info_get_or_create(sk);
57 if (IS_ERR(info))
58 return PTR_ERR(info);
59
60 info->flags = opt.flags & TCP_AUTHOPT_FLAG_REJECT_UNEXPECTED);
61
62 return 0;
63 }
64
65 int tcp_get_authopt_val(struct sock *sk, struct tcp_authopt *opt)
66 {
67 struct tcp_sock *tp = tcp_sk(sk);
68 struct tcp_authopt_info *info;
69
70 WARN_ON(!lockdep_sock_is_held(sk));
71 memset(opt, 0, sizeof(*opt));
72 info = rcu_dereference_check(tp->authopt_info, lockdep_sock_is_held(sk));
73 if (!info)
74 return -EINVAL;
75 opt->flags = info->flags & TCP_AUTHOPT_FLAG_REJECT_UNEXPECTED;
76
77 return 0;
78 }
79
80 static void tcp_authopt_key_del(struct sock *sk,
81 struct tcp_authopt_info *info,
82 struct tcp_authopt_key_info *key)
83 {
84 hlist_del_rcu(&key->node);
85 atomic_sub(sizeof(*key), &sk->sk_omem_alloc);
86 kfree_rcu(key, rcu);
87 }
88
89 /* free info and keys but don't touch tp->authopt_info */
90 void __tcp_authopt_info_free(struct sock *sk, struct
tcp_authopt_info *info)
91 {
92 struct hlist_node *n;
93 struct tcp_authopt_key_info *key;
94
95 hlist_for_each_entry_safe(key, n, &info->head, node)
96 tcp_authopt_key_del(sk, info, key);
97 kfree_rcu(info, rcu);
98 }
99
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org