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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200415184937.32373-2-jbi.octave@gmail.com>
Date:   Wed, 15 Apr 2020 19:49:37 +0100
From:   Jules Irenge <jbi.octave@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     boqun.feng@...il.com, Thomas Gleixner <tglx@...utronix.de>,
        Jiri Kosina <jkosina@...e.cz>,
        Peter Zijlstra <peterz@...radead.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Ingo Molnar <mingo@...nel.org>, Qian Cai <cai@....pw>,
        Eiichi Tsukata <devel@...ukata.com>,
        Pavankumar Kondeti <pkondeti@...eaurora.org>,
        Arnd Bergmann <arnd@...db.de>,
        Tyler Hicks <tyhicks@...onical.com>
Subject: [PATCH 1/1] cpu: Add annotation inside clear_tasks_mm_cpumask()

Sparse reports a warning

warning: context imbalance in clear_tasks_mm_cpumask() - different lock contexts for basic block

The root cause is the missing annotation inside clear_tasks_mm_cpumask()

Add the missing __acquire(&t->alloc_lock) annotation.

Signed-off-by: Jules Irenge <jbi.octave@...il.com>
---
 kernel/cpu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 9c706af713fb..d8c452a8dd09 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -834,6 +834,7 @@ void clear_tasks_mm_cpumask(int cpu)
 		t = find_lock_task_mm(p);
 		if (!t)
 			continue;
+		__acquire(&t->alloc_lock);
 		cpumask_clear_cpu(cpu, mm_cpumask(t->mm));
 		task_unlock(t);
 	}
-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ