* Re: [PATCH lttng-ust] Fix: Initialize fd field of struct lttng_ust_elf to -1 at allocation
[not found] <20181114193837.23813-1-jonathan.rajotte-julien@efficios.com>
@ 2019-01-22 15:41 ` Jonathan Rajotte-Julien
[not found] ` <20190122154104.GA17450@joraj-alpa>
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Rajotte-Julien @ 2019-01-22 15:41 UTC (permalink / raw)
To: lttng-dev
Hi Mathieu,
Any feedback regarding this patch?
Cheers
On Wed, Nov 14, 2018 at 02:38:37PM -0500, Jonathan Rajotte wrote:
> In rare cases when the executable cannot be open, using a default value
> of zero lead to invalid close call and fd tracker removal.
>
> fixes #1171
>
> Reported-by: Stefan Palade <stefan.palade@windriver.com>
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
> ---
> liblttng-ust/lttng-ust-elf.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/liblttng-ust/lttng-ust-elf.c b/liblttng-ust/lttng-ust-elf.c
> index c073e7a5..3d6a9379 100644
> --- a/liblttng-ust/lttng-ust-elf.c
> +++ b/liblttng-ust/lttng-ust-elf.c
> @@ -250,6 +250,8 @@ struct lttng_ust_elf *lttng_ust_elf_create(const char *path)
> goto error;
> }
>
> + /* Initialize fd field to -1. 0 is a valid fd number */
> + elf->fd = -1;
>
> elf->path = strdup(path);
> if (!elf->path) {
> --
> 2.17.1
>
--
Jonathan Rajotte-Julien
EfficiOS
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH lttng-ust] Fix: Initialize fd field of struct lttng_ust_elf to -1 at allocation
[not found] ` <20190122154104.GA17450@joraj-alpa>
@ 2019-01-22 21:51 ` Mathieu Desnoyers
0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Desnoyers @ 2019-01-22 21:51 UTC (permalink / raw)
To: Jonathan Rajotte; +Cc: lttng-dev
It slipped through. I'll merge it right away.
Thanks for the reminder!
Mathieu
----- On Jan 22, 2019, at 10:41 AM, Jonathan Rajotte jonathan.rajotte-julien@efficios.com wrote:
> Hi Mathieu,
>
> Any feedback regarding this patch?
>
> Cheers
>
> On Wed, Nov 14, 2018 at 02:38:37PM -0500, Jonathan Rajotte wrote:
>> In rare cases when the executable cannot be open, using a default value
>> of zero lead to invalid close call and fd tracker removal.
>>
>> fixes #1171
>>
>> Reported-by: Stefan Palade <stefan.palade@windriver.com>
>> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
>> ---
>> liblttng-ust/lttng-ust-elf.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/liblttng-ust/lttng-ust-elf.c b/liblttng-ust/lttng-ust-elf.c
>> index c073e7a5..3d6a9379 100644
>> --- a/liblttng-ust/lttng-ust-elf.c
>> +++ b/liblttng-ust/lttng-ust-elf.c
>> @@ -250,6 +250,8 @@ struct lttng_ust_elf *lttng_ust_elf_create(const char *path)
>> goto error;
>> }
>>
>> + /* Initialize fd field to -1. 0 is a valid fd number */
>> + elf->fd = -1;
>>
>> elf->path = strdup(path);
>> if (!elf->path) {
>> --
>> 2.17.1
>>
>
> --
> Jonathan Rajotte-Julien
> EfficiOS
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH lttng-ust] Fix: Initialize fd field of struct lttng_ust_elf to -1 at allocation
@ 2018-11-14 19:38 Jonathan Rajotte
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Rajotte @ 2018-11-14 19:38 UTC (permalink / raw)
To: lttng-dev
In rare cases when the executable cannot be open, using a default value
of zero lead to invalid close call and fd tracker removal.
fixes #1171
Reported-by: Stefan Palade <stefan.palade@windriver.com>
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
---
liblttng-ust/lttng-ust-elf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/liblttng-ust/lttng-ust-elf.c b/liblttng-ust/lttng-ust-elf.c
index c073e7a5..3d6a9379 100644
--- a/liblttng-ust/lttng-ust-elf.c
+++ b/liblttng-ust/lttng-ust-elf.c
@@ -250,6 +250,8 @@ struct lttng_ust_elf *lttng_ust_elf_create(const char *path)
goto error;
}
+ /* Initialize fd field to -1. 0 is a valid fd number */
+ elf->fd = -1;
elf->path = strdup(path);
if (!elf->path) {
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-22 21:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20181114193837.23813-1-jonathan.rajotte-julien@efficios.com>
2019-01-22 15:41 ` [PATCH lttng-ust] Fix: Initialize fd field of struct lttng_ust_elf to -1 at allocation Jonathan Rajotte-Julien
[not found] ` <20190122154104.GA17450@joraj-alpa>
2019-01-22 21:51 ` Mathieu Desnoyers
2018-11-14 19:38 Jonathan Rajotte
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.