lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH lttng-tools] Fix: use newly created event filter for condition check
       [not found] <20190924145316.21302-1-jonathan.rajotte-julien@efficios.com>
@ 2019-09-24 15:08 ` Mathieu Desnoyers
       [not found] ` <325249304.599.1569337736318.JavaMail.zimbra@efficios.com>
  1 sibling, 0 replies; 3+ messages in thread
From: Mathieu Desnoyers @ 2019-09-24 15:08 UTC (permalink / raw)
  To: Jonathan Rajotte; +Cc: lttng-dev, Jeremie Galarneau

----- On Sep 24, 2019, at 10:53 AM, Jonathan Rajotte jonathan.rajotte-julien@efficios.com wrote:

> 4c5e3185d75ffe90b04107744693964d9051fb6b introduced a regression while
> fixing the filter and filter_expression ownership.

What is this commit ? I'm having trouble finding it. Can you double-check and
provide the commit Subject as well ?

Typically:

commit 1234567890ab "Commit subject" ....

Thanks,

Mathieu

> 
> Setting the "filter" object to NULL prevents the call to
> add_filter_app_ctx when needed.
> 
> We use the filter from the newly created event to
> perform the check and the call to add_filter_app_ctx.
> 
> Fixes coverity #1399733
> 
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
> ---
> src/bin/lttng-sessiond/event.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/bin/lttng-sessiond/event.c b/src/bin/lttng-sessiond/event.c
> index f32db4429..a8b7646da 100644
> --- a/src/bin/lttng-sessiond/event.c
> +++ b/src/bin/lttng-sessiond/event.c
> @@ -513,8 +513,9 @@ int event_agent_enable(struct ltt_ust_session *usess,
> 		created = 1;
> 	}
> 
> -	if (created && filter) {
> -		ret = add_filter_app_ctx(filter, filter_expression, agt);
> +	if (created && aevent->filter) {
> +		ret = add_filter_app_ctx(
> +				aevent->filter, aevent->filter_expression, agt);
> 		if (ret != LTTNG_OK) {
> 			goto error;
> 		}
> --
> 2.17.1
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH lttng-tools] Fix: use newly created event filter for condition check
       [not found] ` <325249304.599.1569337736318.JavaMail.zimbra@efficios.com>
@ 2019-09-24 15:22   ` Jonathan Rajotte-Julien
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Rajotte-Julien @ 2019-09-24 15:22 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: lttng-dev, Jeremie Galarneau

> > 4c5e3185d75ffe90b04107744693964d9051fb6b introduced a regression while
> > fixing the filter and filter_expression ownership.
> 
> What is this commit ? I'm having trouble finding it. Can you double-check and
> provide the commit Subject as well ?

Seems like I copied the parent tree commit.

See v2

Cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH lttng-tools] Fix: use newly created event filter for condition check
@ 2019-09-24 14:53 Jonathan Rajotte
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Rajotte @ 2019-09-24 14:53 UTC (permalink / raw)
  To: lttng-dev; +Cc: jgalar

4c5e3185d75ffe90b04107744693964d9051fb6b introduced a regression while
fixing the filter and filter_expression ownership.

Setting the "filter" object to NULL prevents the call to
add_filter_app_ctx when needed.

We use the filter from the newly created event to
perform the check and the call to add_filter_app_ctx.

Fixes coverity #1399733

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
---
 src/bin/lttng-sessiond/event.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/bin/lttng-sessiond/event.c b/src/bin/lttng-sessiond/event.c
index f32db4429..a8b7646da 100644
--- a/src/bin/lttng-sessiond/event.c
+++ b/src/bin/lttng-sessiond/event.c
@@ -513,8 +513,9 @@ int event_agent_enable(struct ltt_ust_session *usess,
 		created = 1;
 	}
 
-	if (created && filter) {
-		ret = add_filter_app_ctx(filter, filter_expression, agt);
+	if (created && aevent->filter) {
+		ret = add_filter_app_ctx(
+				aevent->filter, aevent->filter_expression, agt);
 		if (ret != LTTNG_OK) {
 			goto error;
 		}
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-24 15:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190924145316.21302-1-jonathan.rajotte-julien@efficios.com>
2019-09-24 15:08 ` [PATCH lttng-tools] Fix: use newly created event filter for condition check Mathieu Desnoyers
     [not found] ` <325249304.599.1569337736318.JavaMail.zimbra@efficios.com>
2019-09-24 15:22   ` Jonathan Rajotte-Julien
2019-09-24 14:53 Jonathan Rajotte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).