Skip to contentSkip to conversation

linux-user: convert remaining fcntl() to safe_fcntl()

PATCH New Laurent Vivier 1 participant 1 message Jul 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: convert remaining fcntl() to safe_fcntl()

Commit 435da5e709 didn't convert a fcntl() call to safe_fcntl() for TARGET_NR_fcntl64 case. There is no reason to not use it in this case.

Fixes 435da5e709 linux-user: Use safe_syscall wrapper for fcntl
---
 linux-user/syscall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/syscall.c +1 -1
index e4b1b7d7da..a997ba914f 100644
@@ -11730,7 +11730,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
             if (ret) {
                 break;
             }
-            ret = get_errno(fcntl(arg1, cmd, &fl));
+            ret = get_errno(safe_fcntl(arg1, cmd, &fl));
             if (ret == 0) {
                 ret = copyto(arg3, &fl);
             }
Signature · 1 line
2.17.1