Re: [PATCH 1/3] msi: add forgotten pci_dev_put(pdev) to populate_msi_sysfs()

2013-09-26 Thread Veaceslav Falico
On Thu, Sep 26, 2013 at 04:16:13PM -0600, Bjorn Helgaas wrote: [+cc Russell] On Thu, Sep 26, 2013 at 04:07:51PM +0200, Veaceslav Falico wrote: On Thu, Sep 26, 2013 at 02:25:52PM +0200, Veaceslav Falico wrote: >On Wed, Sep 25, 2013 at 05:35:54PM -0600, Bjorn Helgaas wrote: >>On Wed, Sep 25, 2013

Re: [PATCH 1/3] msi: add forgotten pci_dev_put(pdev) to populate_msi_sysfs()

2013-09-26 Thread Bjorn Helgaas
[+cc Russell] On Thu, Sep 26, 2013 at 04:07:51PM +0200, Veaceslav Falico wrote: > On Thu, Sep 26, 2013 at 02:25:52PM +0200, Veaceslav Falico wrote: > >On Wed, Sep 25, 2013 at 05:35:54PM -0600, Bjorn Helgaas wrote: > >>On Wed, Sep 25, 2013 at 5:23 PM, Neil Horman wrote: > >>>On Wed, Sep 25, 2013 a

Re: [PATCH 1/3] msi: add forgotten pci_dev_put(pdev) to populate_msi_sysfs()

2013-09-26 Thread Neil Horman
On Thu, Sep 26, 2013 at 02:25:52PM +0200, Veaceslav Falico wrote: > On Wed, Sep 25, 2013 at 05:35:54PM -0600, Bjorn Helgaas wrote: > >On Wed, Sep 25, 2013 at 5:23 PM, Neil Horman wrote: > >>On Wed, Sep 25, 2013 at 03:08:05PM -0600, Bjorn Helgaas wrote: > >>>[+cc Neil (he added this code in da8d1c8

Re: [PATCH 1/3] msi: add forgotten pci_dev_put(pdev) to populate_msi_sysfs()

2013-09-26 Thread Veaceslav Falico
On Thu, Sep 26, 2013 at 02:25:52PM +0200, Veaceslav Falico wrote: On Wed, Sep 25, 2013 at 05:35:54PM -0600, Bjorn Helgaas wrote: On Wed, Sep 25, 2013 at 5:23 PM, Neil Horman wrote: On Wed, Sep 25, 2013 at 03:08:05PM -0600, Bjorn Helgaas wrote: [+cc Neil (he added this code in da8d1c8ba4), Gre

Re: [PATCH 1/3] msi: add forgotten pci_dev_put(pdev) to populate_msi_sysfs()

2013-09-26 Thread Veaceslav Falico
On Wed, Sep 25, 2013 at 05:35:54PM -0600, Bjorn Helgaas wrote: On Wed, Sep 25, 2013 at 5:23 PM, Neil Horman wrote: On Wed, Sep 25, 2013 at 03:08:05PM -0600, Bjorn Helgaas wrote: [+cc Neil (he added this code in da8d1c8ba4), Greg] On Mon, Sep 16, 2013 at 7:47 PM, Veaceslav Falico wrote: > Bef

Re: [PATCH 1/3] msi: add forgotten pci_dev_put(pdev) to populate_msi_sysfs()

2013-09-26 Thread Veaceslav Falico
On Wed, Sep 25, 2013 at 05:35:54PM -0600, Bjorn Helgaas wrote: On Wed, Sep 25, 2013 at 5:23 PM, Neil Horman wrote: On Wed, Sep 25, 2013 at 03:08:05PM -0600, Bjorn Helgaas wrote: [+cc Neil (he added this code in da8d1c8ba4), Greg] On Mon, Sep 16, 2013 at 7:47 PM, Veaceslav Falico wrote: > Bef

Re: [PATCH 1/3] msi: add forgotten pci_dev_put(pdev) to populate_msi_sysfs()

2013-09-25 Thread Bjorn Helgaas
On Wed, Sep 25, 2013 at 5:23 PM, Neil Horman wrote: > On Wed, Sep 25, 2013 at 03:08:05PM -0600, Bjorn Helgaas wrote: >> [+cc Neil (he added this code in da8d1c8ba4), Greg] >> >> On Mon, Sep 16, 2013 at 7:47 PM, Veaceslav Falico wrote: >> > Before trying to kobject_init_and_add(), we add a referen

Re: [PATCH 1/3] msi: add forgotten pci_dev_put(pdev) to populate_msi_sysfs()

2013-09-25 Thread Neil Horman
On Wed, Sep 25, 2013 at 03:08:05PM -0600, Bjorn Helgaas wrote: > [+cc Neil (he added this code in da8d1c8ba4), Greg] > > On Mon, Sep 16, 2013 at 7:47 PM, Veaceslav Falico wrote: > > Before trying to kobject_init_and_add(), we add a reference to pdev via > > pci_dev_get(pdev). However, if it fails

Re: [PATCH 1/3] msi: add forgotten pci_dev_put(pdev) to populate_msi_sysfs()

2013-09-25 Thread Veaceslav Falico
On Wed, Sep 25, 2013 at 03:30:14PM -0600, Bjorn Helgaas wrote: On Wed, Sep 25, 2013 at 3:08 PM, Bjorn Helgaas wrote: Also, I think it is incorrect that free_msi_irqs() does this: if (entry->kobj.parent) { kobject_del(&entry->kobj);

Re: [PATCH 1/3] msi: add forgotten pci_dev_put(pdev) to populate_msi_sysfs()

2013-09-25 Thread Bjorn Helgaas
On Wed, Sep 25, 2013 at 3:08 PM, Bjorn Helgaas wrote: > Also, I think it is incorrect that free_msi_irqs() does this: > > if (entry->kobj.parent) { > kobject_del(&entry->kobj); > kobject_put(&entry->kobj); > } > >

Re: [PATCH 1/3] msi: add forgotten pci_dev_put(pdev) to populate_msi_sysfs()

2013-09-25 Thread Bjorn Helgaas
[+cc Neil (he added this code in da8d1c8ba4), Greg] On Mon, Sep 16, 2013 at 7:47 PM, Veaceslav Falico wrote: > Before trying to kobject_init_and_add(), we add a reference to pdev via > pci_dev_get(pdev). However, if it fails to init and/or add the kobject, we > don't return it back - even on out_

[PATCH 1/3] msi: add forgotten pci_dev_put(pdev) to populate_msi_sysfs()

2013-09-16 Thread Veaceslav Falico
Before trying to kobject_init_and_add(), we add a reference to pdev via pci_dev_get(pdev). However, if it fails to init and/or add the kobject, we don't return it back - even on out_unroll. Fix this by adding pci_dev_put(pdev) before going to unrolling section. CC: Bjorn Helgaas CC: linux-...@vg