Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preload: fix sigmask block and restore race #253

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libumockdev-preload.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ pthread_mutex_t ioctl_lock = PTHREAD_MUTEX_INITIALIZER;
do { \
sigset_t sig_set; \
sigfillset(&sig_set); \
pthread_sigmask(SIG_SETMASK, &sig_set, &trap_path_sig_restore); \
pthread_mutex_lock (&trap_path_lock); \
pthread_sigmask(SIG_SETMASK, &sig_set, &trap_path_sig_restore); \
} while (0)
#define TRAP_PATH_UNLOCK \
do { \
pthread_mutex_unlock (&trap_path_lock); \
pthread_sigmask(SIG_SETMASK, &trap_path_sig_restore, NULL); \
pthread_mutex_unlock (&trap_path_lock); \
} while (0)

#define IOCTL_LOCK pthread_mutex_lock (&ioctl_lock)
Expand Down
Loading