From: kernel test robot <lkp@intel.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [gfs2:for-next.mmap-fault 3/12] mm/gup.c:1685:23: sparse: sparse: Using plain integer as NULL pointer
Date: Tue, 3 Aug 2021 20:01:36 +0800 [thread overview]
Message-ID: <202108032033.NanOhpwb-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git for-next.mmap-fault
head: bfd94d74183df4cc99a705b96f2be61a865e5564
commit: 88a42059bb37be7ced7c0f4a62de07195bd7074e [3/12] Turn fault_in_pages_{readable,writeable} into fault_in_{readable,writeable}
config: s390-randconfig-s031-20210803 (attached as .config)
compiler: s390-linux-gcc (GCC) 10.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/?id=88a42059bb37be7ced7c0f4a62de07195bd7074e
git remote add gfs2 https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
git fetch --no-tags gfs2 for-next.mmap-fault
git checkout 88a42059bb37be7ced7c0f4a62de07195bd7074e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> mm/gup.c:1685:23: sparse: sparse: Using plain integer as NULL pointer
mm/gup.c:1711:23: sparse: sparse: Using plain integer as NULL pointer
vim +1685 mm/gup.c
1671
1672 size_t fault_in_writeable(char __user *uaddr, size_t size)
1673 {
1674 char __user *start = uaddr, *end;
1675
1676 if (unlikely(size == 0))
1677 return 0;
1678 if ((unsigned long)uaddr & ~PAGE_MASK) {
1679 if (unlikely(__put_user(0, uaddr) != 0))
1680 return 0;
1681 uaddr = (char __user *)((unsigned long)uaddr | ~PAGE_MASK) + 1;
1682 }
1683 end = (char __user *)PAGE_ALIGN((unsigned long)uaddr + size);
1684 if (unlikely(end < uaddr))
> 1685 end = 0;
1686 while (uaddr != end) {
1687 if (unlikely(__put_user(0, uaddr) != 0))
1688 goto out;
1689 uaddr += PAGE_SIZE;
1690 }
1691
1692 out:
1693 return min_t(size_t, uaddr - start, size);
1694 }
1695 EXPORT_SYMBOL(fault_in_writeable);
1696
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all at lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 41764 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20210803/d7f83c03/attachment.gz>
reply other threads:[~2021-08-03 12:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202108032033.NanOhpwb-lkp@intel.com \
--to=lkp@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).