Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-28 Thread Toshi Kani
On Wed, 2013-08-28 at 10:12 +0800, Gu Zheng wrote: > On 08/28/2013 05:38 AM, Toshi Kani wrote: : > >> > >> What about changing device_hotplug_lock and acpi_scan_lock to rwsem? like > >> the > >> attached one(With a preliminary test, it also can make the splat go > >> away).:) > > > > I am

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-28 Thread Rafael J. Wysocki
On Wednesday, August 28, 2013 08:24:22 AM Tejun Heo wrote: > Hello, Rafael. > > On Tue, Aug 27, 2013 at 11:45:46PM +0200, Rafael J. Wysocki wrote: > > I've thought about that a bit over the last several hours and I'm still > > thinking that that patch is a bit overkill, because it will trigger

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-28 Thread Tejun Heo
Hello, Rafael. On Tue, Aug 27, 2013 at 11:45:46PM +0200, Rafael J. Wysocki wrote: > I've thought about that a bit over the last several hours and I'm still > thinking that that patch is a bit overkill, because it will trigger the > restart_syscall() for all cases when device_hotplug_lock is

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-28 Thread Gu Zheng
Hi Rafael, On 08/28/2013 05:45 AM, Rafael J. Wysocki wrote: > On Tuesday, August 27, 2013 02:36:44 PM Tejun Heo wrote: >> Hello, >> [...] > > I've thought about that a bit over the last several hours and I'm still > thinking that that patch is a bit overkill, because it will trigger the >

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-28 Thread Gu Zheng
Hi Rafael, On 08/28/2013 05:45 AM, Rafael J. Wysocki wrote: On Tuesday, August 27, 2013 02:36:44 PM Tejun Heo wrote: Hello, [...] I've thought about that a bit over the last several hours and I'm still thinking that that patch is a bit overkill, because it will trigger the

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-28 Thread Tejun Heo
Hello, Rafael. On Tue, Aug 27, 2013 at 11:45:46PM +0200, Rafael J. Wysocki wrote: I've thought about that a bit over the last several hours and I'm still thinking that that patch is a bit overkill, because it will trigger the restart_syscall() for all cases when device_hotplug_lock is locked,

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-28 Thread Rafael J. Wysocki
On Wednesday, August 28, 2013 08:24:22 AM Tejun Heo wrote: Hello, Rafael. On Tue, Aug 27, 2013 at 11:45:46PM +0200, Rafael J. Wysocki wrote: I've thought about that a bit over the last several hours and I'm still thinking that that patch is a bit overkill, because it will trigger the

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-28 Thread Toshi Kani
On Wed, 2013-08-28 at 10:12 +0800, Gu Zheng wrote: On 08/28/2013 05:38 AM, Toshi Kani wrote: : What about changing device_hotplug_lock and acpi_scan_lock to rwsem? like the attached one(With a preliminary test, it also can make the splat go away).:) I am curious how msleep(10)

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-27 Thread Gu Zheng
Hi Toshi, On 08/28/2013 05:38 AM, Toshi Kani wrote: > On Tue, 2013-08-27 at 17:21 +0800, Gu Zheng wrote: >> Hi Rafael, >> >> On 08/26/2013 11:02 PM, Rafael J. Wysocki wrote: >> >>> On Monday, August 26, 2013 04:43:26 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 02:42:09 PM Rafael

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-27 Thread Toshi Kani
On Tue, 2013-08-27 at 17:21 +0800, Gu Zheng wrote: > Hi Rafael, > > On 08/26/2013 11:02 PM, Rafael J. Wysocki wrote: > > > On Monday, August 26, 2013 04:43:26 PM Rafael J. Wysocki wrote: > >> On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: > >>> On Monday, August 26, 2013

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-27 Thread Rafael J. Wysocki
On Tuesday, August 27, 2013 02:36:44 PM Tejun Heo wrote: > Hello, > > On Tue, Aug 27, 2013 at 05:21:44PM +0800, Gu Zheng wrote: > > >> OK, so the patch below is quick and dirty and overkill, but it should > > >> make the > > >> splat go away at least. > > > > > > And if this patch does make the

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-27 Thread Tejun Heo
Hello, On Tue, Aug 27, 2013 at 05:21:44PM +0800, Gu Zheng wrote: > >> OK, so the patch below is quick and dirty and overkill, but it should make > >> the > >> splat go away at least. > > > > And if this patch does make the splat go away for you, please also test the > > appended one (Tejun,

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-27 Thread Gu Zheng
Hi Rafael, On 08/26/2013 11:02 PM, Rafael J. Wysocki wrote: > On Monday, August 26, 2013 04:43:26 PM Rafael J. Wysocki wrote: >> On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: >>> On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: Hi Rafael, > > [...] > >> >> OK, so

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-27 Thread Gu Zheng
Hi Rafael, On 08/26/2013 11:02 PM, Rafael J. Wysocki wrote: On Monday, August 26, 2013 04:43:26 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: Hi Rafael, [...] OK, so the patch below is

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-27 Thread Tejun Heo
Hello, On Tue, Aug 27, 2013 at 05:21:44PM +0800, Gu Zheng wrote: OK, so the patch below is quick and dirty and overkill, but it should make the splat go away at least. And if this patch does make the splat go away for you, please also test the appended one (Tejun, thanks for the

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-27 Thread Rafael J. Wysocki
On Tuesday, August 27, 2013 02:36:44 PM Tejun Heo wrote: Hello, On Tue, Aug 27, 2013 at 05:21:44PM +0800, Gu Zheng wrote: OK, so the patch below is quick and dirty and overkill, but it should make the splat go away at least. And if this patch does make the splat go away for

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-27 Thread Toshi Kani
On Tue, 2013-08-27 at 17:21 +0800, Gu Zheng wrote: Hi Rafael, On 08/26/2013 11:02 PM, Rafael J. Wysocki wrote: On Monday, August 26, 2013 04:43:26 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 11:13:13 AM Gu Zheng

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-27 Thread Gu Zheng
Hi Toshi, On 08/28/2013 05:38 AM, Toshi Kani wrote: On Tue, 2013-08-27 at 17:21 +0800, Gu Zheng wrote: Hi Rafael, On 08/26/2013 11:02 PM, Rafael J. Wysocki wrote: On Monday, August 26, 2013 04:43:26 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Gu Zheng
Hi Rafael, On 08/26/2013 11:02 PM, Rafael J. Wysocki wrote: > On Monday, August 26, 2013 04:43:26 PM Rafael J. Wysocki wrote: >> On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: >>> On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: Hi Rafael, > > [...] > >> >> OK, so

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Gu Zheng
>>> >>>[] device_remove_file+0x17/0x20 >>> >>> &

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Gu Zheng
Hi Rafael, On 08/26/2013 10:43 PM, Rafael J. Wysocki wrote: > On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: >> On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: >>> Hi Rafael, >> >> Hi, >> >>> On 08/26/2013 04:09 AM, Rafael J. Wysocki wrote: >>> From: Rafael J.

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Rafael J. Wysocki
On Monday, August 26, 2013 04:43:26 PM Rafael J. Wysocki wrote: > On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: > > On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: > > > Hi Rafael, [...] > > OK, so the patch below is quick and dirty and overkill, but it should make the

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Rafael J. Wysocki
On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: > On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: > > Hi Rafael, > > Hi, > > > On 08/26/2013 04:09 AM, Rafael J. Wysocki wrote: > > > > > From: Rafael J. Wysocki > > > > > > There are two mutexes, device_hotplug_lock and

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Rafael J. Wysocki
On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: > Hi Rafael, Hi, > On 08/26/2013 04:09 AM, Rafael J. Wysocki wrote: > > > From: Rafael J. Wysocki > > > > There are two mutexes, device_hotplug_lock and acpi_scan_lock, held > > around the acpi_bus_trim() call in acpi_scan_hot_remove()

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Rafael J. Wysocki
On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: Hi Rafael, Hi, On 08/26/2013 04:09 AM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki rafael.j.wyso...@intel.com There are two mutexes, device_hotplug_lock and acpi_scan_lock, held around the acpi_bus_trim() call in

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Rafael J. Wysocki
On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: Hi Rafael, Hi, On 08/26/2013 04:09 AM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki rafael.j.wyso...@intel.com There are two mutexes,

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Rafael J. Wysocki
On Monday, August 26, 2013 04:43:26 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: Hi Rafael, [...] OK, so the patch below is quick and dirty and overkill, but it should make the splat

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Gu Zheng
Hi Rafael, On 08/26/2013 10:43 PM, Rafael J. Wysocki wrote: On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: Hi Rafael, Hi, On 08/26/2013 04:09 AM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Gu Zheng
[PATCH] driver core / ACPI: Avoid device removal locking problems is a good solution.:) Regards, Gu [8131b6fc] acpi_bus_hot_remove_device+0x37/0x73

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-26 Thread Gu Zheng
Hi Rafael, On 08/26/2013 11:02 PM, Rafael J. Wysocki wrote: On Monday, August 26, 2013 04:43:26 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 02:42:09 PM Rafael J. Wysocki wrote: On Monday, August 26, 2013 11:13:13 AM Gu Zheng wrote: Hi Rafael, [...] OK, so the patch below is

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-25 Thread Gu Zheng
Hi Rafael, On 08/26/2013 04:09 AM, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > There are two mutexes, device_hotplug_lock and acpi_scan_lock, held > around the acpi_bus_trim() call in acpi_scan_hot_remove() which > generally removes devices (it removes ACPI device objects at least,

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-25 Thread Greg Kroah-Hartman
On Sun, Aug 25, 2013 at 10:09:47PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > There are two mutexes, device_hotplug_lock and acpi_scan_lock, held > around the acpi_bus_trim() call in acpi_scan_hot_remove() which > generally removes devices (it removes ACPI device objects at

[PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-25 Thread Rafael J. Wysocki
From: Rafael J. Wysocki There are two mutexes, device_hotplug_lock and acpi_scan_lock, held around the acpi_bus_trim() call in acpi_scan_hot_remove() which generally removes devices (it removes ACPI device objects at least, but it may also remove "physical" device objects through .detach()

[PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-25 Thread Rafael J. Wysocki
From: Rafael J. Wysocki rafael.j.wyso...@intel.com There are two mutexes, device_hotplug_lock and acpi_scan_lock, held around the acpi_bus_trim() call in acpi_scan_hot_remove() which generally removes devices (it removes ACPI device objects at least, but it may also remove physical device objects

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-25 Thread Greg Kroah-Hartman
On Sun, Aug 25, 2013 at 10:09:47PM +0200, Rafael J. Wysocki wrote: From: Rafael J. Wysocki rafael.j.wyso...@intel.com There are two mutexes, device_hotplug_lock and acpi_scan_lock, held around the acpi_bus_trim() call in acpi_scan_hot_remove() which generally removes devices (it removes ACPI

Re: [PATCH] driver core / ACPI: Avoid device removal locking problems

2013-08-25 Thread Gu Zheng
Hi Rafael, On 08/26/2013 04:09 AM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki rafael.j.wyso...@intel.com There are two mutexes, device_hotplug_lock and acpi_scan_lock, held around the acpi_bus_trim() call in acpi_scan_hot_remove() which generally removes devices (it removes ACPI