i = j * __NFDBITS;
if (i >= fdt->max_fds)
break;
- set = fdt->open_fds->fds_bits[j++];
+ set = fdt->open_fds[j++];
while (set) {
if (set & 1) {
struct file * file = xchg(&fdt->fd[i], NULL);
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);
/*
* 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