Skip to content

Commit

Permalink
fanotify descriptor race on shutdown
Browse files Browse the repository at this point in the history
During shutdown, the main thread proceeds faster than the decision thread.
Make the descriptor invalid so that the thread sanitizer doesn't complain.
  • Loading branch information
RH-steve-grubb committed Apr 25, 2024
1 parent a9a57c6 commit c5241da
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/daemon/notify.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c5241da

Please sign in to comment.