aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_linux.h
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-07-16 19:02:46 +0200
committerDmitry Vyukov <dvyukov@google.com>2025-07-17 12:38:59 +0000
commit338f25e2408a360bd3af7f03091b1cbda0887a52 (patch)
tree841da4021ff2cf2369ecf08a7be2251d948e3507 /executor/common_linux.h
parent0d1223f1dc0faefcf010d6ee3e5a1e9571a1ad1a (diff)
executor: neutralize errors=panic for gfs2 mounts
Append errors=withdraw to the mount options so that gfs2 withdrawals don't lead to kernel panics. Closes #6189.
Diffstat (limited to 'executor/common_linux.h')
-rw-r--r--executor/common_linux.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h
index f9d23ad29..dea1ba0c8 100644
--- a/executor/common_linux.h
+++ b/executor/common_linux.h
@@ -3151,6 +3151,9 @@ static long syz_mount_image(
// For xfs we need nouuid because xfs has a global uuids table
// and if two parallel executors mounts fs with the same uuid, second mount fails.
strcat(opts, ",nouuid");
+ } else if (strncmp(fs, "gfs2", 4) == 0 && (strstr(opts, "errors=panic") || strstr(opts, "debug"))) {
+ // Otherwise ordinary withdrawals turn into kernel panics, see #6189.
+ strcat(opts, ",errors=withdraw");
}
debug("syz_mount_image: size=%llu loop='%s' dir='%s' fs='%s' flags=%llu opts='%s'\n", (uint64)size, loopname, target, fs, (uint64)flags, opts);
#if SYZ_EXECUTOR