From: Colin Ian King <colin.king@canonical.com>
To: Hariprasad Kelam <hkelam@marvell.com>
Cc: Sunil Goutham <sgoutham@marvell.com>,
Linu Cherian <lcherian@marvell.com>,
Geetha sowjanya <gakula@marvell.com>,
Jerin Jacob <jerinj@marvell.com>, hariprasad <hkelam@marvell.com>,
Subbaraya Sundeep <sbhatta@marvell.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: re: octeontx2-af: cn10k: MAC internal loopback support
Date: Mon, 15 Feb 2021 16:52:43 +0000 [thread overview]
Message-ID: <bbb47971-22f5-9392-fcdc-bdd068883f27@canonical.com> (raw)
Hi,
Static analysis on linux-next today using Coverity found an issue in the
following commit:
commit 3ad3f8f93c81f81d6e28b2e286b03669cc1fb3b0
Author: Hariprasad Kelam <hkelam@marvell.com>
Date: Thu Feb 11 21:28:34 2021 +0530
octeontx2-af: cn10k: MAC internal loopback support
The analysis is as follows:
723 static int rvu_cgx_config_intlbk(struct rvu *rvu, u16 pcifunc, bool en)
724 {
725 struct mac_ops *mac_ops;
1. var_decl: Declaring variable lmac_id without initializer.
726 u8 cgx_id, lmac_id;
727
2. Condition !is_cgx_config_permitted(rvu, pcifunc), taking false branch.
728 if (!is_cgx_config_permitted(rvu, pcifunc))
729 return -EPERM;
730
Uninitialized scalar variable (UNINIT)
731 mac_ops = get_mac_ops(rvu_cgx_pdata(cgx_id, rvu));
732
Uninitialized scalar variable (UNINIT)
3. uninit_use_in_call: Using uninitialized value lmac_id when calling
*mac_ops->mac_lmac_intl_lbk.
733 return mac_ops->mac_lmac_intl_lbk(rvu_cgx_pdata(cgx_id, rvu),
734 lmac_id, en);
735 }
Variables cgx_id and lmac_id are no longer being initialized and garbage
values are being passed into function calls. Originally, these
variables were being initialized with a call to rvu_get_cgx_lmac_id()
but that has now been removed.
Colin
next reply other threads:[~2021-02-15 17:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-15 16:52 Colin Ian King [this message]
2021-02-15 18:01 ` [EXT] re: octeontx2-af: cn10k: MAC internal loopback support Geethasowjanya Akula
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=bbb47971-22f5-9392-fcdc-bdd068883f27@canonical.com \
--to=colin.king@canonical.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=jerinj@marvell.com \
--cc=lcherian@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.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).