From: Pavan Chebbi <pavan.chebbi@broadcom.com>
To: Yu Hao <yhao016@ucr.edu>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ethernet: e1000e: Fix possible uninit bug
Date: Mon, 10 Jul 2023 09:32:15 +0530 [thread overview]
Message-ID: <CALs4sv2=g8cf_dmDdD=AM97+SDxPD61_OEzM1nxmohPOACk9Kg@mail.gmail.com> (raw)
In-Reply-To: <20230710005736.3273464-1-yhao016@ucr.edu>
[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]
On Mon, Jul 10, 2023 at 6:27 AM Yu Hao <yhao016@ucr.edu> wrote:
>
> The variable phy_data should be initialized in function e1e_rphy.
> However, there is not return value check, which means there is a
> possible uninit read later for the variable.
>
> Signed-off-by: Yu Hao <yhao016@ucr.edu>
> ---
Shouldn't this be a v2? You are addressing a comment on your original
patch right?
Also please specify the target tree name. This may need a fixes tag also.
> drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> index 771a3c909c45..a807358a8174 100644
> --- a/drivers/net/ethernet/intel/e1000e/netdev.c
> +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
> @@ -6909,7 +6909,7 @@ static int __e1000_resume(struct pci_dev *pdev)
>
> /* report the system wakeup cause from S3/S4 */
> if (adapter->flags2 & FLAG2_HAS_PHY_WAKEUP) {
> - u16 phy_data;
> + u16 phy_data = 0;
>
> e1e_rphy(&adapter->hw, BM_WUS, &phy_data);
> if (phy_data) {
> --
> 2.34.1
>
>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]
next prev parent reply other threads:[~2023-07-10 4:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 0:57 [PATCH] ethernet: e1000e: Fix possible uninit bug Yu Hao
2023-07-10 4:02 ` Pavan Chebbi [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-05 0:10 Yu Hao
2023-07-10 8:13 ` Denis Kirjanov
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='CALs4sv2=g8cf_dmDdD=AM97+SDxPD61_OEzM1nxmohPOACk9Kg@mail.gmail.com' \
--to=pavan.chebbi@broadcom.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yhao016@ucr.edu \
/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).