[vfs:fixes 2/2] fs/aio.c:2196:38: note: in expansion of macro 'NULL'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git fixes
head:   23d1d41583726b7f9be0d069932490db8bd6711e
commit: 23d1d41583726b7f9be0d069932490db8bd6711e [2/2] aio: Fix io_pgetevents() struct __compat_aio_sigset layout
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 23d1d41583726b7f9be0d069932490db8bd6711e
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/posix_types.h:5:0,
                    from include/uapi/linux/types.h:14,
                    from include/linux/types.h:6,
                    from include/linux/limits.h:6,
                    from include/linux/kernel.h:7,
                    from fs/aio.c:14:
   fs/aio.c: In function '__do_compat_sys_io_pgetevents':
>> include/linux/stddef.h:8:14: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
    #define NULL ((void *)0)
                 ^
>> fs/aio.c:2196:38: note: in expansion of macro 'NULL'
     struct __compat_aio_sigset ksig = { NULL, };
                                         ^~~~
   include/linux/stddef.h:8:14: note: (near initialization for 'ksig.sigmask')
    #define NULL ((void *)0)
                 ^
>> fs/aio.c:2196:38: note: in expansion of macro 'NULL'
     struct __compat_aio_sigset ksig = { NULL, };
                                         ^~~~
   fs/aio.c: In function '__do_compat_sys_io_pgetevents_time64':
>> include/linux/stddef.h:8:14: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
    #define NULL ((void *)0)
                 ^
   fs/aio.c:2231:38: note: in expansion of macro 'NULL'
     struct __compat_aio_sigset ksig = { NULL, };
                                         ^~~~
   include/linux/stddef.h:8:14: note: (near initialization for 'ksig.sigmask')
    #define NULL ((void *)0)
                 ^
   fs/aio.c:2231:38: note: in expansion of macro 'NULL'
     struct __compat_aio_sigset ksig = { NULL, };
                                         ^~~~

vim +/NULL +2196 fs/aio.c

7a35397f8c06bf Deepa Dinamani    2018-09-19  2187  
7a074e96dee625 Christoph Hellwig 2018-05-02  2188  COMPAT_SYSCALL_DEFINE6(io_pgetevents,
7a074e96dee625 Christoph Hellwig 2018-05-02  2189  		compat_aio_context_t, ctx_id,
7a074e96dee625 Christoph Hellwig 2018-05-02  2190  		compat_long_t, min_nr,
7a074e96dee625 Christoph Hellwig 2018-05-02  2191  		compat_long_t, nr,
7a074e96dee625 Christoph Hellwig 2018-05-02  2192  		struct io_event __user *, events,
9afc5eee65ca7d Arnd Bergmann     2018-07-13  2193  		struct old_timespec32 __user *, timeout,
7a074e96dee625 Christoph Hellwig 2018-05-02  2194  		const struct __compat_aio_sigset __user *, usig)
7a074e96dee625 Christoph Hellwig 2018-05-02  2195  {
7a074e96dee625 Christoph Hellwig 2018-05-02 @2196  	struct __compat_aio_sigset ksig = { NULL, };
7a074e96dee625 Christoph Hellwig 2018-05-02  2197  	struct timespec64 t;
97abc889ee296f Oleg Nesterov     2019-06-28  2198  	bool interrupted;
7a074e96dee625 Christoph Hellwig 2018-05-02  2199  	int ret;
7a074e96dee625 Christoph Hellwig 2018-05-02  2200  
9afc5eee65ca7d Arnd Bergmann     2018-07-13  2201  	if (timeout && get_old_timespec32(&t, timeout))
7a074e96dee625 Christoph Hellwig 2018-05-02  2202  		return -EFAULT;
7a074e96dee625 Christoph Hellwig 2018-05-02  2203  
7a074e96dee625 Christoph Hellwig 2018-05-02  2204  	if (usig && copy_from_user(&ksig, usig, sizeof(ksig)))
7a074e96dee625 Christoph Hellwig 2018-05-02  2205  		return -EFAULT;
7a074e96dee625 Christoph Hellwig 2018-05-02  2206  
23d1d41583726b Guillem Jover     2019-08-21  2207  	ret = set_compat_user_sigmask(compat_ptr(ksig.sigmask), ksig.sigsetsize);
ded653ccbec033 Deepa Dinamani    2018-09-19  2208  	if (ret)
ded653ccbec033 Deepa Dinamani    2018-09-19  2209  		return ret;
7a074e96dee625 Christoph Hellwig 2018-05-02  2210  
7a074e96dee625 Christoph Hellwig 2018-05-02  2211  	ret = do_io_getevents(ctx_id, min_nr, nr, events, timeout ? &t : NULL);
97abc889ee296f Oleg Nesterov     2019-06-28  2212  
97abc889ee296f Oleg Nesterov     2019-06-28  2213  	interrupted = signal_pending(current);
b772434be0891e Oleg Nesterov     2019-07-16  2214  	restore_saved_sigmask_unless(interrupted);
97abc889ee296f Oleg Nesterov     2019-06-28  2215  	if (interrupted && !ret)
7a074e96dee625 Christoph Hellwig 2018-05-02  2216  		ret = -ERESTARTNOHAND;
7a074e96dee625 Christoph Hellwig 2018-05-02  2217  
7a074e96dee625 Christoph Hellwig 2018-05-02  2218  	return ret;
7a074e96dee625 Christoph Hellwig 2018-05-02  2219  }
7a074e96dee625 Christoph Hellwig 2018-05-02  2220  

:::::: The code at line 2196 was first introduced by commit
:::::: 7a074e96dee62586c935c80cecd931431bfdd0be aio: implement io_pgetevents

:::::: TO: Christoph Hellwig <hch@xxxxxx>
:::::: CC: Christoph Hellwig <hch@xxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux