projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
PM / hibernate / memory hotplug: Rework mutual exclusion
[firefly-linux-kernel-4.4.55.git]
/
kernel
/
power
/
user.c
diff --git
a/kernel/power/user.c
b/kernel/power/user.c
index 63368163e98d06bc542b40911e365e9d226f9b35..72e8f4fd616dee0cec880d442e33127602601f6c 100644
(file)
--- a/
kernel/power/user.c
+++ b/
kernel/power/user.c
@@
-201,6
+201,7
@@
static long snapshot_ioctl(struct file *filp, unsigned int cmd,
if (!mutex_trylock(&pm_mutex))
return -EBUSY;
+ lock_device_hotplug();
data = filp->private_data;
switch (cmd) {
@@
-373,6
+374,7
@@
static long snapshot_ioctl(struct file *filp, unsigned int cmd,
}
+ unlock_device_hotplug();
mutex_unlock(&pm_mutex);
return error;