From 65a0d61939d258fe7c6bc6666315603f7a2e52de Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 11 Feb 2019 18:35:46 +0100 Subject: pkg/host: don't fail if CONFIG_FAIL_FUTEX is not enabled See #991 and added comments. Fixes #991 --- pkg/csource/csource.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/csource/csource.go') diff --git a/pkg/csource/csource.go b/pkg/csource/csource.go index bcb40472a..26834dd3f 100644 --- a/pkg/csource/csource.go +++ b/pkg/csource/csource.go @@ -174,8 +174,12 @@ func (ctx *context) generateCalls(p prog.ExecProg, trace bool) ([]string, []uint } if ctx.opts.Fault && ctx.opts.FaultCall == ci { + // Note: these files are also hardcoded in pkg/host/host_linux.go. fmt.Fprintf(w, "\twrite_file(\"/sys/kernel/debug/failslab/ignore-gfp-wait\", \"N\");\n") fmt.Fprintf(w, "\twrite_file(\"/sys/kernel/debug/fail_futex/ignore-private\", \"N\");\n") + fmt.Fprintf(w, "\twrite_file(\"/sys/kernel/debug/fail_page_alloc/ignore-gfp-highmem\", \"N\");\n") + fmt.Fprintf(w, "\twrite_file(\"/sys/kernel/debug/fail_page_alloc/ignore-gfp-wait\", \"N\");\n") + fmt.Fprintf(w, "\twrite_file(\"/sys/kernel/debug/fail_page_alloc/min-order\", \"0\");\n") fmt.Fprintf(w, "\tinject_fault(%v);\n", ctx.opts.FaultNth) } // Call itself. -- cgit mrf-deployment