[vbox-dev] patches for kernel 4.13.0-0.rc0.git4.1.fc27.x86_64 ?

Larry Finger Larry.Finger at lwfinger.net
Wed Jul 12 15:43:10 GMT 2017


On 07/12/2017 10:16 AM, Sérgio Basto wrote:
> On Wed, 2017-07-12 at 09:03 -0500, Larry Finger wrote:
>> On 07/12/2017 06:57 AM, Sérgio Basto wrote:
>>> Hi,
>>> Have we patches for kernel 4.13.0-rcx [1]?
>>> Thanks,
>>>
>>> [1]
>>> https://bugzilla.rpmfusion.org/show_bug.cgi?id=4594
>>> https://bugzilla.rpmfusion.org/attachment.cgi?id=1815
>>
>> Sergio,
>>
>> Thus far, the changes appear to be quite simple. The problem is that
>> wait_queue_t has been replaced by wait_queue_entry_t. The patch below
>> works for me.
>>
>> Larry
>>
>> Index: src/vboxdrv/r0drv/linux/waitqueue-r0drv-linux.h
>> ===================================================================
>> --- src.orig/vboxdrv/r0drv/linux/waitqueue-r0drv-linux.h
>> +++ le
>> @@ -39,6 +39,9 @@
>>     *  schedule_hrtimeout_range. */
>>    #define RTR0SEMLNXWAIT_RESOLUTION   50000
>>
>> +#ifndef wait_queue_t   /* eventually kernel version >= 4.13.0 */
>> +#define wait_queue_t wait_queue_entry_t
>> +#endif
>>
>>    /**
>>     * Kernel mode Linux wait state structure.
>>
> 
> testing it with in my laptop (kernel 4.11)
> 
> 2017/07/12 16:10:35 akmods: Building RPM using the command
> '/sbin/akmodsbuild --target x86_64 --kernels 4.11.8-200.fc25.x86_
> 64 /usr/src/akmods/VirtualBox-kmod.latest'
>                                                                        
>              
> ./include/linux/wait.h:970:6: note: expected 'wait_queue_t * {aka
> struct __wait_queue *}' but argument is of type 'int *'
>   void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int
> state);
>        ^~~~~~~~~~~~~~~
>                                                                         
>                                  
> In file included from /tmp/akmodsbuild.RpgDqJfQ/BUILD/VirtualBox-kmod-
> 5.1.22/_kmod_build_4.11.8-200.fc25.x86_64/vboxdrv/r0dr
> v/linux/semeventmulti-r0drv-linux.c:42:0:
>                                                                         
>              
> /tmp/akmodsbuild.RpgDqJfQ/BUILD/VirtualBox-kmod-
> 5.1.22/_kmod_build_4.11.8-
> 200.fc25.x86_64/vboxdrv/r0drv/linux/waitqueue-r0dr
> v-linux.h: In function 'rtR0SemLnxWaitDelete':
>                                                                         
>         
> /tmp/akmodsbuild.RpgDqJfQ/BUILD/VirtualBox-kmod-
> 5.1.22/_kmod_build_4.11.8-
> 200.fc25.x86_64/vboxdrv/r0drv/linux/waitqueue-r0dr
> v-linux.h:270:36: error: passing argument 2 of 'finish_wait' from
> incompatible pointer type [-Werror=incompatible-pointer-ty
> pes]
>                                                                         
>                                                   
>       finish_wait(pWait->pWaitQueue, &pWait->WaitQE);
>                                                                         
>   
>                                      ^
>                                                                         
>                  
> In file included from ./include/linux/mmzone.h:9:0,
>                                                                         
>    
>                   from ./include/linux/gfp.h:5,
>                                                                         
>         
>                   from ./include/linux/slab.h:14,
>                                                                         
>       
>                   from /tmp/akmodsbuild.RpgDqJfQ/BUILD/VirtualBox-kmod-
> 5.1.22/_kmod_build_4.11.8-200.fc25.x86_64/vboxdrv/r0dr
> v/linux/the-linux-kernel.h:82,
>                                                                         
>                         
>                   from /tmp/akmodsbuild.RpgDqJfQ/BUILD/VirtualBox-kmod-
> 5.1.22/_kmod_build_4.11.8-200.fc25.x86_64/vboxdrv/r0dr
> v/linux/semeventmulti-r0drv-linux.c:32:
>                                                                         
>                
> ./include/linux/wait.h:973:6: note: expected 'wait_queue_t * {aka
> struct __wait_queue *}' but argument is of type 'int *'
>   void finish_wait(wait_queue_head_t *q, wait_queue_t *wait);
> 

Yes, it does not work for kernel 4.11. The "#ifndef" will eventually be replaced 
by "#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)", but that will not work 
until kernel 4.13-rc1 is released. You asked about 4.13-rc0, but that entity 
does not exist here. If your kernel Makefile does indeed have 4.13, then use the 
kernel version test.

I cannot test now, but it would probably work if you added "include 
<linux/wait.h>" just before the ifndef statement.

Larry





More information about the vbox-dev mailing list