patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v1] eventdev: fix invalid memory free operation
@ 2023-02-28 21:31 Abdullah Sevincer
  2023-03-03 15:55 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: Abdullah Sevincer @ 2023-02-28 21:31 UTC (permalink / raw)
  To: dev; +Cc: jerinj, pbhagavatula, Abdullah Sevincer, stable

This commit fixes invalid memory free operation
caused by extending xstats ID width from 32 to 64 bits.

Telemetry application crashed when freeing memory,
hence, the telemetry app could not display xstats.

Fixes: 1bdfe4d76e98 ("eventdev: increase xstats ID width to 64 bits")
Cc: stable@dpdk.org

Signed-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com>
---
 lib/eventdev/rte_eventdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 71a29f3506..6ab4524332 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -1725,7 +1725,7 @@ eventdev_build_telemetry_data(int dev_id,
 	if (xstat_names == NULL)
 		return -1;
 
-	ids = malloc((sizeof(unsigned int)) * num_xstats);
+	ids = malloc((sizeof(uint64_t)) * num_xstats);
 	if (ids == NULL) {
 		free(xstat_names);
 		return -1;
-- 
2.25.1


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

* Re: [PATCH v1] eventdev: fix invalid memory free operation
  2023-02-28 21:31 [PATCH v1] eventdev: fix invalid memory free operation Abdullah Sevincer
@ 2023-03-03 15:55 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2023-03-03 15:55 UTC (permalink / raw)
  To: Abdullah Sevincer; +Cc: dev, jerinj, pbhagavatula, stable

On Wed, Mar 1, 2023 at 3:01 AM Abdullah Sevincer
<abdullah.sevincer@intel.com> wrote:
>
> This commit fixes invalid memory free operation
> caused by extending xstats ID width from 32 to 64 bits.
>
> Telemetry application crashed when freeing memory,
> hence, the telemetry app could not display xstats.
>
> Fixes: 1bdfe4d76e98 ("eventdev: increase xstats ID width to 64 bits")
> Cc: stable@dpdk.org
>
> Signed-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com>

Looks good to me.

Acked-by: Jerin Jacob <jerinj@marvell.com>


Updated the git commit as follows and applied to
dpdk-next-net-eventdev/for-main. Thanks


    eventdev: fix invalid memory free operation

    Fixe the invalid memory free operation caused by extending
    xstats ID width from 32 to 64 bits.

    Telemetry application crashed when freeing memory,
    hence, the telemetry app could not display xstats.

    Fixes: 1bdfe4d76e98 ("eventdev: increase xstats ID width to 64 bits")
    Cc: stable@dpdk.org

    Signed-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com>
    Acked-by: Jerin Jacob <jerinj@marvell.com>
> ---
>  lib/eventdev/rte_eventdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
> index 71a29f3506..6ab4524332 100644
> --- a/lib/eventdev/rte_eventdev.c
> +++ b/lib/eventdev/rte_eventdev.c
> @@ -1725,7 +1725,7 @@ eventdev_build_telemetry_data(int dev_id,
>         if (xstat_names == NULL)
>                 return -1;
>
> -       ids = malloc((sizeof(unsigned int)) * num_xstats);
> +       ids = malloc((sizeof(uint64_t)) * num_xstats);
>         if (ids == NULL) {
>                 free(xstat_names);
>                 return -1;
> --
> 2.25.1
>

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

end of thread, other threads:[~2023-03-03 15:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-28 21:31 [PATCH v1] eventdev: fix invalid memory free operation Abdullah Sevincer
2023-03-03 15:55 ` Jerin Jacob

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).