File linux-5.10-address-space-fixes.patch of Package virtualbox.openSUSE_Leap_15.2_Update

Index: b/src/VBox/Additions/linux/sharedfolders/regops.c
===================================================================
--- a/src/VBox/Additions/linux/sharedfolders/regops.c
+++ b/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
openSUSE Build Service is sponsored by