[dpdk-stable] patch 'vhost: remove unneeded null pointer check' has been queued to LTS release 16.11.9

Luca Boccassi bluca at debian.org
Mon Nov 19 13:25:26 CET 2018


Hi,

FYI, your patch has been queued to LTS release 16.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/21/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Luca Boccassi

---
>From 39788a8c71b103ec010838f7605e9fb1f7807bb5 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie at intel.com>
Date: Wed, 7 Nov 2018 17:01:02 +0800
Subject: [PATCH] vhost: remove unneeded null pointer check

[ upstream commit 0541588a44bff07e4aae4c9cde8586326955c378 ]

The caller will guarantee that msg won't be null. Remove
the unneeded null pointer check which caused a Coverity
warning.

Coverity issue: 323484
Fixes: 8f972312b8f4 ("vhost: support vhost-user")

Signed-off-by: Tiwei Bie <tiwei.bie at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 lib/librte_vhost/vhost_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 814bafd73..00872c868 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -956,7 +956,7 @@ read_vhost_message(int sockfd, struct VhostUserMsg *msg)
 	if (ret <= 0)
 		return ret;
 
-	if (msg && msg->size) {
+	if (msg->size) {
 		if (msg->size > sizeof(msg->payload)) {
 			RTE_LOG(ERR, VHOST_CONFIG,
 				"invalid msg size: %d\n", msg->size);
-- 
2.19.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-19 12:15:18.293676210 +0000
+++ 0009-vhost-remove-unneeded-null-pointer-check.patch	2018-11-19 12:15:18.079611433 +0000
@@ -1,15 +1,16 @@
-From 0541588a44bff07e4aae4c9cde8586326955c378 Mon Sep 17 00:00:00 2001
+From 39788a8c71b103ec010838f7605e9fb1f7807bb5 Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie at intel.com>
 Date: Wed, 7 Nov 2018 17:01:02 +0800
 Subject: [PATCH] vhost: remove unneeded null pointer check
 
+[ upstream commit 0541588a44bff07e4aae4c9cde8586326955c378 ]
+
 The caller will guarantee that msg won't be null. Remove
 the unneeded null pointer check which caused a Coverity
 warning.
 
 Coverity issue: 323484
 Fixes: 8f972312b8f4 ("vhost: support vhost-user")
-Cc: stable at dpdk.org
 
 Signed-off-by: Tiwei Bie <tiwei.bie at intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
@@ -18,10 +19,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index cc154f312..3ea64eba6 100644
+index 814bafd73..00872c868 100644
 --- a/lib/librte_vhost/vhost_user.c
 +++ b/lib/librte_vhost/vhost_user.c
-@@ -1732,7 +1732,7 @@ read_vhost_message(int sockfd, struct VhostUserMsg *msg)
+@@ -956,7 +956,7 @@ read_vhost_message(int sockfd, struct VhostUserMsg *msg)
  	if (ret <= 0)
  		return ret;
  


More information about the stable mailing list