Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-15 Thread Toshi Kani
On Fri, 2013-02-15 at 16:33 +, Moore, Robert wrote: > > > > > > > > > Is there a mechanism in ACPICA to ensure that a handle > > > > > > > > > won't become stale while a notify handler is running for > > > > > > > > > it or is the OS responsible for ensuring that > > > > > > > > > _EJ0 won't

RE: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-15 Thread Moore, Robert
> > > > > > > > Is there a mechanism in ACPICA to ensure that a handle > > > > > > > > won't become stale while a notify handler is running for > > > > > > > > it or is the OS responsible for ensuring that > > > > > > > > _EJ0 won't be run in parallel with notify handlers for > > > > > > > >

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-15 Thread Toshi Kani
t; LKML; Bjorn Helgaas; Jiang > > > > > Liu; > > > > > Yinghai Lu; Yasuaki Ishimatsu; Myron Stowe; linux-...@vger.kernel.org > > > > > Subject: Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues > > > > > and > > > > >

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-15 Thread Rafael J. Wysocki
t; -Original Message- > > > > > > From: Rafael J. Wysocki [mailto:r...@sisk.pl] > > > > > > Sent: Thursday, February 14, 2013 4:04 AM > > > > > > To: Moore, Robert > > > > > > Cc: Toshi Kani; ACPI Devel Mali

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-15 Thread Rafael J. Wysocki
, February 14, 2013 12:59 PM To: Moore, Robert Cc: Toshi Kani; ACPI Devel Maling List; LKML; Bjorn Helgaas; Jiang Liu; Yinghai Lu; Yasuaki Ishimatsu; Myron Stowe; linux-...@vger.kernel.org Subject: Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-15 Thread Toshi Kani
To: Moore, Robert Cc: Toshi Kani; ACPI Devel Maling List; LKML; Bjorn Helgaas; Jiang Liu; Yinghai Lu; Yasuaki Ishimatsu; Myron Stowe; linux-...@vger.kernel.org Subject: Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

RE: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-15 Thread Moore, Robert
Is there a mechanism in ACPICA to ensure that a handle won't become stale while a notify handler is running for it or is the OS responsible for ensuring that _EJ0 won't be run in parallel with notify handlers for device objects being ejected?

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-15 Thread Toshi Kani
On Fri, 2013-02-15 at 16:33 +, Moore, Robert wrote: Is there a mechanism in ACPICA to ensure that a handle won't become stale while a notify handler is running for it or is the OS responsible for ensuring that _EJ0 won't be run in parallel with notify

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Toshi Kani
PM > > > To: Moore, Robert > > > Cc: Toshi Kani; ACPI Devel Maling List; LKML; Bjorn Helgaas; Jiang Liu; > > > Yinghai Lu; Yasuaki Ishimatsu; Myron Stowe; linux-...@vger.kernel.org > > > Subject: Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and &g

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Rafael J. Wysocki
t; LKML; Bjorn Helgaas; Jiang Liu; > > Yinghai Lu; Yasuaki Ishimatsu; Myron Stowe; linux-...@vger.kernel.org > > Subject: Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and > > memory leaks > > > > On Thursday, February 14, 2013 08:45:14 PM Moore, Robert wrote:

RE: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Moore, Robert
..@vger.kernel.org > Subject: Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and > memory leaks > > On Thursday, February 14, 2013 08:45:14 PM Moore, Robert wrote: > > > > > -Original Message- > > > From: Rafael J. Wysocki [mailto:r...@si

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Rafael J. Wysocki
t; LKML; Bjorn Helgaas; Jiang Liu; > > Yinghai Lu; Yasuaki Ishimatsu; Myron Stowe; linux-...@vger.kernel.org > > Subject: Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and > > memory leaks > > > > On Thursday, February 14, 2013 02:31:22 AM Moore, Rober

RE: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Moore, Robert
rnel.org > Subject: Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and > memory leaks > > On Thursday, February 14, 2013 02:31:22 AM Moore, Robert wrote: > > > > > I thought about that, but actually there's no guarantee that the > > > > &

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Rafael J. Wysocki
On Thursday, February 14, 2013 12:05:43 PM Yinghai Lu wrote: > On Wed, Feb 13, 2013 at 5:16 AM, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > This changeset is aimed at fixing a few different but related > > problems in the ACPI hotplug infrastructure. > > > > First of all, since

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Yinghai Lu
On Wed, Feb 13, 2013 at 5:16 AM, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > This changeset is aimed at fixing a few different but related > problems in the ACPI hotplug infrastructure. > > First of all, since notify handlers may be run in parallel with > acpi_bus_scan(),

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Rafael J. Wysocki
On Thursday, February 14, 2013 02:31:22 AM Moore, Robert wrote: > > > > I thought about that, but actually there's no guarantee that the > > > > handle will be valid after _EJ0 as far as I can say. So the race > > > > condition is going to be there anyway and using struct acpi_device > > > > just

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Rafael J. Wysocki
On Thursday, February 14, 2013 02:31:22 AM Moore, Robert wrote: I thought about that, but actually there's no guarantee that the handle will be valid after _EJ0 as far as I can say. So the race condition is going to be there anyway and using struct acpi_device just makes it easier

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Yinghai Lu
On Wed, Feb 13, 2013 at 5:16 AM, Rafael J. Wysocki r...@sisk.pl wrote: From: Rafael J. Wysocki rafael.j.wyso...@intel.com This changeset is aimed at fixing a few different but related problems in the ACPI hotplug infrastructure. First of all, since notify handlers may be run in parallel with

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Rafael J. Wysocki
On Thursday, February 14, 2013 12:05:43 PM Yinghai Lu wrote: On Wed, Feb 13, 2013 at 5:16 AM, Rafael J. Wysocki r...@sisk.pl wrote: From: Rafael J. Wysocki rafael.j.wyso...@intel.com This changeset is aimed at fixing a few different but related problems in the ACPI hotplug infrastructure.

RE: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Moore, Robert
: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks On Thursday, February 14, 2013 02:31:22 AM Moore, Robert wrote: I thought about that, but actually there's no guarantee that the handle will be valid after _EJ0 as far as I can say. So the race condition

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Rafael J. Wysocki
; Yasuaki Ishimatsu; Myron Stowe; linux-...@vger.kernel.org Subject: Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks On Thursday, February 14, 2013 02:31:22 AM Moore, Robert wrote: I thought about that, but actually there's no guarantee that the handle

RE: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Moore, Robert
Kani; ACPI Devel Maling List; LKML; Bjorn Helgaas; Jiang Liu; Yinghai Lu; Yasuaki Ishimatsu; Myron Stowe; linux-...@vger.kernel.org Subject: Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks On Thursday, February 14, 2013 02:31:22 AM Moore, Robert wrote

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Rafael J. Wysocki
; Yasuaki Ishimatsu; Myron Stowe; linux-...@vger.kernel.org Subject: Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks On Thursday, February 14, 2013 08:45:14 PM Moore, Robert wrote: -Original Message- From: Rafael J. Wysocki [mailto:r...@sisk.pl

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-14 Thread Toshi Kani
Devel Maling List; LKML; Bjorn Helgaas; Jiang Liu; Yinghai Lu; Yasuaki Ishimatsu; Myron Stowe; linux-...@vger.kernel.org Subject: Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks On Thursday, February 14, 2013 08:45:14 PM Moore, Robert wrote

RE: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-13 Thread Moore, Robert
> > > I thought about that, but actually there's no guarantee that the > > > handle will be valid after _EJ0 as far as I can say. So the race > > > condition is going to be there anyway and using struct acpi_device > > > just makes it easier to avoid it. > > > > In theory, yes, a stale handle

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-13 Thread Toshi Kani
On Thu, 2013-02-14 at 00:42 +0100, Rafael J. Wysocki wrote: > On Wednesday, February 13, 2013 04:09:29 PM Toshi Kani wrote: > > On Wed, 2013-02-13 at 21:52 +0100, Rafael J. Wysocki wrote: > > > On Wednesday, February 13, 2013 10:43:58 AM Toshi Kani wrote: > > > > On Wed, 2013-02-13 at 14:16 +0100,

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-13 Thread Rafael J. Wysocki
On Wednesday, February 13, 2013 04:09:29 PM Toshi Kani wrote: > On Wed, 2013-02-13 at 21:52 +0100, Rafael J. Wysocki wrote: > > On Wednesday, February 13, 2013 10:43:58 AM Toshi Kani wrote: > > > On Wed, 2013-02-13 at 14:16 +0100, Rafael J. Wysocki wrote: > > > > From: Rafael J. Wysocki > > > >

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-13 Thread Toshi Kani
On Wed, 2013-02-13 at 21:52 +0100, Rafael J. Wysocki wrote: > On Wednesday, February 13, 2013 10:43:58 AM Toshi Kani wrote: > > On Wed, 2013-02-13 at 14:16 +0100, Rafael J. Wysocki wrote: > > > From: Rafael J. Wysocki > > > > > > This changeset is aimed at fixing a few different but related > >

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-13 Thread Rafael J. Wysocki
On Wednesday, February 13, 2013 10:43:58 AM Toshi Kani wrote: > On Wed, 2013-02-13 at 14:16 +0100, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > This changeset is aimed at fixing a few different but related > > problems in the ACPI hotplug infrastructure. > > > > First of all,

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-13 Thread Toshi Kani
On Wed, 2013-02-13 at 14:16 +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > This changeset is aimed at fixing a few different but related > problems in the ACPI hotplug infrastructure. > > First of all, since notify handlers may be run in parallel with > acpi_bus_scan(),

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-13 Thread Toshi Kani
On Wed, 2013-02-13 at 14:16 +0100, Rafael J. Wysocki wrote: From: Rafael J. Wysocki rafael.j.wyso...@intel.com This changeset is aimed at fixing a few different but related problems in the ACPI hotplug infrastructure. First of all, since notify handlers may be run in parallel with

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-13 Thread Rafael J. Wysocki
On Wednesday, February 13, 2013 10:43:58 AM Toshi Kani wrote: On Wed, 2013-02-13 at 14:16 +0100, Rafael J. Wysocki wrote: From: Rafael J. Wysocki rafael.j.wyso...@intel.com This changeset is aimed at fixing a few different but related problems in the ACPI hotplug infrastructure.

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-13 Thread Toshi Kani
On Wed, 2013-02-13 at 21:52 +0100, Rafael J. Wysocki wrote: On Wednesday, February 13, 2013 10:43:58 AM Toshi Kani wrote: On Wed, 2013-02-13 at 14:16 +0100, Rafael J. Wysocki wrote: From: Rafael J. Wysocki rafael.j.wyso...@intel.com This changeset is aimed at fixing a few different

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-13 Thread Rafael J. Wysocki
On Wednesday, February 13, 2013 04:09:29 PM Toshi Kani wrote: On Wed, 2013-02-13 at 21:52 +0100, Rafael J. Wysocki wrote: On Wednesday, February 13, 2013 10:43:58 AM Toshi Kani wrote: On Wed, 2013-02-13 at 14:16 +0100, Rafael J. Wysocki wrote: From: Rafael J. Wysocki

Re: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-13 Thread Toshi Kani
On Thu, 2013-02-14 at 00:42 +0100, Rafael J. Wysocki wrote: On Wednesday, February 13, 2013 04:09:29 PM Toshi Kani wrote: On Wed, 2013-02-13 at 21:52 +0100, Rafael J. Wysocki wrote: On Wednesday, February 13, 2013 10:43:58 AM Toshi Kani wrote: On Wed, 2013-02-13 at 14:16 +0100, Rafael J.

RE: [Update][PATCH] ACPI / hotplug: Fix concurrency issues and memory leaks

2013-02-13 Thread Moore, Robert
I thought about that, but actually there's no guarantee that the handle will be valid after _EJ0 as far as I can say. So the race condition is going to be there anyway and using struct acpi_device just makes it easier to avoid it. In theory, yes, a stale handle could be a problem,