* [PATCH lttng-tools v2] Fix: Don't dispatch uninitialized hash tables to the ht_cleanup thread
[not found] <1384198996-29028-1-git-send-email-jeremie.galarneau@efficios.com>
@ 2013-11-11 20:30 ` Jérémie Galarneau
[not found] ` <1384201808-29812-1-git-send-email-jeremie.galarneau@efficios.com>
1 sibling, 0 replies; 2+ messages in thread
From: Jérémie Galarneau @ 2013-11-11 20:30 UTC (permalink / raw)
To: lttng-dev
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@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
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH lttng-tools v2] Fix: Don't dispatch uninitialized hash tables to the ht_cleanup thread
[not found] ` <1384201808-29812-1-git-send-email-jeremie.galarneau@efficios.com>
@ 2013-11-11 20:45 ` David Goulet
0 siblings, 0 replies; 2+ messages in thread
From: David Goulet @ 2013-11-11 20:45 UTC (permalink / raw)
To: Jérémie Galarneau; +Cc: lttng-dev
[-- Attachment #1.1: Type: text/plain, Size: 965 bytes --]
Merged!
On 11 Nov (15:30:08), Jérémie Galarneau wrote:
> 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@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
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]
[-- Attachment #2: Type: text/plain, Size: 155 bytes --]
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-11 20:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1384198996-29028-1-git-send-email-jeremie.galarneau@efficios.com>
2013-11-11 20:30 ` [PATCH lttng-tools v2] Fix: Don't dispatch uninitialized hash tables to the ht_cleanup thread Jérémie Galarneau
[not found] ` <1384201808-29812-1-git-send-email-jeremie.galarneau@efficios.com>
2013-11-11 20:45 ` David Goulet
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.