Re: [PATCH] PM: Acquire device locks on suspend

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Alan Stern <stern@...>
Cc: Johannes Berg <johannes@...>, Greg KH <gregkh@...>, Andrew Morton <akpm@...>, Len Brown <lenb@...>, Ingo Molnar <mingo@...>, ACPI Devel Maling List <linux-acpi@...>, LKML <linux-kernel@...>, pm list <linux-pm@...>
Date: Monday, January 7, 2008 - 2:01 pm

On Monday, 7 of January 2008, Alan Stern wrote:

Yes, they need the locking.  I have overlooked that, mostly because the locking
was removed by gregkh-driver-pm-acquire-device-locks-prior-to-suspending.patch
too (because you assumed there woundn't be any need to remove a device during
a suspend, right?).


No, I'm not.


Do you mean it might have been released already by another thread
calling device_pm_destroy_suspended() on the same device?


Well, the asynchronous apprach has the problem that the device may end up
on a wrong list when removed by one of the .suspend() callbacks (and I don't
see how to avoid that without extra complexity).  Perhaps that's something we
can live with, though.

One more question: is there any particular reason not to call
device_pm_remove() at the beginning of device_del()?

Rafael
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Sat Jan 5, 2:36 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Sat Jan 5, 4:08 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Sat Jan 5, 4:19 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Sat Jan 5, 4:39 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Sat Jan 5, 5:13 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Sat Jan 5, 5:41 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Sat Jan 5, 5:58 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Sun Jan 6, 12:04 am)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Sun Jan 6, 9:19 am)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Sun Jan 6, 1:06 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Sun Jan 6, 3:05 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Sun Jan 6, 6:11 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Sun Jan 6, 6:24 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Sun Jan 6, 6:31 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Sun Jan 6, 3:57 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Sun Jan 6, 6:21 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Sun Jan 6, 6:34 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Sun Jan 6, 6:39 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Sun Jan 6, 6:47 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Mon Jan 7, 12:16 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Mon Jan 7, 12:51 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Mon Jan 7, 1:23 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Mon Jan 7, 2:01 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Mon Jan 7, 3:29 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Mon Jan 7, 4:37 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Mon Jan 7, 5:32 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Mon Jan 7, 8:25 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Wed Jan 9, 5:01 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Wed Jan 9, 6:14 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Wed Jan 9, 6:46 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Wed Jan 9, 7:29 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Thu Jan 10, 11:35 am)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Thu Jan 10, 12:59 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Alan Stern, (Thu Jan 10, 1:04 pm)
Re: [PATCH] PM: Acquire device locks on suspend, Rafael J. Wysocki, (Sun Jan 6, 6:19 pm)