sched: Use dl_bw_of() under RCU read lock
authorKirill Tkhai <ktkhai@parallels.com>
Mon, 22 Sep 2014 18:36:24 +0000 (22:36 +0400)
committerIngo Molnar <mingo@kernel.org>
Wed, 24 Sep 2014 12:47:09 +0000 (14:47 +0200)
commit66339c31bc3978d5fff9c4b4cb590a861def4db2
treecaf50db970fc626ee5c6d012fb365442c08d07ee
parent7a96c231ca23f0f5622852307df4209afc502ec3
sched: Use dl_bw_of() under RCU read lock

dl_bw_of() dereferences rq->rd which has to have RCU read lock held.
Probability of use-after-free isn't zero here.

Also add lockdep assert into dl_bw_cpus().

Signed-off-by: Kirill Tkhai <ktkhai@parallels.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <stable@vger.kernel.org> # v3.14+
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20140922183624.11015.71558.stgit@localhost
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c