Fix: handle_notification_thread_command: handle partial read
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 Fix: handle_notification_thread_command: handle partial read
Use lttng_read() to handle partial reads (returning less than the requested amount of bytes) as well as ret = -1, errno == EINTR.
Signed-off-by Mathieu Desnoyers <[email protected]>
--- src/bin/lttng-sessiond/notification-thread-events.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
src/bin/lttng-sessiond/notification-thread-events.c +2 -2
@@ -2277,9 +2277,9 @@ int handle_notification_thread_command(struct notification_thread_command *cmd;/* Read the event pipe to put it back into a quiescent state. */ - ret =read (lttng_pipe_get_readfd (handle->cmd_queue.event_pipe), &counter, + ret =lttng_read (lttng_pipe_get_readfd (handle->cmd_queue.event_pipe), &counter,sizeof (counter)); -if (ret ==-1 ) { +if (ret !=sizeof (counter)) { goto error; }
Signature · 1 line
2.11.0
Re: [PATCH lttng-tools 1/2] Fix: notification thread: free session trigger list on error
In reply to a message not in the archiveBoth patches were merged in master and stable-2.11.
Thanks!
Jérémie
Quoted 21 lines · Mathieu Desnoyers
Signed-off-by Mathieu Desnoyers <[email protected]>--- src/bin/lttng-sessiond/notification-thread-events.c | 1 + 1 file changed, 1 insertion(+)src/bin/lttng-sessiond/notification-thread-events.c +1
-1@@ -1518,6 +1518,7 @@ struct session_info *find_or_create_session_info(if (!session) {ERR ("[notification-thread] Failed to allocation session info for session \"%s\" (uid = %i, gid = %i)" , name, uid, gid); +lttng_session_trigger_list_destroy (trigger_list); goto error; } trigger_list =NULL ; --2.11.0
Signature · 7 lines
Jérémie Galarneau EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
A message that is not in the archive (sent off-list or not yet received): [email protected]
Note that this patch was merged in stable-2.10 too.
Jérémie
Quoted 28 lines · Mathieu Desnoyers
Use
lttng_read()to handle partial reads (returning less than the requested amount of bytes) as well as ret = -1, errno == EINTR.Signed-off-by Mathieu Desnoyers <[email protected]>--- src/bin/lttng-sessiond/notification-thread-events.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)src/bin/lttng-sessiond/notification-thread-events.c +2
-3@@ -2277,9 +2277,9 @@ int handle_notification_thread_command(struct notification_thread_command *cmd;/* Read the event pipe to put it back into a quiescent state. */ - ret =read (lttng_pipe_get_readfd (handle->cmd_queue.event_pipe), &counter, + ret =lttng_read (lttng_pipe_get_readfd (handle->cmd_queue.event_pipe), &counter,sizeof (counter)); -if (ret ==-1 ) { +if (ret !=sizeof (counter)) { goto error; } --2.11.0
Signature · 7 lines
Jérémie Galarneau EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev