DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yongseok Koh <yskoh@mellanox.com>
To: Dekel Peled <dekelp@mellanox.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>, dev <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 2/4] net/mlx5: fix missing validation of null pointer
Date: Thu, 2 May 2019 18:12:48 +0000	[thread overview]
Message-ID: <F4070EB1-88A6-4310-B5E2-F6CED52A83CC@mellanox.com> (raw)
Message-ID: <20190502181248.RnxSQjdoDCI6ovopLMKhpDaFm0lz2XFF2a_93-ZGBeg@z> (raw)
In-Reply-To: <c85536ec3c5ab40ef85f11ca0d175d15277f2a83.1556809050.git.dekelp@mellanox.com>


> On May 2, 2019, at 8:01 AM, Dekel Peled <dekelp@mellanox.com> wrote:
> 
> Function mlx5_rxq_ibv_release() is called in several places.
> Before each call except one, the input parameter is validated to make
> sure it is not null.
> 
> This patch adds the missing validation where it is missing.
> 
> Fixes: af4f09f28294 ("net/mlx5: prefix all functions with mlx5")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_rxq.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> index db8c340..c9c2a14 100644
> --- a/drivers/net/mlx5/mlx5_rxq.c
> +++ b/drivers/net/mlx5/mlx5_rxq.c
> @@ -617,7 +617,8 @@
> 		 */
> 		rxq_data = (*priv->rxqs)[i];
> 		rxq_ctrl = container_of(rxq_data, struct mlx5_rxq_ctrl, rxq);
> -		mlx5_rxq_ibv_release(rxq_ctrl->ibv);
> +		if (rxq_ctrl->ibv)
> +			mlx5_rxq_ibv_release(rxq_ctrl->ibv);

Please take care of two more things.

1) In mlx5_rx_intr_disable(), 
mlx5_rxq_ibv_get() isn't paired with mlx5_rxq_ibv_release()
This would need a separate patch.

2) In mlx5_rx_intr_vec_disable()
Please fix the comment having the old name - priv_rx_intr_vec_enable().
This should be mlx5_rx_intr_vec_enable()
No need to have a separate patch. You can fix it in this patch.

With the change,
Acked-by: Yongseok Koh <yskoh@mellanox.com>


> 	}
> free:
> 	rte_intr_free_epoll_fd(intr_handle);
> -- 
> 1.8.3.1
> 


  parent reply	other threads:[~2019-05-02 18:12 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29 11:00 [dpdk-dev] [PATCH 0/4] net/mlx5: code cleanup in rx and tx files Dekel Peled
2019-04-29 11:00 ` Dekel Peled
2019-04-29 11:00 ` [dpdk-dev] [PATCH 1/4] net/mlx5: remove unused functions Dekel Peled
2019-04-29 11:00   ` Dekel Peled
2019-04-29 11:00 ` [dpdk-dev] [PATCH 2/4] net/mlx5: add missing validation of null pointer Dekel Peled
2019-04-29 11:00   ` Dekel Peled
2019-04-29 11:00 ` [dpdk-dev] [PATCH 3/4] net/mlx5: fix description of function return value Dekel Peled
2019-04-29 11:00   ` Dekel Peled
2019-04-29 11:00 ` [dpdk-dev] [PATCH 4/4] net/mlx5: move locally used functions to static Dekel Peled
2019-04-29 11:00   ` Dekel Peled
2019-05-02 14:10 ` [dpdk-dev] [PATCH 0/4] net/mlx5: code cleanup in rx and tx files Shahaf Shuler
2019-05-02 14:10   ` Shahaf Shuler
2019-05-02 15:01 ` [dpdk-dev] [PATCH v2 " Dekel Peled
2019-05-02 15:01   ` Dekel Peled
2019-05-02 15:01   ` [dpdk-dev] [PATCH v2 1/4] net/mlx5: remove unused functions Dekel Peled
2019-05-02 15:01     ` Dekel Peled
2019-05-02 18:13     ` Yongseok Koh
2019-05-02 18:13       ` Yongseok Koh
2019-05-02 15:01   ` [dpdk-dev] [PATCH v2 2/4] net/mlx5: fix missing validation of null pointer Dekel Peled
2019-05-02 15:01     ` Dekel Peled
2019-05-02 18:12     ` Yongseok Koh [this message]
2019-05-02 18:12       ` Yongseok Koh
2019-05-02 15:01   ` [dpdk-dev] [PATCH v2 3/4] net/mlx5: fix description of function return value Dekel Peled
2019-05-02 15:01     ` Dekel Peled
2019-05-02 18:13     ` Yongseok Koh
2019-05-02 18:13       ` Yongseok Koh
2019-05-02 15:01   ` [dpdk-dev] [PATCH v2 4/4] net/mlx5: move locally used functions to static Dekel Peled
2019-05-02 15:01     ` Dekel Peled
2019-05-02 18:14     ` Yongseok Koh
2019-05-02 18:14       ` Yongseok Koh
2019-05-05 13:09   ` [dpdk-dev] [PATCH v3 0/4] net/mlx5: code cleanup in rx and tx files Dekel Peled
2019-05-05 13:09     ` Dekel Peled
2019-05-05 13:09     ` [dpdk-dev] [PATCH v3 1/4] net/mlx5: remove unused functions Dekel Peled
2019-05-05 13:09       ` Dekel Peled
2019-05-05 13:09     ` [dpdk-dev] [PATCH v3 2/4] net/mlx5: fix missing validation of null pointer Dekel Peled
2019-05-05 13:09       ` Dekel Peled
2019-05-05 13:09     ` [dpdk-dev] [PATCH v3 3/4] net/mlx5: fix description of function return value Dekel Peled
2019-05-05 13:09       ` Dekel Peled
2019-05-05 13:09     ` [dpdk-dev] [PATCH v3 4/4] net/mlx5: move locally used functions to static Dekel Peled
2019-05-05 13:09       ` Dekel Peled
2019-05-08  4:43     ` [dpdk-dev] [PATCH v3 0/4] net/mlx5: code cleanup in rx and tx files Shahaf Shuler
2019-05-08  4:43       ` Shahaf Shuler
2019-05-08  8:29     ` [dpdk-dev] [PATCH v4 " Dekel Peled
2019-05-08  8:29       ` Dekel Peled
2019-05-08  8:29       ` [dpdk-dev] [PATCH v4 1/4] net/mlx5: remove unused functions Dekel Peled
2019-05-08  8:29         ` Dekel Peled
2019-05-08  8:29       ` [dpdk-dev] [PATCH v4 2/4] net/mlx5: fix missing validation of null pointer Dekel Peled
2019-05-08  8:29         ` Dekel Peled
2019-05-08  8:29       ` [dpdk-dev] [PATCH v4 3/4] net/mlx5: fix description of function return value Dekel Peled
2019-05-08  8:29         ` Dekel Peled
2019-05-08  8:29       ` [dpdk-dev] [PATCH v4 4/4] net/mlx5: move locally used functions to static Dekel Peled
2019-05-08  8:29         ` Dekel Peled
2019-05-22 20:35       ` [dpdk-dev] [PATCH v4 0/4] net/mlx5: code cleanup in rx and tx files Shahaf Shuler

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=F4070EB1-88A6-4310-B5E2-F6CED52A83CC@mellanox.com \
    --to=yskoh@mellanox.com \
    --cc=dekelp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=shahafs@mellanox.com \
    --cc=stable@dpdk.org \
    /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).