diff options
Diffstat (limited to 'kernel/hung_task.c')
-rw-r--r-- | kernel/hung_task.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/hung_task.c b/kernel/hung_task.c index 0c924de58cb2..022a4927b785 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c | |||
@@ -72,7 +72,13 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout) | |||
72 | { | 72 | { |
73 | unsigned long switch_count = t->nvcsw + t->nivcsw; | 73 | unsigned long switch_count = t->nvcsw + t->nivcsw; |
74 | 74 | ||
75 | if (t->flags & PF_FROZEN) | 75 | /* |
76 | * Ensure the task is not frozen. | ||
77 | * Also, when a freshly created task is scheduled once, changes | ||
78 | * its state to TASK_UNINTERRUPTIBLE without having ever been | ||
79 | * switched out once, it musn't be checked. | ||
80 | */ | ||
81 | if (unlikely(t->flags & PF_FROZEN || !switch_count)) | ||
76 | return; | 82 | return; |
77 | 83 | ||
78 | if (switch_count != t->last_switch_count) { | 84 | if (switch_count != t->last_switch_count) { |