Re: [PATCH 3/7] sched: Use dl_bw_of() under RCU read lock

2014-09-20 Thread Peter Zijlstra
On Sat, Sep 20, 2014 at 11:25:39PM +0400, Kirill Tkhai wrote: > 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 > >> > >> dl_bw_of() dereferences rq->rd which has to have RCU read lock held. > >> Probability of us

Re: [PATCH 3/7] sched: Use dl_bw_of() under RCU read lock

2014-09-20 Thread Kirill Tkhai
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 >> >> 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

Re: [PATCH 3/7] sched: Use dl_bw_of() under RCU read lock

2014-09-20 Thread Peter Zijlstra
On Sat, Sep 20, 2014 at 08:51:28PM +0400, Kirill Tkhai wrote: > From: Kirill Tkhai > > 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_

[PATCH 3/7] sched: Use dl_bw_of() under RCU read lock

2014-09-20 Thread Kirill Tkhai
From: Kirill Tkhai 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. Signed-off-by: Kirill Tkhai Cc: # v3.14+ --- kernel/sched/core.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel/sc