mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Christian Brauner <christian.brauner@ubuntu.com>
Subject: kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Thu, 28 May 2020 16:03:07 +0800	[thread overview]
Message-ID: <202005281603.vE3RY3ir%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5057 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b0c3ba31be3e45a130e13b278cf3b90f69bda6f6
commit: 913292c97d750fe4188b4f5aa770e5e0ca1e5a91 sched.h: Annotate sighand_struct with __rcu
date:   4 months ago
config: x86_64-randconfig-s022-20200528 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-240-gf0fe1cd9-dirty
        git checkout 913292c97d750fe4188b4f5aa770e5e0ca1e5a91
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

>> kernel/livepatch/transition.c:372:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] <asn:4> * @@
   kernel/livepatch/transition.c:372:44: sparse:     expected struct spinlock [usertype] *lock
   kernel/livepatch/transition.c:372:44: sparse:     got struct spinlock [noderef] <asn:4> *
   kernel/livepatch/transition.c:374:46: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] <asn:4> * @@
   kernel/livepatch/transition.c:374:46: sparse:     expected struct spinlock [usertype] *lock
   kernel/livepatch/transition.c:374:46: sparse:     got struct spinlock [noderef] <asn:4> *

vim +372 kernel/livepatch/transition.c

d83a7cb375eec2 Josh Poimboeuf 2017-02-13  338  
0b3d52790e1cfd Miroslav Benes 2019-01-15  339  /*
0b3d52790e1cfd Miroslav Benes 2019-01-15  340   * Sends a fake signal to all non-kthread tasks with TIF_PATCH_PENDING set.
0b3d52790e1cfd Miroslav Benes 2019-01-15  341   * Kthreads with TIF_PATCH_PENDING set are woken up.
0b3d52790e1cfd Miroslav Benes 2019-01-15  342   */
0b3d52790e1cfd Miroslav Benes 2019-01-15  343  static void klp_send_signals(void)
0b3d52790e1cfd Miroslav Benes 2019-01-15  344  {
0b3d52790e1cfd Miroslav Benes 2019-01-15  345  	struct task_struct *g, *task;
0b3d52790e1cfd Miroslav Benes 2019-01-15  346  
0b3d52790e1cfd Miroslav Benes 2019-01-15  347  	if (klp_signals_cnt == SIGNALS_TIMEOUT)
0b3d52790e1cfd Miroslav Benes 2019-01-15  348  		pr_notice("signaling remaining tasks\n");
0b3d52790e1cfd Miroslav Benes 2019-01-15  349  
0b3d52790e1cfd Miroslav Benes 2019-01-15  350  	read_lock(&tasklist_lock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  351  	for_each_process_thread(g, task) {
0b3d52790e1cfd Miroslav Benes 2019-01-15  352  		if (!klp_patch_pending(task))
0b3d52790e1cfd Miroslav Benes 2019-01-15  353  			continue;
0b3d52790e1cfd Miroslav Benes 2019-01-15  354  
0b3d52790e1cfd Miroslav Benes 2019-01-15  355  		/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  356  		 * There is a small race here. We could see TIF_PATCH_PENDING
0b3d52790e1cfd Miroslav Benes 2019-01-15  357  		 * set and decide to wake up a kthread or send a fake signal.
0b3d52790e1cfd Miroslav Benes 2019-01-15  358  		 * Meanwhile the task could migrate itself and the action
0b3d52790e1cfd Miroslav Benes 2019-01-15  359  		 * would be meaningless. It is not serious though.
0b3d52790e1cfd Miroslav Benes 2019-01-15  360  		 */
0b3d52790e1cfd Miroslav Benes 2019-01-15  361  		if (task->flags & PF_KTHREAD) {
0b3d52790e1cfd Miroslav Benes 2019-01-15  362  			/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  363  			 * Wake up a kthread which sleeps interruptedly and
0b3d52790e1cfd Miroslav Benes 2019-01-15  364  			 * still has not been migrated.
0b3d52790e1cfd Miroslav Benes 2019-01-15  365  			 */
0b3d52790e1cfd Miroslav Benes 2019-01-15  366  			wake_up_state(task, TASK_INTERRUPTIBLE);
0b3d52790e1cfd Miroslav Benes 2019-01-15  367  		} else {
0b3d52790e1cfd Miroslav Benes 2019-01-15  368  			/*
0b3d52790e1cfd Miroslav Benes 2019-01-15  369  			 * Send fake signal to all non-kthread tasks which are
0b3d52790e1cfd Miroslav Benes 2019-01-15  370  			 * still not migrated.
0b3d52790e1cfd Miroslav Benes 2019-01-15  371  			 */
0b3d52790e1cfd Miroslav Benes 2019-01-15 @372  			spin_lock_irq(&task->sighand->siglock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  373  			signal_wake_up(task, 0);
0b3d52790e1cfd Miroslav Benes 2019-01-15  374  			spin_unlock_irq(&task->sighand->siglock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  375  		}
0b3d52790e1cfd Miroslav Benes 2019-01-15  376  	}
0b3d52790e1cfd Miroslav Benes 2019-01-15  377  	read_unlock(&tasklist_lock);
0b3d52790e1cfd Miroslav Benes 2019-01-15  378  }
0b3d52790e1cfd Miroslav Benes 2019-01-15  379  

:::::: The code at line 372 was first introduced by commit
:::::: 0b3d52790e1cfd6b80b826a245d24859e89632f7 livepatch: Remove signal sysfs attribute

:::::: TO: Miroslav Benes <mbenes@suse.cz>
:::::: CC: Jiri Kosina <jkosina@suse.cz>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34127 bytes --]

             reply	other threads:[~2020-05-28  8:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  8:03 kbuild test robot [this message]
2020-07-25 20:58 kernel test robot
2020-07-25 21:49 kernel test robot

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=202005281603.vE3RY3ir%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=christian.brauner@ubuntu.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=madhuparnabhowmik10@gmail.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

all inboxes | Powered by JetHome®