提交 94be52dc 编写于 作者: M Mandeep Singh Baines 提交者: Ingo Molnar

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: NPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: NMandeep Singh Baines <msb@google.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 ce9dbe24
无相关合并请求
...@@ -155,7 +155,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout) ...@@ -155,7 +155,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
if (test_taint(TAINT_DIE) || did_panic) if (test_taint(TAINT_DIE) || did_panic)
return; return;
read_lock(&tasklist_lock); rcu_read_lock();
do_each_thread(g, t) { do_each_thread(g, t) {
if (!--max_count) if (!--max_count)
goto unlock; goto unlock;
...@@ -171,7 +171,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout) ...@@ -171,7 +171,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
check_hung_task(t, now, timeout); check_hung_task(t, now, timeout);
} while_each_thread(g, t); } while_each_thread(g, t);
unlock: unlock:
read_unlock(&tasklist_lock); rcu_read_unlock();
} }
static void update_poll_jiffies(void) static void update_poll_jiffies(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部