lkml.org 
[lkml]   [2019]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 3/4] task: With a grace period after finish_task_switch, remove unnecessary code
On Sun, Sep 15, 2019 at 7:32 AM Paul E. McKenney <paulmck@kernel.org> wrote:
>
> First, what am I looking for?
>
> I am looking for something that prevents the following:
>
> o Task A acquires a reference to Task B's task_struct while
> protected only by RCU, and is just about to increment ->rcu_users
> when it is delayed. Maybe its vCPU is preempted or something.

Where exactly do you see "increment ->rcu_users"

There are _no_ users that can increment rcu_users. The thing is
initialized to '2' when the process is created, and nobody ever
increments it. EVER.

It's only ever decremented, and when it hits zero we know that both
users are gone, and we start the rcu-delayed free.

Linus

\
 
 \ /
  Last update: 2019-09-15 19:08    [W:0.117 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site