Re: [PATCH v3] futex: don't leak robust_list pointer on exec race
From: kernel test robot
Date: Fri Aug 08 2025 - 14:14:47 EST
Hi Pranav,
kernel test robot noticed the following build errors:
[auto build test ERROR on tip/locking/core]
[also build test ERROR on linus/master v6.16 next-20250808]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Pranav-Tyagi/futex-don-t-leak-robust_list-pointer-on-exec-race/20250806-121303
base: tip/locking/core
patch link: https://lore.kernel.org/r/20250805154725.22031-1-pranav.tyagi03%40gmail.com
patch subject: [PATCH v3] futex: don't leak robust_list pointer on exec race
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20250809/202508090125.VIm8fAXD-lkp@xxxxxxxxx/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 7b8dea265e72c3037b6b1e54d5ab51b7e14f328b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250809/202508090125.VIm8fAXD-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/202508090125.VIm8fAXD-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
>> kernel/futex/syscalls.c:72:13: error: no member named 'compat_robust_list' in 'struct task_struct'
72 | head = p->compat_robust_list;
| ~ ^
1 error generated.
vim +72 kernel/futex/syscalls.c
41
42 static void __user *get_robust_list_common(int pid, bool compat)
43 {
44 struct task_struct *p;
45 void __user *head;
46 unsigned long ret;
47
48 p = current;
49
50 scoped_guard(rcu) {
51 if (pid) {
52 p = find_task_by_vpid(pid);
53 if (!p)
54 return (void __user *)ERR_PTR(-ESRCH);
55 }
56 get_task_struct(p);
57 }
58
59 /*
60 * Hold exec_update_lock to serialize with concurrent exec()
61 * so ptrace_may_access() is checked against stable credentials
62 */
63 ret = down_read_killable(&p->signal->exec_update_lock);
64 if (ret)
65 goto err_put;
66
67 ret = -EPERM;
68 if (!ptrace_may_access(p, PTRACE_MODE_READ_REALCREDS))
69 goto err_unlock;
70
71 if (IS_ENABLED(CONFIG_COMPAT) && compat)
> 72 head = p->compat_robust_list;
73 else
74 head = p->robust_list;
75
76 up_read(&p->signal->exec_update_lock);
77 put_task_struct(p);
78
79 return head;
80
81 err_unlock:
82 up_read(&p->signal->exec_update_lock);
83 err_put:
84 put_task_struct(p);
85 return (void __user *)ERR_PTR(ret);
86 }
87
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki