git: 264df06b36d1 - stable/13 - linux(4): Fix unlink() after a125ed50

From: Dmitry Chagin <dchagin_at_FreeBSD.org>
Date: Fri, 17 Jun 2022 19:40:59 UTC
The branch stable/13 has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=264df06b36d114ea15522e063f392dff9a77c112

commit 264df06b36d114ea15522e063f392dff9a77c112
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2022-05-23 10:18:07 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2022-06-17 19:35:29 +0000

    linux(4): Fix unlink() after a125ed50
    
    MFC after:              2 weeks
    
    (cherry picked from commit e0aef0d62d2b14e754f25ef4f3582ae5faf8579c)
---
 sys/compat/linux/linux_file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 199bed80d92a..2664b38ad1ad 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -741,7 +741,7 @@ linux_unlink(struct thread *td, struct linux_unlink_args *args)
 		if (error == EPERM) {
 			/* Introduce POSIX noncompliant behaviour of Linux */
 			if (kern_statat(td, 0, AT_FDCWD, args->path,
-			    UIO_SYSSPACE, &st, NULL) == 0) {
+			    UIO_USERSPACE, &st, NULL) == 0) {
 				if (S_ISDIR(st.st_mode))
 					error = EISDIR;
 			}