[OE-core] [PATCH v.4] kernel.bbclass: Fix race condition

Richard Purdie richard.purdie at linuxfoundation.org
Wed May 6 14:27:41 UTC 2015


On Wed, 2015-05-06 at 17:03 +0300, Ed Bartosh wrote:
> Race condition between do_compile_kernelmodules and do_shared_workdir
> tasks occurs when do_compile_kernelmodules changes files in
> include/generated/* while do_shared_workdir tries to copy them to
> shared working directory.
> 
> Fixed race by moving do_shared_workdir after do_compile_kernelmodules.
> 
> [YOCTO #7321]
> 
> Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
> ---
>  meta/classes/kernel.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 125ed88..9207ae4 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -234,7 +234,7 @@ kernel_do_install() {
>  }
>  do_install[prefuncs] += "package_get_auto_pr"
>  
> -addtask shared_workdir after do_compile before do_install
> +addtask shared_workdir after do_compile_kernelmodules before do_install

Sorry to further discuss this, however I was thinking about something
Mike was saying about external kernel module builds causing kernel
builds in a different thread. 

The above will mean that external module builds depend on
do_compile_kernelmodules.

I therefore think we should do:

addtask shared_workdir after do_compile before do_compile_kernelmodules

since that will inflict less overhead on module builds.

Cheers,

Richard




More information about the Openembedded-core mailing list