[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080720085924.122feb2b@infradead.org>
Date: Sun, 20 Jul 2008 08:59:24 -0700
From: Arjan van de Ven <arjan@...radead.org>
To: linux-kernel@...r.kernel.org
Cc: mingo@...e.hu, Rene Herman <rene.herman@...access.nl>,
Simon Arlott <simon@...e.lp0.eu>,
Alan Stern <stern@...land.harvard.edu>,
Daniel Walker <dwalker@...sta.com>
Subject: [patch 4/3] fastboot: hold the BKL over the async init call
sequence
From: Arjan van de Ven <arjan@...ux.intel.com>
Subject: [PATCH] fastboot: hold the BKL over the async init call sequence
Regular init calls are called with the BKL held; make sure
the async init calls are also called with the BKL held.
While this reduces parallelism a little, it does provide
lock-for-lock compatibility. The hit to prallelism isn't too
bad, most of the init calls are done immediately or actually
block for their delays.
Signed-off-by: Arjan van de Ven <arjan@...ux.intel.com>
---
init/main.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/init/main.c b/init/main.c
index bf79b83..dcb2c32 100644
--- a/init/main.c
+++ b/init/main.c
@@ -746,8 +746,14 @@ static void __init do_async_initcalls(struct work_struct *dummy)
{
initcall_t *call;
+ /*
+ * For compatibility with normal init calls... take the BKL
+ * not pretty, not desirable, but compatibility first
+ */
+ lock_kernel();
for (call = __async_initcall_start; call < __async_initcall_end; call++)
do_one_initcall(*call);
+ unlock_kernel();
}
static struct workqueue_struct *async_init_wq;
--
1.5.5.1
--
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