lkml.org 
[lkml]   [2022]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT PULL] timer fixes
On Sat, Aug 13, 2022 at 9:25 AM Borislav Petkov <bp@alien8.de> wrote:
>
> That task_struct.sighand is marked __rcu and thus noderef and sparse
> complains:

I think that RCU marking is misleading.

Doing a

git grep -e '->sighand'

shows that we basically never treat that as some kind of RCU pointer.

Adding a

grep -i rcu

to the above shows that we have a couple of places that do this
carefully, but they are the exception rather than the rule.

I think the issue is that "current->sighand" is always safe (and that
"me->sighand" is the same thing), and that sighand has RCU-delayed
freeing so that __lock_task_sighand() can safely try to take the lock
of another process' sighand.

And we have no real way to explain to sparse that *some* cases are
fine, others are not and need the sighand lock (after that careful
__lock_task_sighand thing).

Linus

\
 
 \ /
  Last update: 2022-08-13 22:28    [W:0.076 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site