Messages in this thread | | | Date | Sat, 20 Sep 2014 23:25:39 +0400 | From | Kirill Tkhai <> | Subject | Re: [PATCH 3/7] sched: Use dl_bw_of() under RCU read lock |
| |
On 20.09.2014 22:57, Peter Zijlstra wrote: > On Sat, Sep 20, 2014 at 08:51:28PM +0400, Kirill Tkhai wrote: >> From: Kirill Tkhai <ktkhai@parallels.com> >> >> dl_bw_of() dereferences rq->rd which has to have RCU read lock held. >> Probability of use-after-free and memory corruption aren't zero here. >> > > Additionally we might want to add something like: > lockdep_assert_held_rcu() and put that in dl_bw_of() and other such > places.
Should we change (not now, in general) RCU-related pointers to use rcu_dereference() to have unlocked RCU warnings in dmesg? To catch a problems like that.
This may make code worse readable though.
| |