* Kernel crashes in VirtualBox module after commit 2ecd9d29abb1
@ 2015-08-10 21:49 Larry Finger
2015-08-11 7:44 ` Peter Zijlstra
0 siblings, 1 reply; 2+ messages in thread
From: Larry Finger @ 2015-08-10 21:49 UTC (permalink / raw)
To: Peter Zijlstra, Paolo Bonzini, LKML
A problem with the VirtualBox kernel module vboxdrv.ko has been bisected to
commit 2ecd9d29abb1 "sched, preempt_notifier: separate notifier registration
from static_key inc/dec". The affected kernels crash is various ways. The most
instructive includes a warning issued at kernel/sched/core.c:2342 in
prempt_notifier_register() for "registering prempt_notifier while notifiers
disabled" The call from vboxdrv is as follows:
/*
* Register the callback.
*/
preempt_disable();
pThis->fEnabled = true;
preempt_notifier_register(&pThis->LnxPreemptNotifier);
preempt_enable();
As I have no reason to suspect the kernel after this patch, I would like some
suggestions regarding the best method to patch/fix the VirtualBox code.
Thanks,
Larry
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Kernel crashes in VirtualBox module after commit 2ecd9d29abb1
2015-08-10 21:49 Kernel crashes in VirtualBox module after commit 2ecd9d29abb1 Larry Finger
@ 2015-08-11 7:44 ` Peter Zijlstra
0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2015-08-11 7:44 UTC (permalink / raw)
To: Larry Finger; +Cc: Paolo Bonzini, LKML
On Mon, Aug 10, 2015 at 04:49:49PM -0500, Larry Finger wrote:
> A problem with the VirtualBox kernel module vboxdrv.ko has been bisected to
> commit 2ecd9d29abb1 "sched, preempt_notifier: separate notifier registration
> from static_key inc/dec". The affected kernels crash is various ways. The
> most instructive includes a warning issued at kernel/sched/core.c:2342 in
> prempt_notifier_register() for "registering prempt_notifier while notifiers
> disabled" The call from vboxdrv is as follows:
>
> /*
> * Register the callback.
> */
> preempt_disable();
> pThis->fEnabled = true;
> preempt_notifier_register(&pThis->LnxPreemptNotifier);
> preempt_enable();
>
> As I have no reason to suspect the kernel after this patch, I would like
> some suggestions regarding the best method to patch/fix the VirtualBox code.
You have to call preempt_notifier_inc() when creating your virtual box
instance _before_ creating your vCPU threads which will register the
preempt_notifiers.
You also have to call a matching preempt_notifier_dec() when destroying
your virtual box instance.
The patch you refer adds these calls in
kvm_create_vm()/kvm_destroy_vm(). Mirror that and things should work
again.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-11 7:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-10 21:49 Kernel crashes in VirtualBox module after commit 2ecd9d29abb1 Larry Finger
2015-08-11 7:44 ` Peter Zijlstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox