]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
softlockup: convert read_lock in hung_task to rcu_read_lock
authorMandeep Singh Baines <msb@google.com>
Thu, 5 Feb 2009 17:56:08 +0000 (09:56 -0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 5 Feb 2009 18:55:31 +0000 (19:55 +0100)
Since the tasklist is protected by rcu list operations, it is safe
to convert the read_lock()s to rcu_read_lock().

Suggested-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mandeep Singh Baines <msb@google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/hung_task.c

index 481ca8b5c2bc02f6236dada0796b6394b94e554c..3951a80e7cbef8566f3d1fbb7667570ee13c7df8 100644 (file)
@@ -155,7 +155,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
        if (test_taint(TAINT_DIE) || did_panic)
                return;
 
-       read_lock(&tasklist_lock);
+       rcu_read_lock();
        do_each_thread(g, t) {
                if (!--max_count)
                        goto unlock;
@@ -171,7 +171,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
                        check_hung_task(t, now, timeout);
        } while_each_thread(g, t);
  unlock:
-       read_unlock(&tasklist_lock);
+       rcu_read_unlock();
 }
 
 static void update_poll_jiffies(void)