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 MFC after: 1 week
This commit is contained in:
parent
a4a9f2267e
commit
3137d2d4ec
@ -52,7 +52,11 @@ copy_from_user(void *to, const void *from, unsigned long n)
|
||||
#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 { \
|
||||
|
Loading…
Reference in New Issue
Block a user