[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] fuzz/x86emul: avoid race in link farm rune



commit 8a899fde71b95cf6094ce487f036f2616963e0ad
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Mon Feb 20 14:37:36 2017 +0000
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Mon Feb 20 15:13:54 2017 +0000

    fuzz/x86emul: avoid race in link farm rune
    
    Several `ln -sf` can race with each other and cause error like:
    
    14:43:56 00:07:06 O: ln: cannot remove 'asm': No such file or directory
    
    Provide dedicated targets for soft-linking directories.
    
    Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 tools/fuzz/x86_instruction_emulator/Makefile | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tools/fuzz/x86_instruction_emulator/Makefile 
b/tools/fuzz/x86_instruction_emulator/Makefile
index fede7e9..3b75beb 100644
--- a/tools/fuzz/x86_instruction_emulator/Makefile
+++ b/tools/fuzz/x86_instruction_emulator/Makefile
@@ -8,11 +8,15 @@ else
 x86-instruction-emulator-fuzzer-all:
 endif
 
-x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h:
-       [ -L x86_emulate ] || ln -sf $(XEN_ROOT)/xen/arch/x86/x86_emulate .
+x86_emulate:
+       [ -L $@ ] || ln -sf $(XEN_ROOT)/xen/arch/x86/$@
 
-asm/x86-vendors.h asm/x86-defns.h asm/msr-index.h:
-       [ -L asm ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 asm
+x86_emulate/%: x86_emulate ;
+
+asm:
+       [ -L $@ ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 $@
+
+asm/%: asm ;
 
 x86_emulate.c x86_emulate.h: %:
        [ -L $* ] || ln -sf $(XEN_ROOT)/tools/tests/x86_emulator/$*
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.