| 1 | Index: src/VBox/Runtime/r0drv/linux/threadctxhooks-r0drv-linux.c
|
|---|
| 2 | ===================================================================
|
|---|
| 3 | --- src/VBox/Runtime/r0drv/linux/threadctxhooks-r0drv-linux.c (revision 101819)
|
|---|
| 4 | +++ src/VBox/Runtime/r0drv/linux/threadctxhooks-r0drv-linux.c (revision 101820)
|
|---|
| 5 | @@ -174,6 +174,10 @@
|
|---|
| 6 | preempt_notifier_init(&pThis->hPreemptNotifier, &pThis->hPreemptOps);
|
|---|
| 7 | pThis->cRefs = 1;
|
|---|
| 8 |
|
|---|
| 9 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
|---|
| 10 | + preempt_notifier_inc();
|
|---|
| 11 | +#endif
|
|---|
| 12 | +
|
|---|
| 13 | *phThreadCtx = pThis;
|
|---|
| 14 | return VINF_SUCCESS;
|
|---|
| 15 | }
|
|---|
| 16 | @@ -230,6 +234,10 @@
|
|---|
| 17 | Assert(!pThis->hPreemptOps.sched_out);
|
|---|
| 18 | Assert(!pThis->hPreemptOps.sched_in);
|
|---|
| 19 |
|
|---|
| 20 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
|---|
| 21 | + preempt_notifier_dec();
|
|---|
| 22 | +#endif
|
|---|
| 23 | +
|
|---|
| 24 | ASMAtomicWriteU32(&pThis->u32Magic, ~RTTHREADCTXINT_MAGIC);
|
|---|
| 25 | RTMemFree(pThis);
|
|---|
| 26 | }
|
|---|