[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE9FiQUrzCR4=9_=QyZipQZ584ucSpin6BOYD7t-9Y9Gq8tLFg@mail.gmail.com>
Date: Wed, 15 May 2013 14:52:23 -0700
From: Yinghai Lu <yinghai@...nel.org>
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Liu Jiang <liuj97@...il.com>, "Rafael J . Wysocki" <rjw@...k.pl>,
linuxppc-dev@...ts.ozlabs.org,
"sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Gu Zheng <guz.fnst@...fujitsu.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Myron Stowe <myron.stowe@...hat.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Paul Mackerras <paulus@...ba.org>
Subject: Re: [PATCH v2, part 1 3/9] PCI: Convert alloc_pci_dev(void) to
pci_alloc_dev(bus) instead
On Wed, May 15, 2013 at 2:32 PM, Benjamin Herrenschmidt
<benh@...nel.crashing.org> wrote:
> On Wed, 2013-05-15 at 07:58 -0700, Yinghai Lu wrote:
>
>> Ben,
>>
>> in drivers/pci/probe.c::pci_scan_device() there is
>>
>> pci_set_of_node(dev);
>>
>> if (pci_setup_device(dev)) {
>> kfree(dev);
>> return NULL;
>> }
>>
>> so if pci_setup_device fails, there is one dev reference is not release.
>>
>> please check you can just move down pci_set_of_node down after that
>> failing path, like
>>
>>
>> if (pci_setup_device(dev)) {
>> kfree(dev);
>> return NULL;
>> }
>>
>> pci_set_of_node(dev);
>
> No, we want the OF node set when we run the quirks, we intentionally do
> that early, the right thing to do is to to call pci_release_of_node()
> in the error path (it's safe to call even if the node is NULL).
>
Good.
We have two options.
1. can you please submit one complete patch, and get it merged into v3.10.
2. put it together with pci_alloc_dev patchset towards to v3.11?
Thanks
Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists