tree: https://github.com/zen-kernel/zen-kernel 5.14/prjc head: f69b5edf3ec3ce17d9eef4ce92bdd4fc9b37e270 commit: 8e79ff69bdee272975f92e45e8b4ecf0690b636e [199/229] sched/alt: [Sync] 2f064a59a11f sched: Change task_struct::state config: nds32-allyesconfig (attached as .config) compiler: nds32le-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/zen-kernel/zen-kernel/commit/8e79ff69bdee272975f92e45e8b4ecf0690b636e git remote add zen https://github.com/zen-kernel/zen-kernel git fetch --no-tags zen 5.14/prjc git checkout 8e79ff69bdee272975f92e45e8b4ecf0690b636e # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash kernel/sched/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): kernel/sched/alt_core.c:114: warning: cannot understand function prototype: 'int sched_yield_type __read_mostly = 1; ' kernel/sched/alt_core.c:3001: warning: Function parameter or member 'prev' not described in 'prepare_task_switch' kernel/sched/alt_core.c:3034: warning: Excess function parameter 'rq' description in 'finish_task_switch' kernel/sched/alt_core.c:5319: warning: Function parameter or member 'flags' not described in 'sys_sched_setattr' >> kernel/sched/alt_core.c:5387: warning: expecting prototype for sys_sched_getscheduler(). Prototype was for sys_sched_getparam() instead vim +5387 kernel/sched/alt_core.c f746b5817d3274 Alfred Chen 2019-08-19 5377 f746b5817d3274 Alfred Chen 2019-08-19 5378 /** f746b5817d3274 Alfred Chen 2019-08-19 5379 * sys_sched_getscheduler - get the RT priority of a thread f746b5817d3274 Alfred Chen 2019-08-19 5380 * @pid: the pid in question. f746b5817d3274 Alfred Chen 2019-08-19 5381 * @param: structure containing the RT priority. f746b5817d3274 Alfred Chen 2019-08-19 5382 * f746b5817d3274 Alfred Chen 2019-08-19 5383 * Return: On success, 0 and the RT priority is in @param. Otherwise, an error f746b5817d3274 Alfred Chen 2019-08-19 5384 * code. f746b5817d3274 Alfred Chen 2019-08-19 5385 */ f746b5817d3274 Alfred Chen 2019-08-19 5386 SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param) f746b5817d3274 Alfred Chen 2019-08-19 @5387 { f746b5817d3274 Alfred Chen 2019-08-19 5388 struct sched_param lp = { .sched_priority = 0 }; f746b5817d3274 Alfred Chen 2019-08-19 5389 struct task_struct *p; f746b5817d3274 Alfred Chen 2019-08-19 5390 int retval = -EINVAL; f746b5817d3274 Alfred Chen 2019-08-19 5391 f746b5817d3274 Alfred Chen 2019-08-19 5392 if (!param || pid < 0) f746b5817d3274 Alfred Chen 2019-08-19 5393 goto out_nounlock; f746b5817d3274 Alfred Chen 2019-08-19 5394 f746b5817d3274 Alfred Chen 2019-08-19 5395 rcu_read_lock(); f746b5817d3274 Alfred Chen 2019-08-19 5396 p = find_process_by_pid(pid); f746b5817d3274 Alfred Chen 2019-08-19 5397 retval = -ESRCH; f746b5817d3274 Alfred Chen 2019-08-19 5398 if (!p) f746b5817d3274 Alfred Chen 2019-08-19 5399 goto out_unlock; f746b5817d3274 Alfred Chen 2019-08-19 5400 f746b5817d3274 Alfred Chen 2019-08-19 5401 retval = security_task_getscheduler(p); f746b5817d3274 Alfred Chen 2019-08-19 5402 if (retval) f746b5817d3274 Alfred Chen 2019-08-19 5403 goto out_unlock; f746b5817d3274 Alfred Chen 2019-08-19 5404 f746b5817d3274 Alfred Chen 2019-08-19 5405 if (task_has_rt_policy(p)) f746b5817d3274 Alfred Chen 2019-08-19 5406 lp.sched_priority = p->rt_priority; f746b5817d3274 Alfred Chen 2019-08-19 5407 rcu_read_unlock(); f746b5817d3274 Alfred Chen 2019-08-19 5408 f746b5817d3274 Alfred Chen 2019-08-19 5409 /* f746b5817d3274 Alfred Chen 2019-08-19 5410 * This one might sleep, we cannot do it with a spinlock held ... f746b5817d3274 Alfred Chen 2019-08-19 5411 */ f746b5817d3274 Alfred Chen 2019-08-19 5412 retval = copy_to_user(param, &lp, sizeof(*param)) ? -EFAULT : 0; f746b5817d3274 Alfred Chen 2019-08-19 5413 f746b5817d3274 Alfred Chen 2019-08-19 5414 out_nounlock: f746b5817d3274 Alfred Chen 2019-08-19 5415 return retval; f746b5817d3274 Alfred Chen 2019-08-19 5416 f746b5817d3274 Alfred Chen 2019-08-19 5417 out_unlock: f746b5817d3274 Alfred Chen 2019-08-19 5418 rcu_read_unlock(); f746b5817d3274 Alfred Chen 2019-08-19 5419 return retval; f746b5817d3274 Alfred Chen 2019-08-19 5420 } f746b5817d3274 Alfred Chen 2019-08-19 5421 :::::: The code at line 5387 was first introduced by commit :::::: f746b5817d3274fa4f458f87f6b452e7304b1d64 Project C v5.7.5-r2 :::::: TO: Alfred Chen :::::: CC: Alfred Chen --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org