lkml.org 
[lkml]   [2024]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5.15 64/76] proc: Use task_is_running() for wchan in /proc/$pid/stat
On Wed, Mar 13, 2024 at 08:04:36PM -0700, Kees Cook wrote:
>On Wed, Mar 13, 2024 at 12:42:11PM -0400, Sasha Levin wrote:
>> From: Kees Cook <keescook@chromium.org>
>>
>> [ Upstream commit 4e046156792c26bef8a4e30be711777fc8578257 ]
>>
>> The implementations of get_wchan() can be expensive. The only information
>> imparted here is whether or not a process is currently blocked in the
>> scheduler (and even this doesn't need to be exact). Avoid doing the
>> heavy lifting of stack walking and just report that information by using
>> task_is_running().
>>
>> Signed-off-by: Kees Cook <keescook@chromium.org>
>> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
>> Link: https://lkml.kernel.org/r/20211008111626.211281780@infradead.org
>> Stable-dep-of: 60f92acb60a9 ("fs/proc: do_task_stat: move thread_group_cputime_adjusted() outside of lock_task_sighand()")
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>Looks fine to me. Can you double-check that commit
>54354c6a9f7f ("Revert "proc/wchan: use printk format instead of lookup_symbol_name()"")
>is already backported too?

Yup, it's there too.

--
Thanks,
Sasha

\
 
 \ /
  Last update: 2024-05-27 15:50    [W:0.017 / U:1.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site