Bleeding on the Edge: app-emulation/virtualbox-modules-5.1.22 vs. kernel 4.12.0 final 4.12+


Per Sune Mølgaard’s comment below, this is not actually in version 4.12, so I’ve changed the article’s title to 4.12+ as I do not yet know what version the current development branch is scheduled for, if any.

The Linux kernel developers are once again playing cat and mouse name games with us, and for good reason if you read the commit messages, but that makes it no less frustrating. I’ve been waiting since I wrote the RC2 post for when the hammer was going to fall. With each passing RC everything seemed to be strangely okay. Then 4.12.0 final landed and now our VirtualBox kernel modules have once again exploded.

(nvidia drivers still compile without issue…. whaaaaaaaaaaaattt?!?!)

Hello, error:

In file included from /var/tmp/portage/app-emulation/virtualbox-modules-5.1.22/work/vboxdrv/r0drv/linux/semevent-r0drv-linux.c:42:0:
/var/tmp/portage/app-emulation/virtualbox-modules-5.1.22/work/vboxdrv/r0drv/linux/waitqueue-r0drv-linux.h:49:5: error: unknown type name ‘wait_queue_twait_queue_t    WaitQE;
     ^~~~~~~~~~~~

It spits out way more errors than this, but they’re all downhill of this problem. The cause of this was a little bit of a pain to find. When I look up the file that wait_queue_t is (apparently not) defined in… oh no wait I can’t do that because github says:

Sorry, we had to truncate this directory to 1,000 files. 228 entries were omitted from the list.

Since the file is wait.h, there is no hope of me pulling it up here. *sigh* To the command line…

Crystal user herb on 4 in /usr/src/linux/include/linux
$ git log --grep="wait_queue_t"
commit ac6424b981bce1c4bc55675c6ce11bfe1bbfa64f
Author: Ingo Molnar <mingo@kernel.org>
Date:   Tue Jun 20 12:06:13 2017 +0200

    sched/wait: Rename wait_queue_t => wait_queue_entry_t
    
    Rename:
    
            wait_queue_t            =>      wait_queue_entry_t
    
    'wait_queue_t' was always a slight misnomer: its name implies that it's a "queue",
    but in reality it's a queue *entry*. The 'real' queue is the wait queue head,
    which had to carry the name.
    
    Start sorting this out by renaming it to 'wait_queue_entry_t'.
    
    This also allows the real structure name 'struct __wait_queue' to
    lose its double underscore and become 'struct wait_queue_entry',
    which is the more canonical nomenclature for such data types.
    
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

Well I’ll be. Now you need the following user patch as well as the patch from app-emulation/virtualbox-modules-5.1.22 vs. kernel 4.12.0-rc2 to get this sucker to work.


3 responses on “Bleeding on the Edge: app-emulation/virtualbox-modules-5.1.22 vs. kernel 4.12.0 final 4.12+

  1. I would rather make it change to

        /** The wait queue entry. */
    #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
        wait_queue_entry_t    WaitQE;
    #else
        wait_queue_t    WaitQE;
    #endif
        /** The absolute timeout given as nano seconds since the start of the
    

Leave a Reply