All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Chiang <achiang@hp.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Danny Feng <dfeng@redhat.com>,
	lenb@kernel.org, bjorn.helgaas@hp.com, andrew.patterson@hp.com,
	jbarnes@virtuousgeek.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] acpi: pci_root: fix NULL pointer deref after resume from suspend
Date: Tue, 29 Sep 2009 14:49:48 -0600	[thread overview]
Message-ID: <20090929204948.GA31574@ldl.fc.hp.com> (raw)
In-Reply-To: <200909292208.18203.rjw@sisk.pl>

* Rafael J. Wysocki <rjw@sisk.pl>:
> On Tuesday 29 September 2009, Danny Feng wrote:
> > Is there any cases that pdev->subordinate is NULL while pdev is bridge 
> > device?
> >  From pci_slot.c::walk_p2p_bridge, there's code like following:
> > 
> >          dev = pci_get_slot(pci_bus, PCI_DEVFN(device, function));
> >          if (!dev || !dev->subordinate)
> >                  goto out;
> > 
> > It looks like dev->subordinate can be NULL even if in p2p
> > bridge, right?

In the code you post above, that results from doing an ACPI
namespace walk, which will definitely find non-bridge devices.
 
> Right, in general, but in this particular case each device we
> inspect is supposed to be a parent of another device, which
> implies that there's a bus below it (given that it's a PCI
> device).

Right, that's why I'm surprised that my assumption broke. But now
that I see that a dock device is involved, maybe that's not so
surprising.

/ac


  reply	other threads:[~2009-09-29 20:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-28  6:31 [PATCH] acpi: pci_root: fix NULL pointer deref after resume from suspend Xiaotian Feng
2009-09-28 17:38 ` Alex Chiang
2009-09-28 20:43   ` Rafael J. Wysocki
2009-09-28 21:05     ` Rafael J. Wysocki
2009-09-28 22:20       ` Alex Chiang
2009-09-28 22:50         ` Rafael J. Wysocki
2009-09-29 10:11           ` Danny Feng
2009-09-29 20:08             ` Rafael J. Wysocki
2009-09-29 20:49               ` Alex Chiang [this message]
2009-09-29 23:31                 ` Rafael J. Wysocki
2009-09-29  1:44   ` Danny Feng
2009-09-29 20:12     ` Rafael J. Wysocki
2009-09-29 20:12       ` Rafael J. Wysocki
2009-09-30  2:46       ` Danny Feng
2009-09-30 21:26         ` Rafael J. Wysocki
2009-10-01 20:05     ` Alex Chiang
2009-10-03 22:56       ` Rafael J. Wysocki
2009-10-09  1:17         ` Danny Feng
2009-10-09  2:26         ` Danny Feng
2009-10-09 21:46           ` Rafael J. Wysocki
2009-10-12  3:05             ` Danny Feng
2009-10-09  1:16       ` Danny Feng
2009-10-09  2:28       ` Danny Feng

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=20090929204948.GA31574@ldl.fc.hp.com \
    --to=achiang@hp.com \
    --cc=andrew.patterson@hp.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=dfeng@redhat.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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.