Since Linux 6.11, the path argument may be NULL.

Signed-off-by: Jean-Christian CÎRSTEA <[email protected]>
---
 linux-user/syscall.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 2060e561a2..e1b61f6dc5 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -12142,7 +12142,8 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int 
num, abi_long arg1,
             int flags = arg3;
 
             p = lock_user_string(arg2);
-            if (p == NULL) {
+            /* Since Linux 6.11, the path argument may be NULL */
+            if (arg2 != 0 && p == NULL) {
                 return -TARGET_EFAULT;
             }
 #if defined(__NR_statx)
-- 
2.51.0


Reply via email to