From: "K. Y. Srinivasan" <kys@microsoft.com>
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com,
linux-mm@kvack.org, isimatu.yasuaki@jp.fujitsu.com
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Subject: [PATCH 1/2] Drivers: base: core: Export functions to lock/unlock device hotplug lock
Date: Fri, 5 Dec 2014 16:41:37 -0800 [thread overview]
Message-ID: <1417826498-21172-1-git-send-email-kys@microsoft.com> (raw)
In-Reply-To: <1417826471-21131-1-git-send-email-kys@microsoft.com>
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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-12-05 23:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-06 0:41 [PATCH 0/2] Drivers: hv: hv_balloon: Fix a deadlock in the hot-add path K. Y. Srinivasan
2014-12-06 0:41 ` K. Y. Srinivasan [this message]
2014-12-06 0:41 ` [PATCH 2/2] Drivers: hv: balloon: Fix the deadlock issue in the memory hot-add code K. Y. Srinivasan
2014-12-08 15:04 ` Michal Hocko
2014-12-09 1:23 ` Yasuaki Ishimatsu
2014-12-09 9:08 ` Michal Hocko
2014-12-09 10:25 ` Yasuaki Ishimatsu
2014-12-09 10:55 ` Michal Hocko
2014-12-11 0:21 ` KY Srinivasan
2014-12-11 12:58 ` Michal Hocko
2014-12-14 18:45 ` KY Srinivasan
2014-12-08 0:07 ` [PATCH 0/2] Drivers: hv: hv_balloon: Fix a deadlock in the hot-add path Yasuaki Ishimatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1417826498-21172-1-git-send-email-kys@microsoft.com \
--to=kys@microsoft.com \
--cc=apw@canonical.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=olaf@aepfle.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox