Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Li Tuo <islituo@gmail.com>
To: vz@mleia.com, davem@davemloft.net, kuba@kernel.org
Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, baijiaju1990@gmail.com
Subject: [BUG] net: ethernet: lpc_eth: possible uninitialized-variable access in lpc_eth_drv_probe()
Date: Sat, 31 Jul 2021 14:34:09 +0800	[thread overview]
Message-ID: <e431a6ad-d06c-2913-55ec-303707386029@gmail.com> (raw)

Hello,

Our static analysis tool finds a possible uninitialized-variable access 
in the nxp driver in Linux 5.14.0-rc3:

At the beginning of the function lpc_eth_drv_probe(), the variable 
dma_handle is not initialized.
If the following conditions are false, it remains uninitialized.
1304:    if (use_iram_for_net(dev))
1314:    if (pldat->dma_buff_base_v == NULL)

However, it is accessed through:
1333:    pldat->dma_buff_base_p = dma_handle;;

I am not quite sure whether this possible uninitialized-variable access 
is real and how to fix it if it is real.
Any feedback would be appreciated, thanks!

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>

Best wishes,
Tuo Li

                 reply	other threads:[~2021-07-31  6:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=e431a6ad-d06c-2913-55ec-303707386029@gmail.com \
    --to=islituo@gmail.com \
    --cc=baijiaju1990@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vz@mleia.com \
    --subject='Re: [BUG] net: ethernet: lpc_eth: possible uninitialized-variable access in lpc_eth_drv_probe()' \
    /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

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).