Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: jeremie.galarneau@efficios.com (Jérémie Galarneau)
Subject: [lttng-dev] [PATCH lttng-tools] Fix: Don't dispatch uninitialized hash tables to the ht_cleanup thread
Date: Mon, 11 Nov 2013 14:43:16 -0500	[thread overview]
Message-ID: <1384198996-29028-1-git-send-email-jeremie.galarneau@efficios.com> (raw)

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 85a1f02..5efa1d4 100644
--- a/src/bin/lttng-sessiond/utils.c
+++ b/src/bin/lttng-sessiond/utils.c
@@ -54,6 +54,9 @@ void ht_cleanup_push(struct lttng_ht *ht)
 	int ret;
 	int fd = ht_cleanup_pipe[1];
 
+	if (!ht) {
+		return;
+	}
 	if (fd < 0)
 		return;
 	do {
-- 
1.8.4.2




             reply	other threads:[~2013-11-11 19:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 19:43 Jérémie Galarneau [this message]
2013-11-11 20:30 ` [lttng-dev] [PATCH lttng-tools v2] " Jérémie Galarneau
2013-11-11 20:45   ` 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=1384198996-29028-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