[oe-commits] Ed Bartosh : kernel.bbclass: Fix race condition
git at git.openembedded.org
git at git.openembedded.org
Tue May 5 07:20:18 UTC 2015
Module: openembedded-core.git
Branch: master-next
Commit: c63cdaf9a72a6a3514da8ae40ff6276ef1f189a2
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=c63cdaf9a72a6a3514da8ae40ff6276ef1f189a2
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
Date: Mon May 4 17:11:29 2015 +0300
kernel.bbclass: Fix race condition
Race condition between do_compile_kernelmodules and do_shared_workdir
tasks occurs when do_compilemodules changes files in include/generated/*
while do_shared_workdir tries to copy them to shared working directory.
Functionality of do_shared_workdir has been moved to separate function
mk_shared_workdir and called from do_kernel_compile. do_shared_workdir
left in the code as it may be used in many recipes.
[YOCTO #7321]
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/kernel.bbclass | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 125ed88..13c0180 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -192,6 +192,8 @@ kernel_do_compile() {
if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then
gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"
fi
+
+ mk_shared_workdir
}
do_compile_kernelmodules() {
@@ -245,7 +247,7 @@ emit_depmod_pkgdata() {
PACKAGEFUNCS += "emit_depmod_pkgdata"
-do_shared_workdir () {
+mk_shared_workdir () {
cd ${B}
kerneldir=${STAGING_KERNEL_BUILDDIR}
@@ -289,6 +291,14 @@ do_shared_workdir () {
fi
}
+# NOTE!!! Functionality of do_shared_workdir has been moved to mk_shared_workdir
+# and called from kernel_do_compile.
+# It caused race condition with do_compile_kernelmodules when it runs
+# in parallel with do_compile_kernelmodules
+do_shared_workdir () {
+ :
+}
+
# We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware
sysroot_stage_all () {
:
More information about the Openembedded-commits
mailing list