Hi Subash, I love your patch! Perhaps something to improve: [auto build test WARNING on nf/master] url: https://github.com/0day-ci/linux/commits/Subash-Abhinov-Kasiviswanathan/netfilter-x_tables-Switch-synchronization-to-RCU/20201123-032122 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master config: i386-randconfig-s002-20201125 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-151-g540c2c4b-dirty # https://github.com/0day-ci/linux/commit/2d87a7da9e77a1c31af435d23238e60d0067aac0 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Subash-Abhinov-Kasiviswanathan/netfilter-x_tables-Switch-synchronization-to-RCU/20201123-032122 git checkout 2d87a7da9e77a1c31af435d23238e60d0067aac0 # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> "sparse warnings: (new ones prefixed by >>)" >> net/ipv4/netfilter/arp_tables.c:810:56: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct xt_table_info const *private @@ got struct xt_table_info [noderef] __rcu *private @@ >> net/ipv4/netfilter/arp_tables.c:810:56: sparse: expected struct xt_table_info const *private >> net/ipv4/netfilter/arp_tables.c:810:56: sparse: got struct xt_table_info [noderef] __rcu *private net/ipv4/netfilter/arp_tables.c:863:56: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct xt_table_info const *private @@ got struct xt_table_info [noderef] __rcu *private @@ net/ipv4/netfilter/arp_tables.c:863:56: sparse: expected struct xt_table_info const *private net/ipv4/netfilter/arp_tables.c:863:56: sparse: got struct xt_table_info [noderef] __rcu *private >> net/ipv4/netfilter/arp_tables.c:1020:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct xt_table_info const *private @@ got struct xt_table_info [noderef] __rcu *private @@ net/ipv4/netfilter/arp_tables.c:1020:17: sparse: expected struct xt_table_info const *private net/ipv4/netfilter/arp_tables.c:1020:17: sparse: got struct xt_table_info [noderef] __rcu *private net/ipv4/netfilter/arp_tables.c:40:16: sparse: sparse: Initializer entry defined twice net/ipv4/netfilter/arp_tables.c:40:16: sparse: also defined here net/ipv4/netfilter/arp_tables.c:40:16: sparse: sparse: Initializer entry defined twice net/ipv4/netfilter/arp_tables.c:40:16: sparse: also defined here vim +810 net/ipv4/netfilter/arp_tables.c d6a2ba07c31b049 Patrick McHardy 2007-12-17 789 983094b4fc2d6a0 Christoph Hellwig 2020-07-17 790 static int get_info(struct net *net, void __user *user, const int *len) 41acd975b954ad6 Patrick McHardy 2007-12-17 791 { 12b00c2c025b8af Jan Engelhardt 2010-10-13 792 char name[XT_TABLE_MAXNAMELEN]; 4abff0775d5e4fe Jan Engelhardt 2008-04-14 793 struct xt_table *t; 41acd975b954ad6 Patrick McHardy 2007-12-17 794 int ret; 41acd975b954ad6 Patrick McHardy 2007-12-17 795 d7cdf81657776ca Pablo Neira Ayuso 2016-05-03 796 if (*len != sizeof(struct arpt_getinfo)) 41acd975b954ad6 Patrick McHardy 2007-12-17 797 return -EINVAL; 41acd975b954ad6 Patrick McHardy 2007-12-17 798 41acd975b954ad6 Patrick McHardy 2007-12-17 799 if (copy_from_user(name, user, sizeof(name)) != 0) 41acd975b954ad6 Patrick McHardy 2007-12-17 800 return -EFAULT; 41acd975b954ad6 Patrick McHardy 2007-12-17 801 12b00c2c025b8af Jan Engelhardt 2010-10-13 802 name[XT_TABLE_MAXNAMELEN-1] = '\0'; d6a2ba07c31b049 Patrick McHardy 2007-12-17 803 #ifdef CONFIG_COMPAT 983094b4fc2d6a0 Christoph Hellwig 2020-07-17 804 if (in_compat_syscall()) ee999d8b9573df1 Jan Engelhardt 2008-10-08 805 xt_compat_lock(NFPROTO_ARP); d6a2ba07c31b049 Patrick McHardy 2007-12-17 806 #endif 03d13b6868a261f Florian Westphal 2017-12-08 807 t = xt_request_find_table_lock(net, NFPROTO_ARP, name); 03d13b6868a261f Florian Westphal 2017-12-08 808 if (!IS_ERR(t)) { 41acd975b954ad6 Patrick McHardy 2007-12-17 809 struct arpt_getinfo info; 5452e425adfdfc4 Jan Engelhardt 2008-04-14 @810 const struct xt_table_info *private = t->private; d6a2ba07c31b049 Patrick McHardy 2007-12-17 811 #ifdef CONFIG_COMPAT d6a2ba07c31b049 Patrick McHardy 2007-12-17 812 struct xt_table_info tmp; 14c7dbe043d01a8 Alexey Dobriyan 2010-02-08 813 983094b4fc2d6a0 Christoph Hellwig 2020-07-17 814 if (in_compat_syscall()) { d6a2ba07c31b049 Patrick McHardy 2007-12-17 815 ret = compat_table_info(private, &tmp); ee999d8b9573df1 Jan Engelhardt 2008-10-08 816 xt_compat_flush_offsets(NFPROTO_ARP); d6a2ba07c31b049 Patrick McHardy 2007-12-17 817 private = &tmp; d6a2ba07c31b049 Patrick McHardy 2007-12-17 818 } d6a2ba07c31b049 Patrick McHardy 2007-12-17 819 #endif 1a8b7a67224eb0c Vasiliy Kulikov 2010-11-03 820 memset(&info, 0, sizeof(info)); 41acd975b954ad6 Patrick McHardy 2007-12-17 821 info.valid_hooks = t->valid_hooks; 41acd975b954ad6 Patrick McHardy 2007-12-17 822 memcpy(info.hook_entry, private->hook_entry, 41acd975b954ad6 Patrick McHardy 2007-12-17 823 sizeof(info.hook_entry)); 41acd975b954ad6 Patrick McHardy 2007-12-17 824 memcpy(info.underflow, private->underflow, 41acd975b954ad6 Patrick McHardy 2007-12-17 825 sizeof(info.underflow)); 41acd975b954ad6 Patrick McHardy 2007-12-17 826 info.num_entries = private->number; 41acd975b954ad6 Patrick McHardy 2007-12-17 827 info.size = private->size; 41acd975b954ad6 Patrick McHardy 2007-12-17 828 strcpy(info.name, name); 41acd975b954ad6 Patrick McHardy 2007-12-17 829 41acd975b954ad6 Patrick McHardy 2007-12-17 830 if (copy_to_user(user, &info, *len) != 0) 41acd975b954ad6 Patrick McHardy 2007-12-17 831 ret = -EFAULT; 41acd975b954ad6 Patrick McHardy 2007-12-17 832 else 41acd975b954ad6 Patrick McHardy 2007-12-17 833 ret = 0; 41acd975b954ad6 Patrick McHardy 2007-12-17 834 xt_table_unlock(t); 41acd975b954ad6 Patrick McHardy 2007-12-17 835 module_put(t->me); 41acd975b954ad6 Patrick McHardy 2007-12-17 836 } else 03d13b6868a261f Florian Westphal 2017-12-08 837 ret = PTR_ERR(t); d6a2ba07c31b049 Patrick McHardy 2007-12-17 838 #ifdef CONFIG_COMPAT 983094b4fc2d6a0 Christoph Hellwig 2020-07-17 839 if (in_compat_syscall()) ee999d8b9573df1 Jan Engelhardt 2008-10-08 840 xt_compat_unlock(NFPROTO_ARP); d6a2ba07c31b049 Patrick McHardy 2007-12-17 841 #endif 41acd975b954ad6 Patrick McHardy 2007-12-17 842 return ret; 41acd975b954ad6 Patrick McHardy 2007-12-17 843 } 41acd975b954ad6 Patrick McHardy 2007-12-17 844 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip