All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Dexuan Cui <decui@microsoft.com>
Cc: "lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	KY Srinivasan <kys@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Michael Kelley <mikelley@microsoft.com>,
	Sasha Levin <Alexander.Levin@microsoft.com>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	"driverdev-devel@linuxdriverproject.org" 
	<driverdev-devel@linuxdriverproject.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jackm@mellanox.com" <jackm@mellanox.com>,
	"marcelo.cerri@canonical.com" <marcelo.cerri@canonical.com>,
	"olaf@aepfle.de" <olaf@aepfle.de>,
	"apw@canonical.com" <apw@canonical.com>,
	vkuznets <vkuznets@redhat.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>
Subject: Re: [PATCH 0/3] pci-hyperv: fix memory leak and add pci_destroy_slot()
Date: Tue, 5 Mar 2019 10:27:33 -0800	[thread overview]
Message-ID: <20190305102733.30e25dae@shemminger-XPS-13-9360> (raw)
In-Reply-To: <20190304213357.16652-1-decui@microsoft.com>

On Mon, 4 Mar 2019 21:34:47 +0000
Dexuan Cui <decui@microsoft.com> wrote:

> Patch #1 fixes a memory leak caused by incorrectly-maintained hpdev->refs.
> 
> Patch #2 and #3 make sure the "slot" is removed in all the scenarios.
> Without them, in the quick hot-add/hot-remove test, systemd-dev may easily
> crash when trying to access a dangling sys file in /sys/bus/pci/slots/:
> "BUG: unable to handle kernel paging request".
> 
> BTW, Patch #2 was posted on Feb 7, 2019, and this is the v2: the change
> to hv_eject_device_work() in v1 is removed, as the change is only needed
> when we hot-remove the device and remove the pci-hyperv driver at the 
> same time. It looks more work is required to make this scenaro work
> correctly, and since removing the driver is not really a "usual" usage,
> we can address this scenario in the future.
> 
> Please review the patchset.
> 
> Dexuan Cui (3):
>   PCI: hv: Fix a memory leak in hv_eject_device_work()
>   PCI: hv: Add hv_pci_remove_slots() when we unload the driver
>   PCI: hv: Add pci_destroy_slot() in pci_devices_present_work(), if
>     necessary
> 
>  drivers/pci/controller/pci-hyperv.c | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)


Thanks for fixing this.

Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Hemminger <stephen@networkplumber.org>
To: Dexuan Cui <decui@microsoft.com>
Cc: "apw@canonical.com" <apw@canonical.com>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	"driverdev-devel@linuxdriverproject.org"
	<driverdev-devel@linuxdriverproject.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Michael Kelley <mikelley@microsoft.com>,
	Sasha Levin <Alexander.Levin@microsoft.com>,
	"marcelo.cerri@canonical.com" <marcelo.cerri@canonical.com>,
	"olaf@aepfle.de" <olaf@aepfle.de>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"jackm@mellanox.com" <jackm@mellanox.com>,
	vkuznets <vkuznets@redhat.com>
Subject: Re: [PATCH 0/3] pci-hyperv: fix memory leak and add pci_destroy_slot()
Date: Tue, 5 Mar 2019 10:27:33 -0800	[thread overview]
Message-ID: <20190305102733.30e25dae@shemminger-XPS-13-9360> (raw)
In-Reply-To: <20190304213357.16652-1-decui@microsoft.com>

On Mon, 4 Mar 2019 21:34:47 +0000
Dexuan Cui <decui@microsoft.com> wrote:

> Patch #1 fixes a memory leak caused by incorrectly-maintained hpdev->refs.
> 
> Patch #2 and #3 make sure the "slot" is removed in all the scenarios.
> Without them, in the quick hot-add/hot-remove test, systemd-dev may easily
> crash when trying to access a dangling sys file in /sys/bus/pci/slots/:
> "BUG: unable to handle kernel paging request".
> 
> BTW, Patch #2 was posted on Feb 7, 2019, and this is the v2: the change
> to hv_eject_device_work() in v1 is removed, as the change is only needed
> when we hot-remove the device and remove the pci-hyperv driver at the 
> same time. It looks more work is required to make this scenaro work
> correctly, and since removing the driver is not really a "usual" usage,
> we can address this scenario in the future.
> 
> Please review the patchset.
> 
> Dexuan Cui (3):
>   PCI: hv: Fix a memory leak in hv_eject_device_work()
>   PCI: hv: Add hv_pci_remove_slots() when we unload the driver
>   PCI: hv: Add pci_destroy_slot() in pci_devices_present_work(), if
>     necessary
> 
>  drivers/pci/controller/pci-hyperv.c | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)


Thanks for fixing this.

Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2019-03-05 18:27 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 21:34 [PATCH 0/3] pci-hyperv: fix memory leak and add pci_destroy_slot() Dexuan Cui
2019-03-04 21:34 ` Dexuan Cui
2019-03-04 21:34 ` [PATCH 1/3] PCI: hv: Fix a memory leak in hv_eject_device_work() Dexuan Cui
2019-03-04 21:34   ` Dexuan Cui
2019-03-20 21:37   ` Michael Kelley
2019-03-20 21:37     ` Michael Kelley
2019-03-21  0:12     ` Dexuan Cui
2019-03-21  0:12       ` Dexuan Cui
2019-03-26 17:08       ` Lorenzo Pieralisi
2019-03-26 17:08         ` Lorenzo Pieralisi
2019-03-26 17:47         ` Michael Kelley
2019-03-26 17:47           ` Michael Kelley
2019-03-26 18:01           ` Dexuan Cui
2019-03-26 18:01             ` Dexuan Cui
2019-03-26 18:12             ` Lorenzo Pieralisi
2019-03-26 18:12               ` Lorenzo Pieralisi
2019-03-04 21:34 ` [PATCH 2/3] PCI: hv: Add hv_pci_remove_slots() when we unload the driver Dexuan Cui
2019-03-04 21:34   ` Dexuan Cui
2019-03-20 21:38   ` Michael Kelley
2019-03-20 21:38     ` Michael Kelley
2019-03-04 21:34 ` [PATCH 3/3] PCI: hv: Add pci_destroy_slot() in pci_devices_present_work(), if necessary Dexuan Cui
2019-03-04 21:34   ` Dexuan Cui
2019-03-20 21:44   ` Michael Kelley
2019-03-20 21:44     ` Michael Kelley
2019-03-21  0:35     ` Dexuan Cui
2019-03-21  0:35       ` Dexuan Cui
2019-03-21  0:42       ` Dexuan Cui
2019-03-21  0:42         ` Dexuan Cui
2019-03-26 17:50       ` Michael Kelley
2019-03-26 17:50         ` Michael Kelley
2019-03-26 19:54   ` Lorenzo Pieralisi
2019-03-26 19:54     ` Lorenzo Pieralisi
2019-03-27  0:22     ` Dexuan Cui
2019-03-27  0:22       ` Dexuan Cui
2019-03-05 18:27 ` Stephen Hemminger [this message]
2019-03-05 18:27   ` [PATCH 0/3] pci-hyperv: fix memory leak and add pci_destroy_slot() Stephen Hemminger

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=20190305102733.30e25dae@shemminger-XPS-13-9360 \
    --to=stephen@networkplumber.org \
    --cc=Alexander.Levin@microsoft.com \
    --cc=apw@canonical.com \
    --cc=bhelgaas@google.com \
    --cc=decui@microsoft.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=haiyangz@microsoft.com \
    --cc=jackm@mellanox.com \
    --cc=jasowang@redhat.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=marcelo.cerri@canonical.com \
    --cc=mikelley@microsoft.com \
    --cc=olaf@aepfle.de \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.com \
    /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.