* [PATCH] net/nfp: fix one memory access problem
@ 2023-10-08 7:08 Chaoyong He
2023-10-09 9:06 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Chaoyong He @ 2023-10-08 7:08 UTC (permalink / raw)
To: dev; +Cc: oss-drivers, Chaoyong He
The initial logic do not give a value to the out parameter in the
abnormal logic, which cause an local variable uninitialized problem.
Fixes: 3d6811281392 ("net/nfp: add infrastructure for conntrack flow merge")
Cc: chaoyong.he@corigine.com
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
---
drivers/net/nfp/flower/nfp_conntrack.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/nfp/flower/nfp_conntrack.c b/drivers/net/nfp/flower/nfp_conntrack.c
index aacd4d7dd3..7b84b12546 100644
--- a/drivers/net/nfp/flower/nfp_conntrack.c
+++ b/drivers/net/nfp/flower/nfp_conntrack.c
@@ -332,6 +332,7 @@ nfp_flow_item_conf_size_get(enum rte_flow_item_type type,
break;
default:
PMD_DRV_LOG(ERR, "Unsupported item type: %d", type);
+ *size = 0;
return false;
}
@@ -1265,9 +1266,9 @@ nfp_ct_merge_item_real(const struct rte_flow_item *item_src,
struct rte_flow_item *item_dst)
{
uint32_t i;
- size_t size;
char *key_dst;
char *mask_dst;
+ size_t size = 0;
const char *key_src;
const char *mask_src;
--
2.39.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net/nfp: fix one memory access problem
2023-10-08 7:08 [PATCH] net/nfp: fix one memory access problem Chaoyong He
@ 2023-10-09 9:06 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2023-10-09 9:06 UTC (permalink / raw)
To: Chaoyong He, dev, Daxue Gao
Cc: oss-drivers, Thomas Monjalon, Raslan Darawsheh
On 10/8/2023 8:08 AM, Chaoyong He wrote:
> The initial logic do not give a value to the out parameter in the
> abnormal logic, which cause an local variable uninitialized problem.
>
> Fixes: 3d6811281392 ("net/nfp: add infrastructure for conntrack flow merge")
> Cc: chaoyong.he@corigine.com
>
> Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
Applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-09 9:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-08 7:08 [PATCH] net/nfp: fix one memory access problem Chaoyong He
2023-10-09 9:06 ` Ferruh Yigit
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).