lkml.org 
[lkml]   [2014]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] Drivers: base: core: Export functions to lock/unlock device hotplug lock
Date
The Hyper-V balloon driver does memory hot-add. The device_hotplug_lock
is designed to address AB BA deadlock issues between the hot-add path
and the sysfs path. Export the APIs to acquire and release the
device_hotplug_lock for use by loadable modules that want to
hot-add memory or CPU.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
drivers/base/core.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 97e2baf..b3073af 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -55,11 +55,13 @@ void lock_device_hotplug(void)
{
mutex_lock(&device_hotplug_lock);
}
+EXPORT_SYMBOL_GPL(lock_device_hotplug);

void unlock_device_hotplug(void)
{
mutex_unlock(&device_hotplug_lock);
}
+EXPORT_SYMBOL_GPL(unlock_device_hotplug);

int lock_device_hotplug_sysfs(void)
{
--
1.7.4.1


\
 
 \ /
  Last update: 2014-12-06 01:01    [W:0.046 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site