projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: sessiond: unbalanced health register/unregister on error
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
notification-thread.c
diff --git
a/src/bin/lttng-sessiond/notification-thread.c
b/src/bin/lttng-sessiond/notification-thread.c
index 7998f7e21fbcf73818472312889a6794abe095d3..8d69ef7c45919448d227056ad82880e21a476e48 100644
(file)
--- a/
src/bin/lttng-sessiond/notification-thread.c
+++ b/
src/bin/lttng-sessiond/notification-thread.c
@@
-172,7
+172,7
@@
char *get_notification_channel_sock_path(void)
goto error;
}
} else {
goto error;
}
} else {
- char *home_path = utils_get_home_dir();
+ c
onst c
har *home_path = utils_get_home_dir();
if (!home_path) {
ERR("Can't get HOME directory for socket creation");
if (!home_path) {
ERR("Can't get HOME directory for socket creation");
@@
-530,15
+530,15
@@
void *thread_notification(void *data)
DBG("[notification-thread] Started notification thread");
DBG("[notification-thread] Started notification thread");
+ health_register(health_sessiond, HEALTH_SESSIOND_TYPE_NOTIFICATION);
+ rcu_register_thread();
+ rcu_thread_online();
+
if (!handle) {
ERR("[notification-thread] Invalid thread context provided");
goto end;
}
if (!handle) {
ERR("[notification-thread] Invalid thread context provided");
goto end;
}
- rcu_register_thread();
- rcu_thread_online();
-
- health_register(health_sessiond, HEALTH_SESSIOND_TYPE_NOTIFICATION);
health_code_update();
ret = init_thread_state(handle, &state);
health_code_update();
ret = init_thread_state(handle, &state);
@@
-570,9
+570,6
@@
void *thread_notification(void *data)
int fd = LTTNG_POLL_GETFD(&state.events, i);
uint32_t revents = LTTNG_POLL_GETEV(&state.events, i);
int fd = LTTNG_POLL_GETFD(&state.events, i);
uint32_t revents = LTTNG_POLL_GETEV(&state.events, i);
- if (!revents) {
- continue;
- }
DBG("[notification-thread] Handling fd (%i) activity (%u)", fd, revents);
if (fd == state.notification_channel_socket) {
DBG("[notification-thread] Handling fd (%i) activity (%u)", fd, revents);
if (fd == state.notification_channel_socket) {
@@
-645,10
+642,10
@@
void *thread_notification(void *data)
exit:
error:
fini_thread_state(&state);
exit:
error:
fini_thread_state(&state);
- health_unregister(health_sessiond);
+end:
rcu_thread_offline();
rcu_unregister_thread();
rcu_thread_offline();
rcu_unregister_thread();
-end:
+ health_unregister(health_sessiond);
return NULL;
}
return NULL;
}
This page took
0.026464 seconds
and
4
git commands to generate.