Re: [PATCH 2/3] signal: Guarantee that SIGNAL_GROUP_EXIT is set on process exit
From: kernel test robot
Date: Thu Jun 23 2022 - 03:50:36 EST
Hi "Eric,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.19-rc3 next-20220622]
[cannot apply to kees/for-next/pstore]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Eric-W-Biederman/signal-Ensure-SIGNAL_GROUP_EXIT-gets-set-in-do_group_exit/20220623-014543
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3abc3ae553c7ed73365b385b9a4cffc5176aae45
config: nios2-randconfig-s032-20220622 (https://download.01.org/0day-ci/archive/20220623/202206231547.B89O2N6f-lkp@xxxxxxxxx/config)
compiler: nios2-linux-gcc (GCC) 11.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.4-31-g4880bd19-dirty
# https://github.com/intel-lab-lkp/linux/commit/0e1cfa4e4efe9c701f3ef5665c22310ac7aa7e7e
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Eric-W-Biederman/signal-Ensure-SIGNAL_GROUP_EXIT-gets-set-in-do_group_exit/20220623-014543
git checkout 0e1cfa4e4efe9c701f3ef5665c22310ac7aa7e7e
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=nios2 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/exit.c:281:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *tsk @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/exit.c:281:37: sparse: expected struct task_struct *tsk
kernel/exit.c:281:37: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/exit.c:284:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *task @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/exit.c:284:32: sparse: expected struct task_struct *task
kernel/exit.c:284:32: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/exit.c:285:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *task @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/exit.c:285:35: sparse: expected struct task_struct *task
kernel/exit.c:285:35: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/exit.c:330:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct *parent @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/exit.c:330:24: sparse: expected struct task_struct *parent
kernel/exit.c:330:24: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/exit.c:357:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/exit.c:357:27: sparse: expected struct spinlock [usertype] *lock
kernel/exit.c:357:27: sparse: got struct spinlock [noderef] __rcu *
kernel/exit.c:360:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/exit.c:360:29: sparse: expected struct spinlock [usertype] *lock
kernel/exit.c:360:29: sparse: got struct spinlock [noderef] __rcu *
kernel/exit.c:583:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct *reaper @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/exit.c:583:29: sparse: expected struct task_struct *reaper
kernel/exit.c:583:29: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/exit.c:585:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct *reaper @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/exit.c:585:29: sparse: expected struct task_struct *reaper
kernel/exit.c:585:29: sparse: got struct task_struct [noderef] __rcu *real_parent
>> kernel/exit.c:738:45: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sighand_struct *sighand @@ got struct sighand_struct [noderef] __rcu *sighand @@
kernel/exit.c:738:45: sparse: expected struct sighand_struct *sighand
kernel/exit.c:738:45: sparse: got struct sighand_struct [noderef] __rcu *sighand
kernel/exit.c:927:63: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sighand_struct *const sighand @@ got struct sighand_struct [noderef] __rcu *sighand @@
kernel/exit.c:927:63: sparse: expected struct sighand_struct *const sighand
kernel/exit.c:927:63: sparse: got struct sighand_struct [noderef] __rcu *sighand
kernel/exit.c:1082:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/exit.c:1082:39: sparse: expected struct spinlock [usertype] *lock
kernel/exit.c:1082:39: sparse: got struct spinlock [noderef] __rcu *
kernel/exit.c:1107:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/exit.c:1107:41: sparse: expected struct spinlock [usertype] *lock
kernel/exit.c:1107:41: sparse: got struct spinlock [noderef] __rcu *
kernel/exit.c:1196:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/exit.c:1196:25: sparse: expected struct spinlock [usertype] *lock
kernel/exit.c:1196:25: sparse: got struct spinlock [noderef] __rcu *
kernel/exit.c:1211:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/exit.c:1211:27: sparse: expected struct spinlock [usertype] *lock
kernel/exit.c:1211:27: sparse: got struct spinlock [noderef] __rcu *
kernel/exit.c:1262:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/exit.c:1262:25: sparse: expected struct spinlock [usertype] *lock
kernel/exit.c:1262:25: sparse: got struct spinlock [noderef] __rcu *
kernel/exit.c:1265:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/exit.c:1265:35: sparse: expected struct spinlock [usertype] *lock
kernel/exit.c:1265:35: sparse: got struct spinlock [noderef] __rcu *
kernel/exit.c:1271:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/exit.c:1271:27: sparse: expected struct spinlock [usertype] *lock
kernel/exit.c:1271:27: sparse: got struct spinlock [noderef] __rcu *
kernel/exit.c:1452:59: sparse: sparse: incompatible types in comparison expression (different base types):
kernel/exit.c:1452:59: sparse: void *
kernel/exit.c:1452:59: sparse: struct task_struct [noderef] __rcu *
kernel/exit.c:1468:25: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *parent @@ got struct task_struct [noderef] __rcu * @@
kernel/exit.c:1468:25: sparse: expected struct task_struct *parent
kernel/exit.c:1468:25: sparse: got struct task_struct [noderef] __rcu *
kernel/exit.c: note: in included file (through arch/nios2/include/uapi/asm/elf.h, arch/nios2/include/asm/elf.h, include/linux/elf.h, ...):
include/linux/ptrace.h:92:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p1 @@ got struct task_struct [noderef] __rcu *real_parent @@
include/linux/ptrace.h:92:40: sparse: expected struct task_struct *p1
include/linux/ptrace.h:92:40: sparse: got struct task_struct [noderef] __rcu *real_parent
include/linux/ptrace.h:92:60: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *p2 @@ got struct task_struct [noderef] __rcu *parent @@
include/linux/ptrace.h:92:60: sparse: expected struct task_struct *p2
include/linux/ptrace.h:92:60: sparse: got struct task_struct [noderef] __rcu *parent
include/linux/ptrace.h:92:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p1 @@ got struct task_struct [noderef] __rcu *real_parent @@
include/linux/ptrace.h:92:40: sparse: expected struct task_struct *p1
include/linux/ptrace.h:92:40: sparse: got struct task_struct [noderef] __rcu *real_parent
include/linux/ptrace.h:92:60: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *p2 @@ got struct task_struct [noderef] __rcu *parent @@
include/linux/ptrace.h:92:60: sparse: expected struct task_struct *p2
include/linux/ptrace.h:92:60: sparse: got struct task_struct [noderef] __rcu *parent
kernel/exit.c: note: in included file (through include/linux/sched/signal.h, include/linux/rcuwait.h, include/linux/percpu-rwsem.h, ...):
include/linux/sched/task.h:110:21: sparse: sparse: context imbalance in 'wait_task_zombie' - unexpected unlock
include/linux/sched/task.h:110:21: sparse: sparse: context imbalance in 'wait_task_stopped' - unexpected unlock
include/linux/sched/task.h:110:21: sparse: sparse: context imbalance in 'wait_task_continued' - unexpected unlock
kernel/exit.c: note: in included file (through arch/nios2/include/uapi/asm/elf.h, arch/nios2/include/asm/elf.h, include/linux/elf.h, ...):
include/linux/ptrace.h:92:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p1 @@ got struct task_struct [noderef] __rcu *real_parent @@
include/linux/ptrace.h:92:40: sparse: expected struct task_struct *p1
include/linux/ptrace.h:92:40: sparse: got struct task_struct [noderef] __rcu *real_parent
include/linux/ptrace.h:92:60: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *p2 @@ got struct task_struct [noderef] __rcu *parent @@
include/linux/ptrace.h:92:60: sparse: expected struct task_struct *p2
include/linux/ptrace.h:92:60: sparse: got struct task_struct [noderef] __rcu *parent
kernel/exit.c: note: in included file (through include/linux/thread_info.h, include/asm-generic/preempt.h, arch/nios2/include/generated/asm/preempt.h, ...):
arch/nios2/include/asm/thread_info.h:62:9: sparse: sparse: context imbalance in 'do_wait' - wrong count at exit
vim +738 kernel/exit.c
735
736 static void synchronize_group_exit(struct task_struct *tsk, long code)
737 {
> 738 struct sighand_struct *sighand = tsk->sighand;
739 struct signal_struct *signal = tsk->signal;
740
741 spin_lock_irq(&sighand->siglock);
742 signal->quick_threads--;
743 if ((signal->quick_threads == 0) &&
744 !(signal->flags & SIGNAL_GROUP_EXIT)) {
745 signal->flags = SIGNAL_GROUP_EXIT;
746 signal->group_exit_code = code;
747 signal->group_stop_count = 0;
748 }
749 spin_unlock_irq(&sighand->siglock);
750 }
751
--
0-DAY CI Kernel Test Service
https://01.org/lkp