CC: [email protected] BCC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Vincent Guittot <[email protected]>
Hi Vincent, I love your patch! Perhaps something to improve: [auto build test WARNING on tip/sched/core] [also build test WARNING on linux/master tip/master linus/master v5.18-rc6 next-20220513] [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/Vincent-Guittot/Add-latency_nice-priority/20220513-005836 base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 734387ec2f9d77b00276042b1fa7c95f48ee879d :::::: branch date: 3 days ago :::::: commit date: 3 days ago config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20220515/[email protected]/config) compiler: gcc-11 (Debian 11.2.0-20) 11.2.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/fair.c:11785 sched_group_set_latency() error: buffer overflow 'sched_latency_to_weight' 40 <= 40 kernel/sched/fair.c:11785 sched_group_set_latency() error: buffer overflow 'sched_latency_to_weight' 40 <= 40 vim +/sched_latency_to_weight +11785 kernel/sched/fair.c 304000390f88d0 Josh Don 2021-07-29 11761 632b7c939b164d Vincent Guittot 2022-05-12 11762 int sched_group_set_latency(struct task_group *tg, long latency_prio) 632b7c939b164d Vincent Guittot 2022-05-12 11763 { 632b7c939b164d Vincent Guittot 2022-05-12 11764 int i; 632b7c939b164d Vincent Guittot 2022-05-12 11765 632b7c939b164d Vincent Guittot 2022-05-12 11766 if (tg == &root_task_group) 632b7c939b164d Vincent Guittot 2022-05-12 11767 return -EINVAL; 632b7c939b164d Vincent Guittot 2022-05-12 11768 632b7c939b164d Vincent Guittot 2022-05-12 11769 if (latency_prio < 0 || 632b7c939b164d Vincent Guittot 2022-05-12 11770 latency_prio > LATENCY_NICE_WIDTH) 632b7c939b164d Vincent Guittot 2022-05-12 11771 return -EINVAL; 632b7c939b164d Vincent Guittot 2022-05-12 11772 632b7c939b164d Vincent Guittot 2022-05-12 11773 mutex_lock(&shares_mutex); 632b7c939b164d Vincent Guittot 2022-05-12 11774 632b7c939b164d Vincent Guittot 2022-05-12 11775 if (tg->latency_prio == latency_prio) { 632b7c939b164d Vincent Guittot 2022-05-12 11776 mutex_unlock(&shares_mutex); 632b7c939b164d Vincent Guittot 2022-05-12 11777 return 0; 632b7c939b164d Vincent Guittot 2022-05-12 11778 } 632b7c939b164d Vincent Guittot 2022-05-12 11779 632b7c939b164d Vincent Guittot 2022-05-12 11780 tg->latency_prio = latency_prio; 632b7c939b164d Vincent Guittot 2022-05-12 11781 632b7c939b164d Vincent Guittot 2022-05-12 11782 for_each_possible_cpu(i) { 632b7c939b164d Vincent Guittot 2022-05-12 11783 struct sched_entity *se = tg->se[i]; 632b7c939b164d Vincent Guittot 2022-05-12 11784 632b7c939b164d Vincent Guittot 2022-05-12 @11785 WRITE_ONCE(se->latency_weight, sched_latency_to_weight[latency_prio]); 632b7c939b164d Vincent Guittot 2022-05-12 11786 } 632b7c939b164d Vincent Guittot 2022-05-12 11787 632b7c939b164d Vincent Guittot 2022-05-12 11788 mutex_unlock(&shares_mutex); 632b7c939b164d Vincent Guittot 2022-05-12 11789 return 0; 632b7c939b164d Vincent Guittot 2022-05-12 11790 } 632b7c939b164d Vincent Guittot 2022-05-12 11791 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
