net/i40e: uninitialized value fixed in i40e_flow_parse_fdir_action

Message ID 1559838642-125443-1-git-send-email-mesut.a.ergin@intel.com (mailing list archive)
State Accepted, archived
Headers
Series net/i40e: uninitialized value fixed in i40e_flow_parse_fdir_action |

Checks

Context Check Description
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/Intel-compilation fail apply issues
ci/checkpatch success coding style OK

Commit Message

Ergin, Mesut A June 6, 2019, 4:30 p.m. UTC
  Initializes mark_spec pointer to NULL.

Fixes: 0bbcfc706a2b ("net/i40e: support MARK and RSS flow action")
Coverity issue: 341075

Signed-off-by: Mesut Ali Ergin <mesut.a.ergin@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Kevin Traynor June 6, 2019, 7:58 p.m. UTC | #1
On 06/06/2019 17:30, Mesut Ali Ergin wrote:
> Initializes mark_spec pointer to NULL.
> 
> Fixes: 0bbcfc706a2b ("net/i40e: support MARK and RSS flow action")
> Coverity issue: 341075
> 
> Signed-off-by: Mesut Ali Ergin <mesut.a.ergin@intel.com>

Acked-by: Kevin Traynor <ktraynor@redhat.com>

> ---
>  drivers/net/i40e/i40e_flow.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
> index 9bfbea2..d62b32f 100644
> --- a/drivers/net/i40e/i40e_flow.c
> +++ b/drivers/net/i40e/i40e_flow.c
> @@ -3052,7 +3052,7 @@ i40e_flow_parse_fdir_action(struct rte_eth_dev *dev,
>  	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
>  	const struct rte_flow_action *act;
>  	const struct rte_flow_action_queue *act_q;
> -	const struct rte_flow_action_mark *mark_spec;
> +	const struct rte_flow_action_mark *mark_spec = NULL;
>  	uint32_t index = 0;
>  
>  	/* Check if the first non-void action is QUEUE or DROP or PASSTHRU. */
>
  
Qi Zhang June 6, 2019, 10:13 p.m. UTC | #2
> -----Original Message-----
> From: Kevin Traynor [mailto:ktraynor@redhat.com]
> Sent: Friday, June 7, 2019 3:58 AM
> To: Ergin, Mesut A <mesut.a.ergin@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/i40e: uninitialized value fixed in
> i40e_flow_parse_fdir_action
> 
> On 06/06/2019 17:30, Mesut Ali Ergin wrote:
> > Initializes mark_spec pointer to NULL.
> >
> > Fixes: 0bbcfc706a2b ("net/i40e: support MARK and RSS flow action")
> > Coverity issue: 341075
> >
> > Signed-off-by: Mesut Ali Ergin <mesut.a.ergin@intel.com>
> 
> Acked-by: Kevin Traynor <ktraynor@redhat.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
>
  

Patch

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 9bfbea2..d62b32f 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -3052,7 +3052,7 @@  i40e_flow_parse_fdir_action(struct rte_eth_dev *dev,
 	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	const struct rte_flow_action *act;
 	const struct rte_flow_action_queue *act_q;
-	const struct rte_flow_action_mark *mark_spec;
+	const struct rte_flow_action_mark *mark_spec = NULL;
 	uint32_t index = 0;
 
 	/* Check if the first non-void action is QUEUE or DROP or PASSTHRU. */