VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Christophe Leroy <christophe.leroy@c-s.fr> 2020-04-03 07:20:51 +0000 committer: Michael Ellerman <mpe@ellerman.id.au> 2020-05-01 12:35:21 +1000 commit: 41cd780524674082b037e7c8461f90c5e42103f0 parent: 999a22890cb183b918e4372395d24426a755cef2
Commit Summary:
uaccess: Selectively open read or write user access
Diffstat:
1 file changed, 2 insertions, 2 deletions
diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c
index 41670d4a5816..1616710b8a82 100644
--- a/lib/strnlen_user.c
+++ b/lib/strnlen_user.c
@@ -109,9 +109,9 @@ long strnlen_user(const char __user *str, long count)
 		if (max > count)
 			max = count;
 
-		if (user_access_begin(str, max)) {
+		if (user_read_access_begin(str, max)) {
 			retval = do_strnlen_user(str, count, max);
-			user_access_end();
+			user_read_access_end();
 			return retval;
 		}
 	}