[vbox-dev] Missing global with kernel 4.14-rcX

Michael Thayer michael.thayer at oracle.com
Wed Sep 20 17:55:05 GMT 2017


Hello Larry,

Thank you! I am away from my laptop (except in-between to send e-mail)
for a week, so don't worry about the slow response time.

Regards
Michael

19.09.2017 17:35, Larry Finger wrote:
> On 09/19/2017 10:10 AM, Larry Finger wrote:
>> In kernel 4.14, the functions vfs_read() and vfs_write() are no longer
>> exported. This change causes vboxpci.ko to fail when it is loaded as
>> it appears to need vfs_read().
>>
>> I searched the VB source code, but I do not see any direct reference
>> to vfs_read(). Why is it needed? What needs to change for kernel 4.14>
>>
>> My VM's do not need vboxpci, and a quick test shows that they run
>> under 4.14-rc1.
> 
> Sorry. The missing global is vfs_write, not vfs_read. The following
> patch fixes the build and load problem. It has been compile tested only.
> 
> Index: VirtualBox-5.1.28/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
> ===================================================================
> ---
> VirtualBox-5.1.28.orig/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
> +++ VirtualBox-5.1.28/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
> @@ -357,7 +357,11 @@ static int vboxPciFileWrite(struct file*
> 
>      fs_save = get_fs();
>      set_fs(get_ds());
> +# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
> +    ret = kernel_write(file, data, size, &offset);
> +#else
>      ret = vfs_write(file, data, size, &offset);
> +#endif
>      set_fs(fs_save);
>      if (ret < 0)
>          printk(KERN_DEBUG "vboxPciFileWrite: error %d\n", ret);
> 
> Larry
> 
> 
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> https://www.virtualbox.org/mailman/listinfo/vbox-dev

-- 
Michael Thayer | VirtualBox engineer
ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | D-71384 Weinstadt

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstraße 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Handelsregister
der Handelskammer Midden-Nederland, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher



More information about the vbox-dev mailing list