From: Shibin Koikkara Reeny <shibin.koikkara.reeny@intel.com>
To: dev@dpdk.org, qi.z.zhang@intel.com, anatoly.burakov@intel.com,
bruce.richardson@intel.com, john.mcnamara@intel.com
Cc: ciara.loftus@intel.com,
Shibin Koikkara Reeny <shibin.koikkara.reeny@intel.com>
Subject: [PATCH] net/af_xdp: fix integer handling issues
Date: Tue, 21 Feb 2023 11:14:26 +0000 [thread overview]
Message-ID: <20230221111426.172357-1-shibin.koikkara.reeny@intel.com> (raw)
Fix integer handling issues (NEGATIVE_RETURNS) reported
in coverity scan. Add a check to sock variable if the
value is negative return -1.
Coverity issue: 383245
Fixes: 7fc6ae50369d ("net/af_xdp: support CNI Integration")
Signed-off-by: Shibin Koikkara Reeny <shibin.koikkara.reeny@intel.com>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 02c874d51e..2a20a6960c 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -1508,6 +1508,8 @@ get_cni_fd(char *if_name)
memset(&server, 0, sizeof(server));
sock = init_uds_sock(&server);
+ if (sock < 0)
+ return -1;
/* Initiates handshake to CNI send: /connect,hostname */
snprintf(request, sizeof(request), "%s,%s", UDS_CONNECT_MSG, hostname);
--
2.25.1
next reply other threads:[~2023-02-21 11:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 11:14 Shibin Koikkara Reeny [this message]
2023-02-21 13:30 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230221111426.172357-1-shibin.koikkara.reeny@intel.com \
--to=shibin.koikkara.reeny@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=ciara.loftus@intel.com \
--cc=dev@dpdk.org \
--cc=john.mcnamara@intel.com \
--cc=qi.z.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).