Skip to content

Commit 944be0b

Browse files
Ingo MolnarLinus Torvalds
authored andcommitted
[PATCH] close_files(): add scheduling point
close_files() can sometimes take long enough to trigger the soft lockup detector. Cc: Eric Dumazet <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 92ba0ee commit 944be0b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kernel/exit.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,10 @@ static void close_files(struct files_struct * files)
430430
while (set) {
431431
if (set & 1) {
432432
struct file * file = xchg(&fdt->fd[i], NULL);
433-
if (file)
433+
if (file) {
434434
filp_close(file, files);
435+
cond_resched();
436+
}
435437
}
436438
i++;
437439
set >>= 1;

0 commit comments

Comments
 (0)