]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/softlockup.c
AMD IOMMU: fix iommu_map_page function
[karo-tx-linux.git] / kernel / softlockup.c
index 1a07f8ca4b923e99c76824a1d585da26a0c53d7d..dc0b3be6b7d52cb98bd84d599bfbb7e7d85b1e85 100644 (file)
@@ -180,10 +180,6 @@ static void check_hung_task(struct task_struct *t, unsigned long now)
        if (t->flags & PF_FROZEN)
                return;
 
-       /* Don't check for tasks waiting on network file systems like NFS */
-       if (t->state & TASK_KILLABLE)
-               return;
-
        if (switch_count != t->last_switch_count || !t->last_switch_timestamp) {
                t->last_switch_count = switch_count;
                t->last_switch_timestamp = now;
@@ -192,7 +188,7 @@ static void check_hung_task(struct task_struct *t, unsigned long now)
        if ((long)(now - t->last_switch_timestamp) <
                                        sysctl_hung_task_timeout_secs)
                return;
-       if (sysctl_hung_task_warnings < 0)
+       if (!sysctl_hung_task_warnings)
                return;
        sysctl_hung_task_warnings--;
 
@@ -230,14 +226,15 @@ static void check_hung_uninterruptible_tasks(int this_cpu)
         * If the system crashed already then all bets are off,
         * do not report extra hung tasks:
         */
-       if ((tainted & TAINT_DIE) || did_panic)
+       if (test_taint(TAINT_DIE) || did_panic)
                return;
 
        read_lock(&tasklist_lock);
        do_each_thread(g, t) {
                if (!--max_count)
                        goto unlock;
-               if (t->state & TASK_UNINTERRUPTIBLE)
+               /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */
+               if (t->state == TASK_UNINTERRUPTIBLE)
                        check_hung_task(t, now);
        } while_each_thread(g, t);
  unlock: