* [dpdk-dev] [PATCH] mempool/octeontx: fix error handling in initialization
@ 2019-12-19 10:44 kkanas
2020-01-14 7:02 ` Jerin Jacob
0 siblings, 1 reply; 2+ messages in thread
From: kkanas @ 2019-12-19 10:44 UTC (permalink / raw)
To: dev, Harman Kalra; +Cc: Krzysztof Kanas, pbhagavatula
From: Krzysztof Kanas <kkanas@marvell.com>
When octeontx_get_fpavf fails fpa pointer is used to get
pool_stack_base, which is then freed.
Coverity issue: 351263
Fixes: 9bc692f83baa ("mempool/octeontx: add application domain validation")
Cc: pbhagavatula@marvell.com
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
---
drivers/mempool/octeontx/octeontx_fpavf.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index c97267db3cc3..63f8fb3b500a 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -305,10 +305,8 @@ octeontx_fpapf_pool_destroy(unsigned int gpool_index)
int ret = -1;
fpa = octeontx_get_fpavf(gpool_index);
- if (fpa == NULL) {
- ret = -EINVAL;
- goto err;
- }
+ if (fpa == NULL)
+ return -EINVAL;
hdr.coproc = FPA_COPROC;
hdr.msg = FPA_CONFIGSET;
--
2.21.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] mempool/octeontx: fix error handling in initialization
2019-12-19 10:44 [dpdk-dev] [PATCH] mempool/octeontx: fix error handling in initialization kkanas
@ 2020-01-14 7:02 ` Jerin Jacob
0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2020-01-14 7:02 UTC (permalink / raw)
To: Krzysztof Kanas, Ferruh Yigit; +Cc: dpdk-dev, Harman Kalra, Pavan Nikhilesh
On Thu, Dec 19, 2019 at 4:14 PM <kkanas@marvell.com> wrote:
>
> From: Krzysztof Kanas <kkanas@marvell.com>
>
> When octeontx_get_fpavf fails fpa pointer is used to get
> pool_stack_base, which is then freed.
>
> Coverity issue: 351263
>
> Fixes: 9bc692f83baa ("mempool/octeontx: add application domain validation")
> Cc: pbhagavatula@marvell.com
Cc: stable@dpdk.org
> Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/master. Thanks
> ---
> drivers/mempool/octeontx/octeontx_fpavf.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
> index c97267db3cc3..63f8fb3b500a 100644
> --- a/drivers/mempool/octeontx/octeontx_fpavf.c
> +++ b/drivers/mempool/octeontx/octeontx_fpavf.c
> @@ -305,10 +305,8 @@ octeontx_fpapf_pool_destroy(unsigned int gpool_index)
> int ret = -1;
>
> fpa = octeontx_get_fpavf(gpool_index);
> - if (fpa == NULL) {
> - ret = -EINVAL;
> - goto err;
> - }
> + if (fpa == NULL)
> + return -EINVAL;
>
> hdr.coproc = FPA_COPROC;
> hdr.msg = FPA_CONFIGSET;
> --
> 2.21.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-14 7:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-19 10:44 [dpdk-dev] [PATCH] mempool/octeontx: fix error handling in initialization kkanas
2020-01-14 7:02 ` Jerin Jacob
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).