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: <CAJd=RBBvE-5f1UyJGu32EHGVCXe6rVYY0010SKa56j7OvtPG7g@mail.gmail.com>
Date:	Fri, 8 Feb 2013 11:42:43 +0800
From:	Hillf Danton <dhillf@...il.com>
To:	Rusty Russell <rusty@...tcorp.com.au>, Tejun Heo <tj@...nel.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>, Hillf Danton <dhillf@...il.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 2/2] stop_machine: dequeue work before signal completion

As checked with BUG_ON in the case of CPU_UP_PREPARE, we have to dequeue
work first for further actions, then stopper reaches sane and clear state.

Signed-off-by: Hillf Danton <dhillf@...il.com>
---

--- a/kernel/stop_machine.c	Fri Feb  8 11:22:44 2013
+++ b/kernel/stop_machine.c	Fri Feb  8 11:29:40 2013
@@ -342,8 +342,12 @@ static int __cpuinit cpu_stop_cpu_callba
 		kthread_stop(stopper->thread);
 		/* drain remaining works */
 		spin_lock_irq(&stopper->lock);
-		list_for_each_entry(work, &stopper->works, list)
+		while (!list_empty(&stopper->works)) {
+			work = list_first_entry(&stopper->works,
+					struct cpu_stop_work, list);
+			list_del_init(&work->list);
 			cpu_stop_signal_done(work->done, false);
+		}
 		stopper->enabled = false;
 		spin_unlock_irq(&stopper->lock);
 		/* release the stopper */
--
--
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