-
Thomas Gleixner authored
kvm->requests_lock is a sleeping lock in RT, but it's locked inside the preempt disabled region of get_cpu(). Move the get_cpu() region inside the spinlocked region to avoid the might sleep warning. BUG: sleeping function called from invalid context at kernel/rtmutex.c:684 in_atomic(): 1, irqs_disabled(): 0, pid: 10670, name: qemu-kvm Pid: 10670, comm: qemu-kvm Not tainted 2.6.31-rc9-rt9.1-32bit #47 Call Trace: [<c022a88a>] __might_sleep+0xcb/0xd0 [<c0498bd9>] rt_spin_lock+0x29/0x5e [<f9161b54>] make_all_cpus_request+0x36/0xb2 [kvm] [<f9161bf6>] kvm_flush_remote_tlbs+0x12/0x1f [kvm] Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reported-by: Carsten Emde <carsten.emde@osadl.org>
b079dc12