On Mon, 7 Jan 2008, Rafael J. Wysocki wrote:Right. I was thinking that it might be called before lock_all_devices(). However let's ignore that possibility and simplify the discussion by assuming that destroy_suspended_device() is never called except by a suspend or resume method for that device or one of its ancestors. (This still leaves the possibility that it might get called by mistake during a runtime suspend or resume...) The same problem affects the synchronous approach. We can fix it by having dpm_suspend() do the list_move() before calling suspend_device(). Then if the suspend fails move the device back. I think it's done this way to avoid having a window where the device isn't on a PM list and is still owned by the bus and the driver. But if a suspend occurs during that window, it shouldn't matter that the device will be left unsuspended. After all, the same thing would have happened if the suspend occurred after bus_remove_device(). So no, there shouldn't be a problem with moving the call. Alan Stern --
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Andy Whitcroft | clam |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Evgeniy Polyakov | Re: [BUG] New Kernel Bugs |
