From: Chen Gang S Date: Sun, 25 Jan 2015 00:00:42 +0000 (+0800) Subject: linux-user/syscall.c: do_ioctl_dm: Need to call unlock_user() before going to failure... X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~350^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dec0473dc683ac0ddd7946acdebd285728966a02;p=sdk%2Femulator%2Fqemu.git linux-user/syscall.c: do_ioctl_dm: Need to call unlock_user() before going to failure return in default case 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 Reviewed-by: Peter Maydell Signed-off-by: Michael Tokarev --- 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; }