From: jeremie.galarneau@efficios.com (Jérémie Galarneau)
Subject: [lttng-dev] [PATCH lttng-tools v2] Fix: Don't dispatch uninitialized hash tables to the ht_cleanup thread
Date: Mon, 11 Nov 2013 15:30:08 -0500 [thread overview]
Message-ID: <1384201808-29812-1-git-send-email-jeremie.galarneau@efficios.com> (raw)
In-Reply-To: <1384198996-29028-1-git-send-email-jeremie.galarneau@efficios.com>
Some error-handling code paths may call ht_cleanup_push() with NULL hash
tables which will crash the clean-up thread.
Signed-off-by: J?r?mie Galarneau <jeremie.galarneau at efficios.com>
---
src/bin/lttng-sessiond/utils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/bin/lttng-sessiond/utils.c b/src/bin/lttng-sessiond/utils.c
index 2ff57cd..c9c51ed 100644
--- a/src/bin/lttng-sessiond/utils.c
+++ b/src/bin/lttng-sessiond/utils.c
@@ -52,6 +52,9 @@ void ht_cleanup_push(struct lttng_ht *ht)
ssize_t ret;
int fd = ht_cleanup_pipe[1];
+ if (!ht) {
+ return;
+ }
if (fd < 0)
return;
ret = lttng_write(fd, &ht, sizeof(ht));
--
1.8.4.2
next prev parent reply other threads:[~2013-11-11 20:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-11 19:43 [lttng-dev] [PATCH lttng-tools] " Jérémie Galarneau
2013-11-11 20:30 ` Jérémie Galarneau [this message]
2013-11-11 20:45 ` [lttng-dev] [PATCH lttng-tools v2] " David Goulet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1384201808-29812-1-git-send-email-jeremie.galarneau@efficios.com \
--to=jeremie.galarneau@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox