Hi Sabrina,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net/master]

url:    
https://github.com/0day-ci/linux/commits/Sabrina-Dubroca/ipmr-fix-error-path-when-mr_table_alloc-fails/20180605-060837
config: x86_64-randconfig-x006-201822 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/current.h:5:0,
                    from include/linux/sched.h:12,
                    from include/linux/uaccess.h:5,
                    from net/ipv6/ip6mr.c:19:
   net/ipv6/ip6mr.c: In function 'ip6_mroute_setsockopt':
>> include/linux/compiler.h:177:26: warning: 'mrt' may be used uninitialized in 
>> this function [-Wmaybe-uninitialized]
     case 8: *(__u64 *)res = *(volatile __u64 *)p; break;  \
                             ^
   net/ipv6/ip6mr.c:1751:20: note: 'mrt' was declared here
      struct mr_table *mrt;
                       ^~~
--
   In file included from arch/x86/include/asm/current.h:5:0,
                    from include/linux/sched.h:12,
                    from include/linux/uaccess.h:5,
                    from net//ipv6/ip6mr.c:19:
   net//ipv6/ip6mr.c: In function 'ip6_mroute_setsockopt':
>> include/linux/compiler.h:177:26: warning: 'mrt' may be used uninitialized in 
>> this function [-Wmaybe-uninitialized]
     case 8: *(__u64 *)res = *(volatile __u64 *)p; break;  \
                             ^
   net//ipv6/ip6mr.c:1751:20: note: 'mrt' was declared here
      struct mr_table *mrt;
                       ^~~

vim +/mrt +177 include/linux/compiler.h

230fa253 Christian Borntraeger 2014-11-25  170  
d976441f Andrey Ryabinin       2015-10-19  171  #define __READ_ONCE_SIZE        
                                        \
d976441f Andrey Ryabinin       2015-10-19  172  ({                              
                                        \
d976441f Andrey Ryabinin       2015-10-19  173          switch (size) {         
                                        \
d976441f Andrey Ryabinin       2015-10-19  174          case 1: *(__u8 *)res = 
*(volatile __u8 *)p; break;              \
d976441f Andrey Ryabinin       2015-10-19  175          case 2: *(__u16 *)res = 
*(volatile __u16 *)p; break;            \
d976441f Andrey Ryabinin       2015-10-19  176          case 4: *(__u32 *)res = 
*(volatile __u32 *)p; break;            \
d976441f Andrey Ryabinin       2015-10-19 @177          case 8: *(__u64 *)res = 
*(volatile __u64 *)p; break;            \
d976441f Andrey Ryabinin       2015-10-19  178          default:                
                                        \
d976441f Andrey Ryabinin       2015-10-19  179                  barrier();      
                                        \
d976441f Andrey Ryabinin       2015-10-19  180                  
__builtin_memcpy((void *)res, (const void *)p, size);   \
d976441f Andrey Ryabinin       2015-10-19  181                  barrier();      
                                        \
d976441f Andrey Ryabinin       2015-10-19  182          }                       
                                        \
d976441f Andrey Ryabinin       2015-10-19  183  })
d976441f Andrey Ryabinin       2015-10-19  184  

:::::: The code at line 177 was first introduced by commit
:::::: d976441f44bc5d48635d081d277aa76556ffbf8b compiler, atomics, kasan: 
Provide READ_ONCE_NOCHECK()

:::::: TO: Andrey Ryabinin <aryabi...@virtuozzo.com>
:::::: CC: Ingo Molnar <mi...@kernel.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to