projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: add missing rcu_barrier before daemon teardown
[lttng-tools.git]
/
src
/
bin
/
lttng-consumerd
/
lttng-consumerd.c
diff --git
a/src/bin/lttng-consumerd/lttng-consumerd.c
b/src/bin/lttng-consumerd/lttng-consumerd.c
index 00660fcd6a7d401aa3096236026eabd1900d5f64..293654053e87ad046d4cc2716de75e1934b513f8 100644
(file)
--- a/
src/bin/lttng-consumerd/lttng-consumerd.c
+++ b/
src/bin/lttng-consumerd/lttng-consumerd.c
@@
-99,14
+99,6
@@
static void sighandler(int sig)
return;
}
return;
}
- /*
- * Ignore SIGPIPE because it should not stop the consumer whenever a
- * SIGPIPE is caught through a FD operation.
- */
- if (sig == SIGPIPE) {
- return;
- }
-
if (ctx) {
lttng_consumer_should_exit(ctx);
}
if (ctx) {
lttng_consumer_should_exit(ctx);
}
@@
-127,9
+119,10
@@
static int set_signal_handler(void)
return ret;
}
return ret;
}
- sa.sa_handler = sighandler;
sa.sa_mask = sigset;
sa.sa_flags = 0;
sa.sa_mask = sigset;
sa.sa_flags = 0;
+
+ sa.sa_handler = sighandler;
if ((ret = sigaction(SIGTERM, &sa, NULL)) < 0) {
PERROR("sigaction");
return ret;
if ((ret = sigaction(SIGTERM, &sa, NULL)) < 0) {
PERROR("sigaction");
return ret;
@@
-140,6
+133,7
@@
static int set_signal_handler(void)
return ret;
}
return ret;
}
+ sa.sa_handler = SIG_IGN;
if ((ret = sigaction(SIGPIPE, &sa, NULL)) < 0) {
PERROR("sigaction");
return ret;
if ((ret = sigaction(SIGPIPE, &sa, NULL)) < 0) {
PERROR("sigaction");
return ret;
@@
-634,6
+628,12
@@
exit_init_data:
tmp_ctx = ctx;
ctx = NULL;
cmm_barrier(); /* Clear ctx for signal handler. */
tmp_ctx = ctx;
ctx = NULL;
cmm_barrier(); /* Clear ctx for signal handler. */
+ /*
+ * Wait for all pending call_rcu work to complete before tearing
+ * down data structures. call_rcu worker may be trying to
+ * perform lookups in those structures.
+ */
+ rcu_barrier();
lttng_consumer_destroy(tmp_ctx);
lttng_consumer_cleanup();
lttng_consumer_destroy(tmp_ctx);
lttng_consumer_cleanup();
This page took
0.028398 seconds
and
4
git commands to generate.