qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PULL 12/46] linux-user/syscall.c: do_ioctl_dm: Need to c


From: Michael Tokarev
Subject: [Qemu-trivial] [PULL 12/46] linux-user/syscall.c: do_ioctl_dm: Need to call unlock_user() before going to failure return in default case
Date: Tue, 10 Feb 2015 09:34:01 +0300

From: Chen Gang S <address@hidden>

In abi_long do_ioctl_dm(), after lock_user() call, the code does
not call unlock_user() before going to failure return in default case.

Signed-off-by: Chen Gang <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
 linux-user/syscall.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 310080c..5720195 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3576,6 +3576,7 @@ static abi_long do_ioctl_dm(const IOCTLEntry *ie, uint8_t 
*buf_temp, int fd,
     }
     default:
         ret = -TARGET_EINVAL;
+        unlock_user(argptr, guest_data, 0);
         goto out;
     }
     unlock_user(argptr, guest_data, 0);
@@ -3695,6 +3696,7 @@ static abi_long do_ioctl_dm(const IOCTLEntry *ie, uint8_t 
*buf_temp, int fd,
             break;
         }
         default:
+            unlock_user(argptr, guest_data, 0);
             ret = -TARGET_EINVAL;
             goto out;
         }
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]