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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1447806899-20303-1-git-send-email-byungchul.park@lge.com>
Date:	Wed, 18 Nov 2015 09:34:59 +0900
From:	<byungchul.park@....com>
To:	<mingo@...nel.org>, <peterz@...radead.org>
CC:	linux-kernel@...r.kernel.org, efault@....de, tglx@...utronix.de,
	yuyang.du@...el.com, pjt@...gle.com,
	Byungchul Park <byungchul.park@....com>
Subject: [PATCH] sched: modify the comment about lock assumption in migrate_task_rq_fair()

From: Byungchul Park <byungchul.park@....com>

The comment describing migrate_task_rq_fair() says that the caller
should hold p->pi_lock. But in some other case, the caller can hold
task_rq(p)->lock instead of p->pi_lock. So the comment is broken and
this patch fixs it.

Signed-off-by: Byungchul Park <byungchul.park@....com>
---
 kernel/sched/fair.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 077076f..6f43dfd 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5006,8 +5006,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
 /*
  * Called immediately before a task is migrated to a new cpu; task_cpu(p) and
  * cfs_rq_of(p) references at time of call are still valid and identify the
- * previous cpu.  However, the caller only guarantees p->pi_lock is held; no
- * other assumptions, including the state of rq->lock, should be made.
+ * previous cpu. The caller guarantees p->pi_lock or task_rq(p)->lock is held.
  */
 static void migrate_task_rq_fair(struct task_struct *p, int next_cpu)
 {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ