git: 4f689b302fc4 - main - linuxkpi: Add user_write_access_*

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Thu, 17 Feb 2022 08:43:20 UTC
The branch main has been updated by manu:

URL: https://cgit.FreeBSD.org/src/commit/?id=4f689b302fc49fc11d19169386f6ccfad05f47dd

commit 4f689b302fc49fc11d19169386f6ccfad05f47dd
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2022-02-15 11:04:40 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-02-17 08:30:55 +0000

    linuxkpi: Add user_write_access_*
    
    Needed by drm-kmod v5.8
    
    Reviewed by:    bz
    MFC after:      2 weeks
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
    Differential Revision:  https://reviews.freebsd.org/D34284
---
 sys/compat/linuxkpi/common/include/asm/uaccess.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/asm/uaccess.h b/sys/compat/linuxkpi/common/include/asm/uaccess.h
index 6994b48d071e..b3b2cb53d22a 100644
--- a/sys/compat/linuxkpi/common/include/asm/uaccess.h
+++ b/sys/compat/linuxkpi/common/include/asm/uaccess.h
@@ -55,6 +55,9 @@ copy_from_user(void *to, const void *from, unsigned long n)
 #define	user_access_begin(ptr, len) access_ok(ptr, len)
 #define	user_access_end() do { } while (0)
 
+#define	user_write_access_begin(ptr, len) access_ok(ptr, len)
+#define	user_write_access_end() do { } while (0)
+
 #define	unsafe_get_user(x, ptr, err) do { \
 	if (unlikely(__get_user(x, ptr))) \
 		goto err; \