Commit eed3ee08 authored by Arjan van de Ven's avatar Arjan van de Ven Committed by Linus Torvalds
Browse files

PM/resume: wait for device probing to finish

the resume code does not currently wait for device probing to finish.
Even without async function calls this is dicey and not correct,
but with async function calls during the boot sequence this is going
to get hit more...

This patch adds the synchronization using the newly introduced helper.
Signed-off-by: default avatarArjan van de Ven <>
Signed-off-by: default avatarRafael J. Wysocki <>
Cc: Len Brown <>
Acked-by: default avatarGreg KH <>
Signed-off-by: default avatarLinus Torvalds <>
parent 216773a7
......@@ -594,6 +594,12 @@ static int software_resume(void)
int error;
unsigned int flags;
* If the user said "noresume".. bail out early.
if (noresume)
return 0;
* name_to_dev_t() below takes a sysfs buffer mutex when sysfs
* is configured into the kernel. Since the regular hibernate
......@@ -610,6 +616,11 @@ static int software_resume(void)
return -ENOENT;
* Some device discovery might still be in progress; we need
* to wait for this to finish.
swsusp_resume_device = name_to_dev_t(resume_file);
pr_debug("PM: Resume from partition %s\n", resume_file);
} else {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment