[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201903231402.KFLVGATu%lkp@intel.com>
Date: Sat, 23 Mar 2019 14:41:50 +0800
From: kbuild test robot <lkp@...el.com>
To: Yi-Hung Wei <yihung.wei@...il.com>
Cc: kbuild-all@...org, netdev@...r.kernel.org,
Yi-Hung Wei <yihung.wei@...il.com>,
Pablo Neira Ayuso <pablo@...filter.org>
Subject: Re: [PATCH net-next 1/2] netfilter: Export nf_ct_destroy_timeout()
Hi Yi-Hung,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Yi-Hung-Wei/netfilter-Export-nf_ct_destroy_timeout/20190323-094843
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
sparse warnings: (new ones prefixed by >>)
net//netfilter/nf_conntrack_timeout.c:38:62: sparse: incompatible types in comparison expression (different base types)
>> net//netfilter/nf_conntrack_timeout.c:58:23: sparse: incompatible types in comparison expression (different address spaces)
vim +58 net//netfilter/nf_conntrack_timeout.c
33
34 static int untimeout(struct nf_conn *ct, void *timeout)
35 {
36 struct nf_conn_timeout *timeout_ext = nf_ct_timeout_find(ct);
37
> 38 if (timeout_ext && (!timeout || timeout_ext->timeout == timeout))
39 RCU_INIT_POINTER(timeout_ext->timeout, NULL);
40
41 /* We are not intended to delete this conntrack. */
42 return 0;
43 }
44
45 void nf_ct_untimeout(struct net *net, struct nf_ct_timeout *timeout)
46 {
47 nf_ct_iterate_cleanup_net(net, untimeout, timeout, 0, 0);
48 }
49 EXPORT_SYMBOL_GPL(nf_ct_untimeout);
50
51 void nf_ct_destroy_timeout(struct nf_conn *ct)
52 {
53 #ifdef CONFIG_NF_CONNTRACK_TIMEOUT
54 struct nf_conn_timeout *timeout_ext;
55 typeof(nf_ct_timeout_put_hook) timeout_put;
56
57 rcu_read_lock();
> 58 timeout_put = rcu_dereference(nf_ct_timeout_put_hook);
59
60 if (timeout_put) {
61 timeout_ext = nf_ct_timeout_find(ct);
62 if (timeout_ext) {
63 timeout_put(timeout_ext->timeout);
64 RCU_INIT_POINTER(timeout_ext->timeout, NULL);
65 }
66 }
67 rcu_read_unlock();
68 #endif
69 }
70 EXPORT_SYMBOL_GPL(nf_ct_destroy_timeout);
71
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Powered by blists - more mailing lists