UPSTREAM: usb: dwc3: debugfs: fix regdump offset
[cascardo/linux.git] / kernel / exit.c
index d8bd3b4..e38a97f 100644 (file)
@@ -669,7 +669,13 @@ static void exit_mm(struct task_struct * tsk)
                        set_task_state(tsk, TASK_UNINTERRUPTIBLE);
                        if (!self.task) /* see coredump_finish() */
                                break;
-                       schedule();
+                       /*
+                        * If core_pattern is set to pipe, we could wait here
+                        * for unbounded time. We don't want to prevent suspend.
+                        * We also don't want to trigger the hung_task detector.
+                        * So skip freezer.
+                        */
+                       freezable_schedule();
                }
                __set_task_state(tsk, TASK_RUNNING);
                down_read(&mm->mmap_sem);
@@ -1026,7 +1032,7 @@ void do_exit(long code)
        /*
         * Make sure we are holding no locks:
         */
-       debug_check_no_locks_held(tsk);
+       debug_check_no_locks_held(tsk, "lock held at task exit time");
        /*
         * We can do this unlocked here. The futex code uses this flag
         * just to verify whether the pi state cleanup has been done