mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	"André Almeida" <andrealmeid@collabora.com>
Subject: kernel/futex/syscalls.c:29:1: sparse: sparse: Using plain integer as NULL pointer
Date: Fri, 26 Nov 2021 02:22:46 +0800	[thread overview]
Message-ID: <202111260248.R4wPhIDu-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   5f53fa508db098c9d372423a6dac31c8a5679cdf
commit: af8cc9600bbf2251b04c56139f7c83f87c3f878a futex: Split out syscalls
date:   7 weeks ago
config: s390-randconfig-s031-20211116 (https://download.01.org/0day-ci/archive/20211126/202111260248.R4wPhIDu-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 11.2.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.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=af8cc9600bbf2251b04c56139f7c83f87c3f878a
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout af8cc9600bbf2251b04c56139f7c83f87c3f878a
        # save the config file to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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 >>)
>> kernel/futex/syscalls.c:29:1: sparse: sparse: Using plain integer as NULL pointer
>> kernel/futex/syscalls.c:29:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:51:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:51:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:51:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:51:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:180:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:180:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:180:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:180:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:180:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:180:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:203:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:203:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:218:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:218:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:218:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:218:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:259:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:259:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:259:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:259:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:259:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:259:1: sparse: sparse: Using plain integer as NULL pointer

vim +29 kernel/futex/syscalls.c

     8	
     9	/*
    10	 * Support for robust futexes: the kernel cleans up held futexes at
    11	 * thread exit time.
    12	 *
    13	 * Implementation: user-space maintains a per-thread list of locks it
    14	 * is holding. Upon do_exit(), the kernel carefully walks this list,
    15	 * and marks all locks that are owned by this thread with the
    16	 * FUTEX_OWNER_DIED bit, and wakes up a waiter (if any). The list is
    17	 * always manipulated with the lock held, so the list is private and
    18	 * per-thread. Userspace also maintains a per-thread 'list_op_pending'
    19	 * field, to allow the kernel to clean up if the thread dies after
    20	 * acquiring the lock, but just before it could have added itself to
    21	 * the list. There can only be one such pending lock.
    22	 */
    23	
    24	/**
    25	 * sys_set_robust_list() - Set the robust-futex list head of a task
    26	 * @head:	pointer to the list-head
    27	 * @len:	length of the list-head, as userspace expects
    28	 */
  > 29	SYSCALL_DEFINE2(set_robust_list, struct robust_list_head __user *, head,
    30			size_t, len)
    31	{
    32		if (!futex_cmpxchg_enabled)
    33			return -ENOSYS;
    34		/*
    35		 * The kernel knows only one size for now:
    36		 */
    37		if (unlikely(len != sizeof(*head)))
    38			return -EINVAL;
    39	
    40		current->robust_list = head;
    41	
    42		return 0;
    43	}
    44	

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

                 reply	other threads:[~2021-11-25 18:25 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=202111260248.R4wPhIDu-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrealmeid@collabora.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    /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

Powered by JetHome