DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] net/ice: fix potential null pointer dereferences
       [not found] <“20190805073923.62812-1-xiaolong.ye@intel.com”>
@ 2019-08-05  9:15 ` Xiaolong Ye
  2019-08-06 11:13   ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Xiaolong Ye @ 2019-08-05  9:15 UTC (permalink / raw)
  To: Qiming Yang, Wenzhuo Lu; +Cc: dev, Xiaolong Ye, ying.a.wang

This patch fixes two null pointer dereferences in flow code detected by
coverity scan.

Coverity issue: 345815, 345816
Fixes: 94f00800d78b ("net/ice: fix VXLAN/NVGRE flow matching")
Cc: ying.a.wang@intel.com

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
v2 change:

- add coverity ids

 drivers/net/ice/ice_generic_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index 5fcf4289c..1c0adc779 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -464,7 +464,7 @@ static uint64_t ice_get_flow_field(const struct rte_flow_item pattern[],
 					   "Invalid VXLAN item");
 				return 0;
 			}
-			if (vxlan_mask->vni[0] == UINT8_MAX &&
+			if (vxlan_mask && vxlan_mask->vni[0] == UINT8_MAX &&
 					vxlan_mask->vni[1] == UINT8_MAX &&
 					vxlan_mask->vni[2] == UINT8_MAX)
 				input_set |= ICE_INSET_TUN_ID;
@@ -486,7 +486,7 @@ static uint64_t ice_get_flow_field(const struct rte_flow_item pattern[],
 					   "Invalid NVGRE item");
 				return 0;
 			}
-			if (nvgre_mask->tni[0] == UINT8_MAX &&
+			if (nvgre_mask && nvgre_mask->tni[0] == UINT8_MAX &&
 					nvgre_mask->tni[1] == UINT8_MAX &&
 					nvgre_mask->tni[2] == UINT8_MAX)
 				input_set |= ICE_INSET_TUN_ID;
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH v2] net/ice: fix potential null pointer dereferences
  2019-08-05  9:15 ` [dpdk-dev] [PATCH v2] net/ice: fix potential null pointer dereferences Xiaolong Ye
@ 2019-08-06 11:13   ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2019-08-06 11:13 UTC (permalink / raw)
  To: Ye, Xiaolong, Yang, Qiming, Lu, Wenzhuo; +Cc: dev, Ye, Xiaolong, Wang, Ying A



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xiaolong Ye
> Sent: Monday, August 5, 2019 5:15 PM
> To: Yang, Qiming <qiming.yang@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>
> Cc: dev@dpdk.org; Ye, Xiaolong <xiaolong.ye@intel.com>; Wang, Ying A
> <ying.a.wang@intel.com>
> Subject: [dpdk-dev] [PATCH v2] net/ice: fix potential null pointer dereferences
> 
> This patch fixes two null pointer dereferences in flow code detected by coverity
> scan.
> 
> Coverity issue: 345815, 345816
> Fixes: 94f00800d78b ("net/ice: fix VXLAN/NVGRE flow matching")
> Cc: ying.a.wang@intel.com
> 
> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

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

end of thread, other threads:[~2019-08-06 11:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <“20190805073923.62812-1-xiaolong.ye@intel.com”>
2019-08-05  9:15 ` [dpdk-dev] [PATCH v2] net/ice: fix potential null pointer dereferences Xiaolong Ye
2019-08-06 11:13   ` Zhang, Qi Z

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