diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-09-11 12:39:25 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-09-11 12:39:25 +0200 |
| commit | e3d1d545d390055ca67987d27243e0d2b37feedd (patch) | |
| tree | 42c2ee714540651d36a3387d7f9f2f6e84b32cbe /executor | |
| parent | a171414b74df01e0978ef1495ccf7c6d901b84cd (diff) | |
executor: reset oom_score_adj for test process
oom_score_adj is inherited, so we need to reset it to 0.
Diffstat (limited to 'executor')
| -rw-r--r-- | executor/common_linux.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index 21433c515..2f5692105 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -2067,6 +2067,10 @@ static void setup_test() if (symlink(cgroupdir, "./cgroup.net")) { debug("symlink(%s, ./cgroup.net) failed: %d\n", cgroupdir, errno); } + // Reset oom_score_adj since it's inherited from parent. + if (!write_file("/proc/self/oom_score_adj", "0")) { + debug("write(oom_score_adj) failed: %d\n", errno); + } #endif #if SYZ_EXECUTOR || SYZ_TUN_ENABLE // Read all remaining packets from tun to better |
