tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: d3fde8ff50ab265749704bd7fbcf70d35235421f commit: cb3c19c93d656caa6fe63d6277aabd7e570f1d03 [10080/14198] signal: Use lockdep_assert_held instead of assert_spin_locked config: x86_64-randconfig-s021 (https://download.01.org/0day-ci/archive/20220529/202205290105.zbUtZ6O7-lkp@xxxxxxxxx/config) compiler: gcc-11 (Debian 11.3.0-1) 11.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-14-g5a0004b5-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=cb3c19c93d656caa6fe63d6277aabd7e570f1d03 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout cb3c19c93d656caa6fe63d6277aabd7e570f1d03 # save the config file mkdir build_dir && cp config build_dir/.config make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) kernel/signal.c: note: in included file (through arch/x86/include/uapi/asm/signal.h, arch/x86/include/asm/signal.h, include/uapi/linux/signal.h, ...): include/uapi/asm-generic/signal-defs.h:83:29: sparse: sparse: multiple address spaces given kernel/signal.c:195:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:195:31: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:195:31: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:198:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:198:33: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:198:33: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:480:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:480:9: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:480:9: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:484:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:484:34: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:484:34: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:517:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:517:9: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:517:9: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:520:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:520:36: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:520:36: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:542:53: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct k_sigaction *ka @@ got struct k_sigaction [noderef] __rcu * @@ kernel/signal.c:542:53: sparse: expected struct k_sigaction *ka kernel/signal.c:542:53: sparse: got struct k_sigaction [noderef] __rcu * include/uapi/asm-generic/signal-defs.h:83:29: sparse: sparse: multiple address spaces given kernel/signal.c:698:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:698:33: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:698:33: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:700:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:700:31: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:700:31: sparse: got struct spinlock [noderef] __rcu * >> kernel/signal.c:887:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct lockdep_map const *lock @@ got struct lockdep_map [noderef] __rcu * @@ kernel/signal.c:887:9: sparse: expected struct lockdep_map const *lock kernel/signal.c:887:9: sparse: got struct lockdep_map [noderef] __rcu * kernel/signal.c:1082:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct lockdep_map const *lock @@ got struct lockdep_map [noderef] __rcu * @@ kernel/signal.c:1082:9: sparse: expected struct lockdep_map const *lock kernel/signal.c:1082:9: sparse: got struct lockdep_map [noderef] __rcu * kernel/signal.c:1324:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:1324:9: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:1324:9: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:1325:16: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct k_sigaction *action @@ got struct k_sigaction [noderef] __rcu * @@ kernel/signal.c:1325:16: sparse: expected struct k_sigaction *action kernel/signal.c:1325:16: sparse: got struct k_sigaction [noderef] __rcu * kernel/signal.c:1345:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:1345:34: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:1345:34: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:1923:36: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:1923:36: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:1923:36: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:2033:44: sparse: sparse: cast removes address space '__rcu' of expression kernel/signal.c:2052:65: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *tsk @@ got struct task_struct [noderef] __rcu *parent @@ kernel/signal.c:2052:65: sparse: expected struct task_struct *tsk kernel/signal.c:2052:65: sparse: got struct task_struct [noderef] __rcu *parent kernel/signal.c:2053:40: sparse: sparse: cast removes address space '__rcu' of expression kernel/signal.c:2071:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sighand_struct *psig @@ got struct sighand_struct [noderef] __rcu *[noderef] __rcu sighand @@ kernel/signal.c:2071:14: sparse: expected struct sighand_struct *psig kernel/signal.c:2071:14: sparse: got struct sighand_struct [noderef] __rcu *[noderef] __rcu sighand kernel/signal.c:2100:53: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected struct task_struct *t @@ got struct task_struct [noderef] __rcu *parent @@ kernel/signal.c:2100:53: sparse: expected struct task_struct *t kernel/signal.c:2100:53: sparse: got struct task_struct [noderef] __rcu *parent kernel/signal.c:2101:34: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *parent @@ got struct task_struct [noderef] __rcu *parent @@ kernel/signal.c:2101:34: sparse: expected struct task_struct *parent kernel/signal.c:2101:34: sparse: got struct task_struct [noderef] __rcu *parent kernel/signal.c:2130:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct *parent @@ got struct task_struct [noderef] __rcu *parent @@ kernel/signal.c:2130:24: sparse: expected struct task_struct *parent kernel/signal.c:2130:24: sparse: got struct task_struct [noderef] __rcu *parent kernel/signal.c:2133:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct *parent @@ got struct task_struct [noderef] __rcu *real_parent @@ kernel/signal.c:2133:24: sparse: expected struct task_struct *parent kernel/signal.c:2133:24: sparse: got struct task_struct [noderef] __rcu *real_parent kernel/signal.c:2166:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sighand_struct *sighand @@ got struct sighand_struct [noderef] __rcu *sighand @@ kernel/signal.c:2166:17: sparse: expected struct sighand_struct *sighand kernel/signal.c:2166:17: sparse: got struct sighand_struct [noderef] __rcu *sighand kernel/signal.c:2207:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:2207:41: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:2207:41: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:2209:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:2209:39: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:2209:39: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:2260:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:2260:33: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:2260:33: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:2316:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:2316:31: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:2316:31: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:2357:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:2357:31: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:2357:31: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:2359:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:2359:33: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:2359:33: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:2458:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:2458:41: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:2458:41: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:2542:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:2542:41: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:2542:41: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:2554:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:2554:33: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:2554:33: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:2589:52: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *tsk @@ got struct task_struct [noderef] __rcu *parent @@ kernel/signal.c:2589:52: sparse: expected struct task_struct *tsk kernel/signal.c:2589:52: sparse: got struct task_struct [noderef] __rcu *parent kernel/signal.c:2591:49: sparse: sparse: cast removes address space '__rcu' of expression kernel/signal.c:2629:49: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sighand_struct *sighand @@ got struct sighand_struct [noderef] __rcu *sighand @@ kernel/signal.c:2629:49: sparse: expected struct sighand_struct *sighand kernel/signal.c:2629:49: sparse: got struct sighand_struct [noderef] __rcu *sighand kernel/signal.c:2958:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:2958:27: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:2958:27: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:2978:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:2978:29: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:2978:29: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:3045:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:3045:27: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:3045:27: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:3047:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:3047:29: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:3047:29: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:3198:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:3198:31: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:3198:31: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:3201:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:3201:33: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:3201:33: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:3588:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:3588:27: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:3588:27: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:3600:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:3600:37: sparse: expected struct spinlock [usertype] *lock kernel/signal.c:3600:37: sparse: got struct spinlock [noderef] __rcu * kernel/signal.c:3605:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ kernel/signal.c:3605:35: sparse: expected struct spinlock [usertype] *lock vim +887 kernel/signal.c 866 867 /** 868 * ptrace_trap_notify - schedule trap to notify ptracer 869 * @t: tracee wanting to notify tracer 870 * 871 * This function schedules sticky ptrace trap which is cleared on the next 872 * TRAP_STOP to notify ptracer of an event. @t must have been seized by 873 * ptracer. 874 * 875 * If @t is running, STOP trap will be taken. If trapped for STOP and 876 * ptracer is listening for events, tracee is woken up so that it can 877 * re-trap for the new event. If trapped otherwise, STOP trap will be 878 * eventually taken without returning to userland after the existing traps 879 * are finished by PTRACE_CONT. 880 * 881 * CONTEXT: 882 * Must be called with @task->sighand->siglock held. 883 */ 884 static void ptrace_trap_notify(struct task_struct *t) 885 { 886 WARN_ON_ONCE(!(t->ptrace & PT_SEIZED)); > 887 lockdep_assert_held(&t->sighand->siglock); 888 889 task_set_jobctl_pending(t, JOBCTL_TRAP_NOTIFY); 890 ptrace_signal_wake_up(t, t->jobctl & JOBCTL_LISTENING); 891 } 892 -- 0-DAY CI Kernel Test Service https://01.org/lkp