From: David Miller <davem@davemloft.net>
To: alobakin@marvell.com
Cc: kuba@kernel.org, irusskikh@marvell.com,
michal.kalderon@marvell.com, aelior@marvell.com,
denis.bolotin@marvell.com, GR-everest-linux-l2@marvell.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
dan.carpenter@oracle.com
Subject: Re: [PATCH net-next] qed: fix the allocation of the chains with an external PBL
Date: Mon, 27 Jul 2020 12:18:36 -0700 (PDT) [thread overview]
Message-ID: <20200727.121836.2197759951419525125.davem@davemloft.net> (raw)
In-Reply-To: <20200727115133.1631-1-alobakin@marvell.com>
From: Alexander Lobakin <alobakin@marvell.com>
Date: Mon, 27 Jul 2020 14:51:33 +0300
> Dan reports static checker warning:
>
> "The patch 9b6ee3cf95d3: "qed: sanitize PBL chains allocation" from Jul
> 23, 2020, leads to the following static checker warning:
>
> drivers/net/ethernet/qlogic/qed/qed_chain.c:299 qed_chain_alloc_pbl()
> error: uninitialized symbol 'pbl_virt'.
>
> drivers/net/ethernet/qlogic/qed/qed_chain.c
> 249 static int qed_chain_alloc_pbl(struct qed_dev *cdev, struct qed_chain *chain)
> 250 {
> 251 struct device *dev = &cdev->pdev->dev;
> 252 struct addr_tbl_entry *addr_tbl;
> 253 dma_addr_t phys, pbl_phys;
> 254 __le64 *pbl_virt;
> ^^^^^^^^^^^^^^^^
> [...]
> 271 if (chain->b_external_pbl)
> 272 goto alloc_pages;
> ^^^^^^^^^^^^^^^^ uninitialized
> [...]
> 298 /* Fill the PBL table with the physical address of the page */
> 299 pbl_virt[i] = cpu_to_le64(phys);
> ^^^^^^^^^^^
> [...]
> "
>
> This issue was introduced with commit c3a321b06a80 ("qed: simplify
> initialization of the chains with an external PBL"), when
> chain->pbl_sp.table_virt initialization was moved up to
> qed_chain_init_params().
> Fix it by initializing pbl_virt with an already filled chain struct field.
>
> Fixes: c3a321b06a80 ("qed: simplify initialization of the chains with an external PBL")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Alexander Lobakin <alobakin@marvell.com>
Applied, thank you.
prev parent reply other threads:[~2020-07-27 19:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 11:51 Alexander Lobakin
2020-07-27 19:18 ` David Miller [this message]
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=20200727.121836.2197759951419525125.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=GR-everest-linux-l2@marvell.com \
--cc=aelior@marvell.com \
--cc=alobakin@marvell.com \
--cc=dan.carpenter@oracle.com \
--cc=denis.bolotin@marvell.com \
--cc=irusskikh@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.kalderon@marvell.com \
--cc=netdev@vger.kernel.org \
/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
all inboxes | Powered by JetHome®