diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-02-11 18:35:46 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-02-11 18:35:46 +0100 |
| commit | 65a0d61939d258fe7c6bc6666315603f7a2e52de (patch) | |
| tree | 40d96538dd19e4f71f8ed6fb37f16497ec79f2ad /pkg/csource/csource.go | |
| parent | a39e52b1cd39d5d3b80a8a379554461a4b31fbc8 (diff) | |
pkg/host: don't fail if CONFIG_FAIL_FUTEX is not enabled
See #991 and added comments.
Fixes #991
Diffstat (limited to 'pkg/csource/csource.go')
| -rw-r--r-- | pkg/csource/csource.go | 4 |
1 files changed, 4 insertions, 0 deletions
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. |
