DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: i40e PMD APIs add input pointer null check
@ 2021-01-08  8:30 Murphy Yang
  2021-01-13  3:42 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Murphy Yang @ 2021-01-08  8:30 UTC (permalink / raw)
  To: dev
  Cc: qiming.yang, ferruh.yigit, jia.guo, beilei.xing, stevex.yang,
	Murphy Yang

Pointer 'NULL' check for 'mac_addr' or 'conf' within i40e PMD APIs.

Fixes: 66c78f4799ff ("net/i40e: add support for packet template to flow director")
Fixes: 04b443fb2c43 ("net/i40e: fix port id type")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 790d042002..2e34140c5b 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -2366,6 +2366,9 @@ rte_pmd_i40e_add_vf_mac_addr(uint16_t port, uint16_t vf_id,
 	struct i40e_mac_filter_info mac_filter;
 	int ret;
 
+	if (mac_addr == NULL)
+		return -EINVAL;
+
 	if (i40e_validate_mac_addr((u8 *)mac_addr) != I40E_SUCCESS)
 		return -EINVAL;
 
@@ -3042,6 +3045,9 @@ int rte_pmd_i40e_flow_add_del_packet_template(
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
 
+	if (conf == NULL)
+		return -EINVAL;
+
 	if (!is_i40e_supported(dev))
 		return -ENOTSUP;
 
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH] net/i40e: i40e PMD APIs add input pointer null check
  2021-01-08  8:30 [dpdk-dev] [PATCH] net/i40e: i40e PMD APIs add input pointer null check Murphy Yang
@ 2021-01-13  3:42 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2021-01-13  3:42 UTC (permalink / raw)
  To: Yang, MurphyX, dev
  Cc: Yang, Qiming, Yigit, Ferruh, Guo, Jia, Xing, Beilei, Yang,
	SteveX, Yang, MurphyX



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Murphy Yang
> Sent: Friday, January 8, 2021 4:30 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Guo, Jia <jia.guo@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Yang,
> MurphyX <murphyx.yang@intel.com>
> Subject: [dpdk-dev] [PATCH] net/i40e: i40e PMD APIs add input pointer null
> check

Changed title to "add input pointer null"
> 
> Pointer 'NULL' check for 'mac_addr' or 'conf' within i40e PMD APIs.
> 
> Fixes: 66c78f4799ff ("net/i40e: add support for packet template to flow
> director")
> Fixes: 04b443fb2c43 ("net/i40e: fix port id type")
> 
> Signed-off-by: Murphy Yang <murphyx.yang@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:[~2021-01-13  3:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-08  8:30 [dpdk-dev] [PATCH] net/i40e: i40e PMD APIs add input pointer null check Murphy Yang
2021-01-13  3:42 ` Zhang, Qi Z

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git