From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI fixes for 2.6.7-rc1
Date: Fri, 28 May 2004 14:35:16 -0700 [thread overview]
Message-ID: <10857801163004@kroah.com> (raw)
In-Reply-To: <1085780116326@kroah.com>
ChangeSet 1.1759, 2004/05/28 13:37:08-07:00, lcapitulino@prefeitura.sp.gov.br
[PATCH] PCI: fix pci/probe.c possible NULL pointer.
In drivers/pci/probe.c::pci_scan_bridge() the call for pci_alloc_child_bus()
can return NULL, but it is not handled by the function (detected by
Coverity's checker).
The patch bellow fix that returning `max' if we got the NULL, but
I do not know if it is right. I guess it is, because in that case
the function will act in the same way as with `pass != 0'.
Signed-off by: Luiz Capitulino <lcapitulino@prefeitura.sp.gov.br>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/pci/probe.c | 2 ++
1 files changed, 2 insertions(+)
diff -Nru a/drivers/pci/probe.c b/drivers/pci/probe.c
--- a/drivers/pci/probe.c Fri May 28 14:28:53 2004
+++ b/drivers/pci/probe.c Fri May 28 14:28:53 2004
@@ -366,6 +366,8 @@
return max;
busnr = (buses >> 8) & 0xFF;
child = pci_alloc_child_bus(bus, dev, busnr);
+ if (!child)
+ return max;
child->primary = buses & 0xFF;
child->subordinate = (buses >> 16) & 0xFF;
child->bridge_ctl = bctl;
prev parent reply other threads:[~2004-05-28 21:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-28 21:33 [BK PATCH] PCI fixes for 2.6.7-rc1 Greg KH
2004-05-28 21:35 ` [PATCH] " Greg KH
2004-05-28 21:35 ` Greg KH
2004-05-28 21:35 ` Greg KH
2004-05-28 21:35 ` Greg KH
2004-05-28 21:35 ` Greg KH
2004-05-28 21:35 ` Greg KH [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=10857801163004@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@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