CC: kbuild-...@lists.01.org
CC: "Darrick J. Wong" <darrick.w...@oracle.com>
TO: "Darrick J. Wong" <darrick.w...@oracle.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git 
repair-metadata-atomically
head:   d334005df02786c9f288f2c7060603e9680946b5
commit: 4dafcd0f4f188da560e3610a0b8dd95668ce9fba [224/229] xfs: remove old swap 
extents implementation
:::::: branch date: 29 hours ago
:::::: commit date: 29 hours ago
config: s390-randconfig-s002-20200524 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-240-gf0fe1cd9-dirty
        git checkout 4dafcd0f4f188da560e3610a0b8dd95668ce9fba
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=s390 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <l...@intel.com>


sparse warnings: (new ones prefixed by >>)

   fs/xfs/xfs_ioctl.c:1866:1: sparse: sparse: symbol 'xfs_ioc_swapext' 
redeclared with different type (incompatible argument 1 (different address 
spaces)):
>> fs/xfs/xfs_ioctl.c:1866:1: sparse:    int extern [addressable] [signed] 
>> [toplevel] xfs_ioc_swapext( ... )
   fs/xfs/xfs_ioctl.h:20:1: sparse: note: previously declared as:
>> fs/xfs/xfs_ioctl.h:20:1: sparse:    int extern [addressable] [signed] 
>> [toplevel] xfs_ioc_swapext( ... )

# 
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/commit/?id=4dafcd0f4f188da560e3610a0b8dd95668ce9fba
git remote add djwong-xfs 
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git remote update djwong-xfs
git checkout 4dafcd0f4f188da560e3610a0b8dd95668ce9fba
vim +1866 fs/xfs/xfs_ioctl.c

36fd6e863cb7329 Darrick J. Wong 2017-10-17  1864  
a133d952b44cef2 Dave Chinner    2013-08-12  1865  int
a133d952b44cef2 Dave Chinner    2013-08-12 @1866  xfs_ioc_swapext(
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1867        struct xfs_swapext      
__user *arg)
a133d952b44cef2 Dave Chinner    2013-08-12  1868  {
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1869        struct xfs_swapext      
sx;
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1870        struct file_swap_range  
fsr = { 0 };
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1871        struct fd               
fd2, fd1;
a133d952b44cef2 Dave Chinner    2013-08-12  1872        int                     
error = 0;
a133d952b44cef2 Dave Chinner    2013-08-12  1873  
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1874        if (copy_from_user(&sx, 
arg, sizeof(struct xfs_swapext)))
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1875                return -EFAULT;
a133d952b44cef2 Dave Chinner    2013-08-12  1876  
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1877        fd2 = 
fdget((int)sx.sx_fdtarget);
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1878        if (!fd2.file)
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1879                return -EINVAL;
a133d952b44cef2 Dave Chinner    2013-08-12  1880  
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1881        fd1 = 
fdget((int)sx.sx_fdtmp);
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1882        if (!fd1.file) {
2451337dd043901 Dave Chinner    2014-06-25  1883                error = -EINVAL;
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1884                goto dest_fdput;
a133d952b44cef2 Dave Chinner    2013-08-12  1885        }
a133d952b44cef2 Dave Chinner    2013-08-12  1886  
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1887        fsr.file1_fd = 
sx.sx_fdtmp;
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1888        fsr.length = 
sx.sx_length;
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1889        fsr.flags = 
FILE_SWAP_RANGE_NONATOMIC | FILE_SWAP_RANGE_FILE2_FRESH |
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1890                    
FILE_SWAP_RANGE_FULL_FILES;
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1891        fsr.file2_ino = 
sx.sx_stat.bs_ino;
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1892        fsr.file2_mtime = 
sx.sx_stat.bs_mtime.tv_sec;
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1893        fsr.file2_ctime = 
sx.sx_stat.bs_ctime.tv_sec;
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1894        fsr.file2_mtime_nsec = 
sx.sx_stat.bs_mtime.tv_nsec;
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1895        fsr.file2_ctime_nsec = 
sx.sx_stat.bs_ctime.tv_nsec;
a133d952b44cef2 Dave Chinner    2013-08-12  1896  
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1897        error = 
vfs_swap_file_range(fd1.file, fd2.file, &fsr);
a133d952b44cef2 Dave Chinner    2013-08-12  1898  
7f1b62457b58f9b Jann Horn       2016-07-20  1899        /*
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1900         * The old 
implementation returned EFAULT if the swap range was not
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1901         * the entirety of both 
files.
7f1b62457b58f9b Jann Horn       2016-07-20  1902         */
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1903        if (error == -EDOM)
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1904                error = -EFAULT;
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1905        fdput(fd1);
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1906  dest_fdput:
4dafcd0f4f188da Darrick J. Wong 2020-03-30  1907        fdput(fd2);
a133d952b44cef2 Dave Chinner    2013-08-12  1908        return error;
a133d952b44cef2 Dave Chinner    2013-08-12  1909  }
a133d952b44cef2 Dave Chinner    2013-08-12  1910  

:::::: The code at line 1866 was first introduced by commit
:::::: a133d952b44cef278d2da664d742d51ef95f4dd3 xfs: consolidate extent swap 
code

:::::: TO: Dave Chinner <dchin...@redhat.com>
:::::: CC: Ben Myers <b...@sgi.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to