Skip to content

Commit

Permalink
softlockup: convert read_lock in hung_task to rcu_read_lock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mandeep Singh Baines authored and Ingo Molnar committed Feb 5, 2009
1 parent ce9dbe2 commit 94be52d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/hung_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 94be52d

Please sign in to comment.