All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case
@ 2015-01-23  8:53 ` Chen Gang S
  0 siblings, 0 replies; 6+ messages in thread
From: Chen Gang S @ 2015-01-23  8:53 UTC (permalink / raw)
  To: riku.voipio; +Cc: QEMU Trivial, qemu-devel

In abi_long do_ioctl_dm(), after calls lock_user(), it does not call
unlock_user() before go to failure return in default case.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 linux-user/syscall.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index aaac6a2..290fdea 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3681,6 +3681,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, guest_data_size);
-- 
1.9.3 (Apple Git-50)


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-23 10:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-23  8:53 [Qemu-trivial] [PATCH] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case Chen Gang S
2015-01-23  8:53 ` [Qemu-devel] " Chen Gang S
2015-01-23 10:01 ` [Qemu-trivial] " Peter Maydell
2015-01-23 10:01   ` Peter Maydell
2015-01-23 10:19   ` [Qemu-trivial] " Chen Gang S
2015-01-23 10:19     ` Chen Gang S

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.