Skip to content

Commit 94be52d

Browse files
Mandeep Singh BainesIngo Molnar
authored andcommitted
softlockup: convert read_lock in hung_task to rcu_read_lock
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>
1 parent ce9dbe2 commit 94be52d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎kernel/hung_task.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
155155
if (test_taint(TAINT_DIE) || did_panic)
156156
return;
157157

158-
read_lock(&tasklist_lock);
158+
rcu_read_lock();
159159
do_each_thread(g, t) {
160160
if (!--max_count)
161161
goto unlock;
@@ -171,7 +171,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
171171
check_hung_task(t, now, timeout);
172172
} while_each_thread(g, t);
173173
unlock:
174-
read_unlock(&tasklist_lock);
174+
rcu_read_unlock();
175175
}
176176

177177
static void update_poll_jiffies(void)

0 commit comments

Comments
 (0)