From 646f6d71d8d15806ed484c74abb5e57630646f977adcf417015121753a6560c8 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 21 Sep 2017 13:54:20 +0000 Subject: [PATCH] - Update "fixes_for_4.14.patch" to handle missing SKB_GSO_UDP in kernel 4.14 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=364 --- fixes_for_4.14.patch | 43 ++++++++++++++++++++++++++++++++++++++----- virtualbox.changes | 5 +++++ 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/fixes_for_4.14.patch b/fixes_for_4.14.patch index 34db20e..5d30867 100644 --- a/fixes_for_4.14.patch +++ b/fixes_for_4.14.patch @@ -2,15 +2,48 @@ 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* +@@ -353,12 +353,17 @@ static void vboxPciFileClose(struct fil + static int vboxPciFileWrite(struct file* file, unsigned long long offset, unsigned char* data, unsigned int size) + { + int ret; ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) ++ ++ ret = kernel_write(file, data, size, &offset); ++#else + mm_segment_t fs_save; 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); ++#endif if (ret < 0) printk(KERN_DEBUG "vboxPciFileWrite: error %d\n", ret); + +Index: VirtualBox-5.1.28/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c +=================================================================== +--- VirtualBox-5.1.28.orig/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c ++++ VirtualBox-5.1.28/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c +@@ -124,6 +124,10 @@ typedef struct VBOXNETFLTNOTIFIER *PVBOX + # define bstats stats + # define qstats stats + # endif ++#endif ++ ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) ++#define SKB_GSO_UDP 0 + #endif + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0) +@@ -722,9 +726,11 @@ static struct sk_buff *vboxNetFltLinuxSk + case PDMNETWORKGSOTYPE_IPV4_TCP: + fGsoType = SKB_GSO_TCPV4; + break; ++# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) + case PDMNETWORKGSOTYPE_IPV4_UDP: + fGsoType = SKB_GSO_UDP; + break; ++#endif + case PDMNETWORKGSOTYPE_IPV6_TCP: + fGsoType = SKB_GSO_TCPV6; + break; diff --git a/virtualbox.changes b/virtualbox.changes index d0cf0aa..8650ee5 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 21 13:49:01 UTC 2017 - Larry.Finger@lwfinger.net + +- Update "fixes_for_4.14.patch" to handle missing SKB_GSO_UDP in kernel 4.14 + ------------------------------------------------------------------- Wed Sep 20 00:44:12 UTC 2017 - Larry.Finger@lwfinger.net