From: Yijing Wang <wangyijing@huawei.com>
To: Bjorn Helgaas <bhelgaas@google.com>, Jon Mason <jdmason@kudzu.us>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: Coverity CID 146454: pcie_bus_configure_settings() use of uninitialized variable
Date: Fri, 4 Apr 2014 09:48:52 +0800 [thread overview]
Message-ID: <533E0F84.1050302@huawei.com> (raw)
In-Reply-To: <CAErSpo7OVbiZ=W1N0Zfb=p3KDsDCkq7Xq1CqzQTeANfvWWZ9yw@mail.gmail.com>
Hi Bjorn,
Jon seems to send a patch to fix this long ago. Link: http://patchwork.ozlabs.org/patch/191054/
But this patch cannot be applied now. I think we can just set smpss = 0 in this function as the default value.
Thanks!
Yijing.
On 2014/4/4 0:09, Bjorn Helgaas wrote:
> Coverity complains that "smpss" is used uninitialized in
> drivers/pci/probe.c in pcie_bus_configure_settings() when calling
> pcie_bus_configure_set():
>
> 1642 pcie_bus_configure_set(bus->self, &smpss);
> 1643 pci_walk_bus(bus, pcie_bus_configure_set, &smpss);
>
> "smpss" may be uninitialized, and pcie_bus_configure_set()
> dereferences the pointer it receives.
>
> This is CID 146454.
>
> Bjorn
>
>
--
Thanks!
Yijing
next prev parent reply other threads:[~2014-04-04 1:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 16:09 Coverity CID 146454: pcie_bus_configure_settings() use of uninitialized variable Bjorn Helgaas
2014-04-04 1:48 ` Yijing Wang [this message]
2014-04-29 23:06 ` Bjorn Helgaas
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=533E0F84.1050302@huawei.com \
--to=wangyijing@huawei.com \
--cc=bhelgaas@google.com \
--cc=jdmason@kudzu.us \
--cc=linux-pci@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.