diff options
Diffstat (limited to 'kernel/power/disk.c')
-rw-r--r-- | kernel/power/disk.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index bbd85c60f741..c9d74083746f 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/reboot.h> | 14 | #include <linux/reboot.h> |
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/kmod.h> | ||
17 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
18 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
19 | #include <linux/mount.h> | 20 | #include <linux/mount.h> |
@@ -520,6 +521,10 @@ int hibernate(void) | |||
520 | if (error) | 521 | if (error) |
521 | goto Exit; | 522 | goto Exit; |
522 | 523 | ||
524 | error = usermodehelper_disable(); | ||
525 | if (error) | ||
526 | goto Exit; | ||
527 | |||
523 | /* Allocate memory management structures */ | 528 | /* Allocate memory management structures */ |
524 | error = create_basic_memory_bitmaps(); | 529 | error = create_basic_memory_bitmaps(); |
525 | if (error) | 530 | if (error) |
@@ -558,6 +563,7 @@ int hibernate(void) | |||
558 | thaw_processes(); | 563 | thaw_processes(); |
559 | Finish: | 564 | Finish: |
560 | free_basic_memory_bitmaps(); | 565 | free_basic_memory_bitmaps(); |
566 | usermodehelper_enable(); | ||
561 | Exit: | 567 | Exit: |
562 | pm_notifier_call_chain(PM_POST_HIBERNATION); | 568 | pm_notifier_call_chain(PM_POST_HIBERNATION); |
563 | pm_restore_console(); | 569 | pm_restore_console(); |
@@ -634,6 +640,10 @@ static int software_resume(void) | |||
634 | if (error) | 640 | if (error) |
635 | goto Finish; | 641 | goto Finish; |
636 | 642 | ||
643 | error = usermodehelper_disable(); | ||
644 | if (error) | ||
645 | goto Finish; | ||
646 | |||
637 | error = create_basic_memory_bitmaps(); | 647 | error = create_basic_memory_bitmaps(); |
638 | if (error) | 648 | if (error) |
639 | goto Finish; | 649 | goto Finish; |
@@ -641,7 +651,7 @@ static int software_resume(void) | |||
641 | pr_debug("PM: Preparing processes for restore.\n"); | 651 | pr_debug("PM: Preparing processes for restore.\n"); |
642 | error = prepare_processes(); | 652 | error = prepare_processes(); |
643 | if (error) { | 653 | if (error) { |
644 | swsusp_close(); | 654 | swsusp_close(FMODE_READ); |
645 | goto Done; | 655 | goto Done; |
646 | } | 656 | } |
647 | 657 | ||
@@ -656,6 +666,7 @@ static int software_resume(void) | |||
656 | thaw_processes(); | 666 | thaw_processes(); |
657 | Done: | 667 | Done: |
658 | free_basic_memory_bitmaps(); | 668 | free_basic_memory_bitmaps(); |
669 | usermodehelper_enable(); | ||
659 | Finish: | 670 | Finish: |
660 | pm_notifier_call_chain(PM_POST_RESTORE); | 671 | pm_notifier_call_chain(PM_POST_RESTORE); |
661 | pm_restore_console(); | 672 | pm_restore_console(); |