From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DD51AA00C2 for ; Thu, 10 Feb 2022 16:35:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D287E42745; Thu, 10 Feb 2022 16:35:46 +0100 (CET) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id 76311426ED; Thu, 10 Feb 2022 16:35:44 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 0E11E5C0218; Thu, 10 Feb 2022 10:35:44 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 10 Feb 2022 10:35:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=DQVCwOW2ex8aMD LQofL/7JXF81fd+y6JaL0H8iKdmlk=; b=Bi4z/E9zr3I/F5fNEJrezrH+A+XjWN rdb31HWudO928KvA0ZbYRGLxfErd0J5gzNjgmU6vOUru0AR7fvtWbR0o1urMWmGI hxdKqUl/hF9OBDz0HLLQXEZwkbiI46MNU9APwZqwW3pAWMeffDXGNh35/rzONbUc k9x0gCkRibGNUIWDVc4TaQTOGJWUNAWuE45yU2b4A9l3T/KPBX09Kpr/sO+8StTJ axpjQehiMutRbSu/xyuwip7Ph/qGTJapk/6xgh4jUD916FoHG5VLLL6AnFB9rwbM Ds/R0CAwzmo1HZlsfO8Dq6+fpkHSeIP4Ksb+1ouG1534QshKbcl59ThA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=DQVCwOW2ex8aMDLQofL/7JXF81fd+y6JaL0H8iKdm lk=; b=GunPTbgBr/zz6XvBZLNj7IrDuIo138ASeMXY5k/QRNVfhzcXMjSOmQtEL WT/Oq0LNDEOe0mNGYV5WZ5oGkCTUlC17yEtPmQa1RvsWInQWu7Dq4QuWUOUueL3G GQWvVe7tB9Zh0mESerCIdR9afvxrbSETdSYNsu117hUgOhXs8qP4HnNy1BAg8Yos 9Y46OLB+CmWdZyi+y7ff+pv2IaAE8NPdscIV+rjYT2NEYvHPwwljIC8CGOXWws8E ubxCAW2GldcqkFWZhDxool8YfHARRkh6v72BbjWeKhu6JRRgN03igUKLLCCWHilp yMt4qlnJyUUp1CIyUaGBf6sLYBEBA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddriedugdejiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfgjfhgggfgtsehtufertd dttddvnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehm ohhnjhgrlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnhepudeggfdvfeduffdtfeegle fghfeukefgfffhueejtdetuedtjeeuieeivdffgeehnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnh gvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 10 Feb 2022 10:35:42 -0500 (EST) From: Thomas Monjalon To: Weiguo Li Cc: orika@nvidia.com, dev@dpdk.org, stable@dpdk.org Subject: Re: [PATCH] regex/mlx5: fix improper memory object check Date: Thu, 10 Feb 2022 16:35:41 +0100 Message-ID: <5772253.alqRGMn8q6@thomas> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 25/01/2022 12:51, Weiguo Li: > Fixes: e3dbbf718ebc ("regex/mlx5: support configuration") Adding Cc stable@dpdk.org for backport. > Signed-off-by: Weiguo Li > --- > drivers/regex/mlx5/mlx5_rxp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/regex/mlx5/mlx5_rxp.c b/drivers/regex/mlx5/mlx5_rxp.c > index 5ead3ca341..51b6e71376 100644 > --- a/drivers/regex/mlx5/mlx5_rxp.c > +++ b/drivers/regex/mlx5/mlx5_rxp.c > @@ -148,7 +148,7 @@ mlx5_regex_configure(struct rte_regexdev *dev, > dev->data->dev_conf.nb_queue_pairs = priv->nb_queues; > priv->qps = rte_zmalloc(NULL, sizeof(struct mlx5_regex_qp) * > priv->nb_queues, 0); > - if (!priv->nb_queues) { > + if (!priv->qps) { > DRV_LOG(ERR, "can't allocate qps memory"); This mistake would have been caught earlier if the coding style was respected: a pointer should be explictly compared with NULL. Applied, thanks.