lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1537334180-31870-1-git-send-email-zhongjiang@huawei.com>
Date:   Wed, 19 Sep 2018 13:16:20 +0800
From:   zhong jiang <zhongjiang@...wei.com>
To:     <mingo@...hat.com>
CC:     <peterz@...radead.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] sched: psi: Fix a GCC uninitialized warning

I find the following warning when compiling the kernel.

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

Signed-off-by: zhong jiang <zhongjiang@...wei.com>
---
 kernel/sched/psi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
index 7cdecfc..2d8a1f2 100644
--- a/kernel/sched/psi.c
+++ b/kernel/sched/psi.c
@@ -636,7 +636,7 @@ void cgroup_move_task(struct task_struct *task, struct css_set *to)
 	bool move_psi = !psi_disabled;
 	unsigned int task_flags = 0;
 	struct rq_flags rf;
-	struct rq *rq;
+	struct rq *rq = NULL;
 
 	if (move_psi) {
 		rq = task_rq_lock(task, &rf);
-- 
1.7.12.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ