Re: [PATCH 1/3] driver core: export lock_device_hotplug/unlock_device_hotplug

2015-02-12 Thread Vitaly Kuznetsov
"Rafael J. Wysocki" writes: > On Wednesday, February 11, 2015 12:39:47 PM Andrew Morton wrote: >> On Wed, 11 Feb 2015 16:44:20 +0100 Vitaly Kuznetsov >> wrote: >> >> > add_memory() is supposed to be run with device_hotplug_lock grabbed, >> > otherwise >> > it can race with e.g. device_online(

Re: [PATCH 1/3] driver core: export lock_device_hotplug/unlock_device_hotplug

2015-02-11 Thread Rafael J. Wysocki
On Wednesday, February 11, 2015 12:39:47 PM Andrew Morton wrote: > On Wed, 11 Feb 2015 16:44:20 +0100 Vitaly Kuznetsov > wrote: > > > add_memory() is supposed to be run with device_hotplug_lock grabbed, > > otherwise > > it can race with e.g. device_online(). Allow external modules (hv_balloon

Re: [PATCH 1/3] driver core: export lock_device_hotplug/unlock_device_hotplug

2015-02-11 Thread Andrew Morton
On Wed, 11 Feb 2015 16:44:20 +0100 Vitaly Kuznetsov wrote: > add_memory() is supposed to be run with device_hotplug_lock grabbed, otherwise > it can race with e.g. device_online(). Allow external modules (hv_balloon for > now) to lock device hotplug. > > ... > > --- a/drivers/base/core.c > +++ b

[PATCH 1/3] driver core: export lock_device_hotplug/unlock_device_hotplug

2015-02-11 Thread Vitaly Kuznetsov
add_memory() is supposed to be run with device_hotplug_lock grabbed, otherwise it can race with e.g. device_online(). Allow external modules (hv_balloon for now) to lock device hotplug. Signed-off-by: Vitaly Kuznetsov --- drivers/base/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/