linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* kernel/sched/psi.c:639:13: warning: 'rq' may be used uninitialized in this function
@ 2018-11-05  5:30 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2018-11-05  5:30 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 2599 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   651022382c7f8da46cb4872a545ee1da6d097d2a
commit: 2ce7135adc9ad081aa3c49744144376ac74fea60 psi: cgroup support
date:   9 days ago
config: x86_64-randconfig-s1-11051307 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        git checkout 2ce7135adc9ad081aa3c49744144376ac74fea60
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   kernel/sched/psi.c: In function 'cgroup_move_task':
>> kernel/sched/psi.c:639:13: warning: 'rq' may be used uninitialized in this function [-Wmaybe-uninitialized]
     struct rq *rq;
                ^~

vim +/rq +639 kernel/sched/psi.c

   621	
   622	/**
   623	 * cgroup_move_task - move task to a different cgroup
   624	 * @task: the task
   625	 * @to: the target css_set
   626	 *
   627	 * Move task to a new cgroup and safely migrate its associated stall
   628	 * state between the different groups.
   629	 *
   630	 * This function acquires the task's rq lock to lock out concurrent
   631	 * changes to the task's scheduling state and - in case the task is
   632	 * running - concurrent changes to its stall state.
   633	 */
   634	void cgroup_move_task(struct task_struct *task, struct css_set *to)
   635	{
   636		bool move_psi = !psi_disabled;
   637		unsigned int task_flags = 0;
   638		struct rq_flags rf;
 > 639		struct rq *rq;
   640	
   641		if (move_psi) {
   642			rq = task_rq_lock(task, &rf);
   643	
   644			if (task_on_rq_queued(task))
   645				task_flags = TSK_RUNNING;
   646			else if (task->in_iowait)
   647				task_flags = TSK_IOWAIT;
   648	
   649			if (task->flags & PF_MEMSTALL)
   650				task_flags |= TSK_MEMSTALL;
   651	
   652			if (task_flags)
   653				psi_task_change(task, task_flags, 0);
   654		}
   655	
   656		/*
   657		 * Lame to do this here, but the scheduler cannot be locked
   658		 * from the outside, so we move cgroups from inside sched/.
   659		 */
   660		rcu_assign_pointer(task->cgroups, to);
   661	
   662		if (move_psi) {
   663			if (task_flags)
   664				psi_task_change(task, 0, task_flags);
   665	
   666			task_rq_unlock(rq, task, &rf);
   667		}
   668	}
   669	#endif /* CONFIG_CGROUPS */
   670	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28449 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-05  5:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-05  5:30 kernel/sched/psi.c:639:13: warning: 'rq' may be used uninitialized in this function kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).