CC: [email protected] TO: Peter Zijlstra <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core-sched head: a2f7c8bee1740fc80a75734268b065c96d68d29b commit: a2f7c8bee1740fc80a75734268b065c96d68d29b [29/29] sched: prctl() and cgroup interaction :::::: branch date: 7 hours ago :::::: commit date: 7 hours ago config: i386-randconfig-m021-20210413 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> smatch warnings: kernel/sched/core_sched.c:164 __sched_core_fat_cookie() error: uninitialized symbol 'task_cookie'. kernel/sched/core_sched.c:165 __sched_core_fat_cookie() error: uninitialized symbol 'group_cookie'. vim +/task_cookie +164 kernel/sched/core_sched.c a2f7c8bee1740f Peter Zijlstra 2021-03-31 107 a2f7c8bee1740f Peter Zijlstra 2021-03-31 108 static unsigned long __sched_core_fat_cookie(struct task_struct *p, a2f7c8bee1740f Peter Zijlstra 2021-03-31 109 void **spare_fat, a2f7c8bee1740f Peter Zijlstra 2021-03-31 110 unsigned long cookie) a2f7c8bee1740f Peter Zijlstra 2021-03-31 111 { a2f7c8bee1740f Peter Zijlstra 2021-03-31 112 unsigned long task_cookie, group_cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 113 unsigned int p_type = cookie_type(p->core_cookie); a2f7c8bee1740f Peter Zijlstra 2021-03-31 114 unsigned int c_type = cookie_type(cookie); a2f7c8bee1740f Peter Zijlstra 2021-03-31 115 struct sched_core_fat_cookie *fat; a2f7c8bee1740f Peter Zijlstra 2021-03-31 116 unsigned long flags; a2f7c8bee1740f Peter Zijlstra 2021-03-31 117 struct rb_node *n; a2f7c8bee1740f Peter Zijlstra 2021-03-31 118 a2f7c8bee1740f Peter Zijlstra 2021-03-31 119 if (WARN_ON_ONCE(c_type == FAT_COOKIE)) a2f7c8bee1740f Peter Zijlstra 2021-03-31 120 return cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 121 a2f7c8bee1740f Peter Zijlstra 2021-03-31 122 if (!p_type || p_type == c_type) a2f7c8bee1740f Peter Zijlstra 2021-03-31 123 return cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 124 a2f7c8bee1740f Peter Zijlstra 2021-03-31 125 if (p_type == FAT_COOKIE) { a2f7c8bee1740f Peter Zijlstra 2021-03-31 126 fat = cookie_ptr(p->core_cookie); a2f7c8bee1740f Peter Zijlstra 2021-03-31 127 a2f7c8bee1740f Peter Zijlstra 2021-03-31 128 /* loose fat */ a2f7c8bee1740f Peter Zijlstra 2021-03-31 129 if (!cookie_ptr(cookie)) { a2f7c8bee1740f Peter Zijlstra 2021-03-31 130 if (c_type == TASK_COOKIE) a2f7c8bee1740f Peter Zijlstra 2021-03-31 131 cookie = fat->group_cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 132 else a2f7c8bee1740f Peter Zijlstra 2021-03-31 133 cookie = fat->task_cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 134 a2f7c8bee1740f Peter Zijlstra 2021-03-31 135 WARN_ON_ONCE(!cookie_ptr(cookie)); a2f7c8bee1740f Peter Zijlstra 2021-03-31 136 return sched_core_get_cookie(cookie); a2f7c8bee1740f Peter Zijlstra 2021-03-31 137 } a2f7c8bee1740f Peter Zijlstra 2021-03-31 138 a2f7c8bee1740f Peter Zijlstra 2021-03-31 139 /* other fat */ a2f7c8bee1740f Peter Zijlstra 2021-03-31 140 if (c_type == TASK_COOKIE) a2f7c8bee1740f Peter Zijlstra 2021-03-31 141 group_cookie = fat->group_cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 142 else a2f7c8bee1740f Peter Zijlstra 2021-03-31 143 task_cookie = fat->task_cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 144 a2f7c8bee1740f Peter Zijlstra 2021-03-31 145 } else { a2f7c8bee1740f Peter Zijlstra 2021-03-31 146 a2f7c8bee1740f Peter Zijlstra 2021-03-31 147 /* new fat */ a2f7c8bee1740f Peter Zijlstra 2021-03-31 148 if (p_type == TASK_COOKIE) a2f7c8bee1740f Peter Zijlstra 2021-03-31 149 task_cookie = p->core_cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 150 else a2f7c8bee1740f Peter Zijlstra 2021-03-31 151 group_cookie = p->core_cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 152 } a2f7c8bee1740f Peter Zijlstra 2021-03-31 153 a2f7c8bee1740f Peter Zijlstra 2021-03-31 154 if (c_type == TASK_COOKIE) a2f7c8bee1740f Peter Zijlstra 2021-03-31 155 task_cookie = cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 156 else a2f7c8bee1740f Peter Zijlstra 2021-03-31 157 group_cookie = cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 158 a2f7c8bee1740f Peter Zijlstra 2021-03-31 159 fat = *spare_fat; a2f7c8bee1740f Peter Zijlstra 2021-03-31 160 if (WARN_ON_ONCE(!fat)) a2f7c8bee1740f Peter Zijlstra 2021-03-31 161 return cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 162 a2f7c8bee1740f Peter Zijlstra 2021-03-31 163 sched_core_init_cookie(&fat->cookie, FAT_COOKIE); a2f7c8bee1740f Peter Zijlstra 2021-03-31 @164 fat->task_cookie = sched_core_get_cookie(task_cookie); a2f7c8bee1740f Peter Zijlstra 2021-03-31 @165 fat->group_cookie = sched_core_get_cookie(group_cookie); a2f7c8bee1740f Peter Zijlstra 2021-03-31 166 RB_CLEAR_NODE(&fat->node); a2f7c8bee1740f Peter Zijlstra 2021-03-31 167 a2f7c8bee1740f Peter Zijlstra 2021-03-31 168 raw_spin_lock_irqsave(&fat_lock, flags); a2f7c8bee1740f Peter Zijlstra 2021-03-31 169 n = rb_find_add(&fat->node, &fat_root, fat_cmp); a2f7c8bee1740f Peter Zijlstra 2021-03-31 170 if (fat_excess) { a2f7c8bee1740f Peter Zijlstra 2021-03-31 171 rb_erase(fat_excess, &fat_root); a2f7c8bee1740f Peter Zijlstra 2021-03-31 172 RB_CLEAR_NODE(fat_excess); a2f7c8bee1740f Peter Zijlstra 2021-03-31 173 fat_excess = NULL; a2f7c8bee1740f Peter Zijlstra 2021-03-31 174 } a2f7c8bee1740f Peter Zijlstra 2021-03-31 175 raw_spin_unlock_irqrestore(&fat_lock, flags); a2f7c8bee1740f Peter Zijlstra 2021-03-31 176 a2f7c8bee1740f Peter Zijlstra 2021-03-31 177 if (n) { a2f7c8bee1740f Peter Zijlstra 2021-03-31 178 sched_core_put_fat(fat); a2f7c8bee1740f Peter Zijlstra 2021-03-31 179 fat = node_2_fat(n); a2f7c8bee1740f Peter Zijlstra 2021-03-31 180 } else { a2f7c8bee1740f Peter Zijlstra 2021-03-31 181 *spare_fat = NULL; a2f7c8bee1740f Peter Zijlstra 2021-03-31 182 } a2f7c8bee1740f Peter Zijlstra 2021-03-31 183 a2f7c8bee1740f Peter Zijlstra 2021-03-31 184 return (unsigned long)fat | FAT_COOKIE; a2f7c8bee1740f Peter Zijlstra 2021-03-31 185 } a2f7c8bee1740f Peter Zijlstra 2021-03-31 186 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
