DPDK patches and discussions
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@mellanox.com>
To: Alexander Kozyrev <akozyrev@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	Slava Ovsiienko <viacheslavo@mellanox.com>,
	Matan Azrad <matan@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix TxQ release debug log timing
Date: Mon, 11 May 2020 13:58:58 +0000	[thread overview]
Message-ID: <AM0PR05MB6707C3480E1570DC43F1ED49C2A10@AM0PR05MB6707.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1588788659-25462-1-git-send-email-akozyrev@mellanox.com>

Hi,
> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@mellanox.com>
> Sent: Wednesday, May 6, 2020 9:11 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Raslan Darawsheh <rasland@mellanox.com>; Slava
> Ovsiienko <viacheslavo@mellanox.com>; Matan Azrad
> <matan@mellanox.com>
> Subject: [PATCH] net/mlx5: fix TxQ release debug log timing
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000008ef7c4 in mlx5_tx_queue_release (dpdk_txq=0x17ce01680) at
> drivers/net/mlx5/mlx5_txq.c:302
> 301 mlx5_txq_release(ETH_DEV(priv), i);
> 302 DRV_LOG(DEBUG, "port %u removing Tx queue %u from list",
> 303         PORT_ID(priv), txq->idx);
> The problem is txq is freed inside the mlx5_txq_release() function
> and no longer valid in the debug log right after this invocation.
> Move the debug log before the mlx5_txq_release() function to fix this.
> 
> Fixes: a6d83b6a92 ("net/mlx5: standardize on negative errno values")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
> Acked-by: Matan Azrad <matan@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_txq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
> index 29e5cab..a211fa9 100644
> --- a/drivers/net/mlx5/mlx5_txq.c
> +++ b/drivers/net/mlx5/mlx5_txq.c
> @@ -298,9 +298,9 @@
>  	priv = txq_ctrl->priv;
>  	for (i = 0; (i != priv->txqs_n); ++i)
>  		if ((*priv->txqs)[i] == txq) {
> -			mlx5_txq_release(ETH_DEV(priv), i);
>  			DRV_LOG(DEBUG, "port %u removing Tx queue %u
> from list",
>  				PORT_ID(priv), txq->idx);
> +			mlx5_txq_release(ETH_DEV(priv), i);
>  			break;
>  		}
>  }
> --
> 1.8.3.1

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


      reply	other threads:[~2020-05-11 13:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 18:10 Alexander Kozyrev
2020-05-11 13:58 ` Raslan Darawsheh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR05MB6707C3480E1570DC43F1ED49C2A10@AM0PR05MB6707.eurprd05.prod.outlook.com \
    --to=rasland@mellanox.com \
    --cc=akozyrev@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).