svn commit: r348085 - stable/12/sys/compat/linuxkpi/common/include/asm
Johannes Lundberg
johalun at FreeBSD.org
Wed May 22 03:58:43 UTC 2019
Author: johalun
Date: Wed May 22 03:58:41 2019
New Revision: 348085
URL: https://svnweb.freebsd.org/changeset/base/348085
Log:
MFC r347620:
LinuxKPI: Update user_access_begin for Linux v5.0.
Check the new LINUXKPI_VERSION macro for backwards compatibility.
This patch is part of D19565
Reviewed by: hps
Approved by: imp (mentor), hps
Modified:
stable/12/sys/compat/linuxkpi/common/include/asm/uaccess.h
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/compat/linuxkpi/common/include/asm/uaccess.h
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/include/asm/uaccess.h Wed May 22 03:54:25 2019 (r348084)
+++ stable/12/sys/compat/linuxkpi/common/include/asm/uaccess.h Wed May 22 03:58:41 2019 (r348085)
@@ -52,7 +52,11 @@ copy_from_user(void *to, const void *from, unsigned lo
#define __copy_from_user(...) copy_from_user(__VA_ARGS__)
#define __copy_in_user(...) copy_from_user(__VA_ARGS__)
+#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 50000
+#define user_access_begin(ptr, len) access_ok(ptr, len)
+#else
#define user_access_begin() do { } while (0)
+#endif
#define user_access_end() do { } while (0)
#define unsafe_get_user(x, ptr, err) do { \
More information about the svn-src-all
mailing list