tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: f524a5e4dfb75b277c9a5ad819ca5f035f490f14 commit: b2ae850c7a0b156ce991bb3d5e6090bf9174b161 [2209/2947] proc: add config & param to block forcing mem writes config: x86_64-randconfig-121-20240803 (https://download.01.org/0day-ci/archive/20240803/202408032026.4HZU39Nb-lkp@xxxxxxxxx/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240803/202408032026.4HZU39Nb-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202408032026.4HZU39Nb-lkp@xxxxxxxxx/ sparse warnings: (new ones prefixed by >>) >> fs/proc/base.c:879:88: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/proc/base.c:879:88: sparse: struct task_struct [noderef] __rcu * fs/proc/base.c:879:88: sparse: struct task_struct * fs/proc/base.c:2315:25: sparse: sparse: cast to restricted fmode_t fs/proc/base.c:2372:42: sparse: sparse: cast from restricted fmode_t fs/proc/base.c:2472:48: sparse: sparse: cast from restricted fmode_t fs/proc/base.c: note: in included file (through include/linux/rcuwait.h, include/linux/percpu-rwsem.h, include/linux/fs.h, ...): include/linux/sched/signal.h:754:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ include/linux/sched/signal.h:754:37: sparse: expected struct spinlock [usertype] *lock include/linux/sched/signal.h:754:37: sparse: got struct spinlock [noderef] __rcu * fs/proc/base.c:1158:36: sparse: sparse: context imbalance in '__set_oom_adj' - unexpected unlock fs/proc/base.c:2162:36: sparse: sparse: self-comparison always evaluates to false fs/proc/base.c:2175:36: sparse: sparse: self-comparison always evaluates to false fs/proc/base.c:2499:13: sparse: sparse: context imbalance in 'timers_start' - wrong count at exit include/linux/sched/signal.h:754:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@ include/linux/sched/signal.h:754:37: sparse: expected struct spinlock [usertype] *lock include/linux/sched/signal.h:754:37: sparse: got struct spinlock [noderef] __rcu * fs/proc/base.c:2525:36: sparse: sparse: context imbalance in 'timers_stop' - unexpected unlock fs/proc/base.c:3855:19: sparse: sparse: self-comparison always evaluates to false vim +879 fs/proc/base.c 867 868 static bool proc_mem_foll_force(struct file *file, struct mm_struct *mm) 869 { 870 struct task_struct *task; 871 bool ptrace_active = false; 872 873 switch (proc_mem_force_override) { 874 case PROC_MEM_FORCE_NEVER: 875 return false; 876 case PROC_MEM_FORCE_PTRACE: 877 task = get_proc_task(file_inode(file)); 878 if (task) { > 879 ptrace_active = task->ptrace && task->mm == mm && task->parent == current; 880 put_task_struct(task); 881 } 882 return ptrace_active; 883 default: 884 return true; 885 } 886 } 887 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki