git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7bd0994
)
net/mlx4: fix RSS resource leak in case of error
author
Adrien Mazarguil
<adrien.mazarguil@6wind.com>
Thu, 19 Apr 2018 10:07:25 +0000
(12:07 +0200)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Fri, 27 Apr 2018 14:54:56 +0000
(15:54 +0100)
When memory cannot be allocated for a flow rule, its RSS context reference
is not dropped.
Fixes:
078b8b452e6b
("net/mlx4: add RSS flow rule action support")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/mlx4/mlx4_flow.c
patch
|
blob
|
history
diff --git
a/drivers/net/mlx4/mlx4_flow.c
b/drivers/net/mlx4/mlx4_flow.c
index
f3063ee
..
2b4bf70
100644
(file)
--- a/
drivers/net/mlx4/mlx4_flow.c
+++ b/
drivers/net/mlx4/mlx4_flow.c
@@
-820,11
+820,14
@@
fill:
},
};
- if (!mlx4_zmallocv(__func__, vec, RTE_DIM(vec)))
+ if (!mlx4_zmallocv(__func__, vec, RTE_DIM(vec))) {
+ if (temp.rss)
+ mlx4_rss_put(temp.rss);
return rte_flow_error_set
(error, -rte_errno,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
"flow rule handle allocation failure");
+ }
/* Most fields will be updated by second pass. */
*flow = (struct rte_flow){
.ibv_attr = temp.ibv_attr,