* [PATCH] xentrace: free CPU mask string before overwriting pointer
@ 2025-01-14 8:12 Jan Beulich
2025-01-14 9:28 ` Andrew Cooper
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jan Beulich @ 2025-01-14 8:12 UTC (permalink / raw)
To: xen-devel@lists.xenproject.org; +Cc: Anthony PERARD, Oleksii Kurochko
While multiple -c options may be unexpected, we'd still better deal with
them properly.
Also restore the blank line that was bogusly zapped by the same commit.
Coverity-ID: 1638723
Fixes: e4ad2836842a ("xentrace: Implement cpu mask range parsing of human values (-c)")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/tools/xentrace/xentrace.c
+++ b/tools/xentrace/xentrace.c
@@ -1105,8 +1105,10 @@ static void parse_args(int argc, char **
break;
case 'c': /* set new cpu mask for filtering (when xch is set). */
+ free(opts.cpu_mask_str);
opts.cpu_mask_str = strdup(optarg);
break;
+
case 'e': /* set new event mask for filtering*/
parse_evtmask(optarg);
break;
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] xentrace: free CPU mask string before overwriting pointer
2025-01-14 8:12 [PATCH] xentrace: free CPU mask string before overwriting pointer Jan Beulich
@ 2025-01-14 9:28 ` Andrew Cooper
2025-01-14 11:24 ` Oleksii Kurochko
2025-01-16 13:07 ` Anthony PERARD
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Cooper @ 2025-01-14 9:28 UTC (permalink / raw)
To: Jan Beulich, xen-devel@lists.xenproject.org
Cc: Anthony PERARD, Oleksii Kurochko
On 14/01/2025 8:12 am, Jan Beulich wrote:
> While multiple -c options may be unexpected, we'd still better deal with
> them properly.
>
> Also restore the blank line that was bogusly zapped by the same commit.
>
> Coverity-ID: 1638723
> Fixes: e4ad2836842a ("xentrace: Implement cpu mask range parsing of human values (-c)")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] xentrace: free CPU mask string before overwriting pointer
2025-01-14 8:12 [PATCH] xentrace: free CPU mask string before overwriting pointer Jan Beulich
2025-01-14 9:28 ` Andrew Cooper
@ 2025-01-14 11:24 ` Oleksii Kurochko
2025-01-16 13:07 ` Anthony PERARD
2 siblings, 0 replies; 4+ messages in thread
From: Oleksii Kurochko @ 2025-01-14 11:24 UTC (permalink / raw)
To: Jan Beulich, xen-devel@lists.xenproject.org; +Cc: Anthony PERARD
[-- Attachment #1: Type: text/plain, Size: 932 bytes --]
On 1/14/25 9:12 AM, Jan Beulich wrote:
> While multiple -c options may be unexpected, we'd still better deal with
> them properly.
>
> Also restore the blank line that was bogusly zapped by the same commit.
>
> Coverity-ID: 1638723
> Fixes: e4ad2836842a ("xentrace: Implement cpu mask range parsing of human values (-c)")
> Signed-off-by: Jan Beulich<jbeulich@suse.com>
R-Acked-by: Oleksii Kurochko<oleksii.kurochko@gmail.com>
Thanks.
~ Oleksii
>
> --- a/tools/xentrace/xentrace.c
> +++ b/tools/xentrace/xentrace.c
> @@ -1105,8 +1105,10 @@ static void parse_args(int argc, char **
> break;
>
> case 'c': /* set new cpu mask for filtering (when xch is set). */
> + free(opts.cpu_mask_str);
> opts.cpu_mask_str = strdup(optarg);
> break;
> +
> case 'e': /* set new event mask for filtering*/
> parse_evtmask(optarg);
> break;
[-- Attachment #2: Type: text/html, Size: 1612 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] xentrace: free CPU mask string before overwriting pointer
2025-01-14 8:12 [PATCH] xentrace: free CPU mask string before overwriting pointer Jan Beulich
2025-01-14 9:28 ` Andrew Cooper
2025-01-14 11:24 ` Oleksii Kurochko
@ 2025-01-16 13:07 ` Anthony PERARD
2 siblings, 0 replies; 4+ messages in thread
From: Anthony PERARD @ 2025-01-16 13:07 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, Oleksii Kurochko
On Tue, Jan 14, 2025 at 09:12:37AM +0100, Jan Beulich wrote:
> While multiple -c options may be unexpected, we'd still better deal with
> them properly.
>
> Also restore the blank line that was bogusly zapped by the same commit.
>
> Coverity-ID: 1638723
> Fixes: e4ad2836842a ("xentrace: Implement cpu mask range parsing of human values (-c)")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Anthony PERARD <anthony.perard@vates.tech>
Thanks,
--
| Vates
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-01-16 13:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-14 8:12 [PATCH] xentrace: free CPU mask string before overwriting pointer Jan Beulich
2025-01-14 9:28 ` Andrew Cooper
2025-01-14 11:24 ` Oleksii Kurochko
2025-01-16 13:07 ` Anthony PERARD
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.