From c5241dad5fe9193c452cf27093b005538a2a8a73 Mon Sep 17 00:00:00 2001 From: Steve Grubb Date: Thu, 25 Apr 2024 16:24:20 -0400 Subject: [PATCH] fanotify descriptor race on shutdown During shutdown, the main thread proceeds faster than the decision thread. Make the descriptor invalid so that the thread sanitizer doesn't complain. --- src/daemon/notify.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/daemon/notify.c b/src/daemon/notify.c index 9f0c5d53..993d8c76 100644 --- a/src/daemon/notify.c +++ b/src/daemon/notify.c @@ -230,6 +230,7 @@ void unmark_fanotify_and_close_fd(mlist *m) } close(fd); + fd = -1; // make invalid in case decision thread is not shutdown } void shutdown_fanotify(mlist *m)