void-packages/srcpkgs/virtualbox-ose/patches/019-linux-5.10-address-space-fixes.patch
Jürgen Buchmüller 538ca4e9f3 virtualbox-ose: fix DKMS w/ linux-5.10; dbus hint
Fix DKMS with linux-5.10 and add a hint for dbus requirement.

Closes: #25277

[ci skip]
2020-12-18 17:22:14 +01:00

17 lines
728 B
Diff

Index: b/src/VBox/Additions/linux/sharedfolders/regops.c
===================================================================
--- src/VBox/Additions/linux/sharedfolders/regops.c
+++ src/VBox/Additions/linux/sharedfolders/regops.c
@@ -1401,7 +1401,10 @@ static int vbsf_lock_user_pages_failed_c
/*
* Check that this is valid user memory that is actually in the kernel range.
*/
-#if RTLNX_VER_MIN(5,0,0) || RTLNX_RHEL_MIN(8,1)
+#if RTLNX_VER_MIN(5,10,0)
+ if ( access_ok((void *)uPtrFrom, cPages << PAGE_SHIFT)
+ && uPtrFrom >= TASK_SIZE_MAX)
+#elif RTLNX_VER_MIN(5,0,0) || RTLNX_RHEL_MIN(8,1)
if ( access_ok((void *)uPtrFrom, cPages << PAGE_SHIFT)
&& uPtrFrom >= USER_DS.seg)
#else