From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: Riku Voipio <riku.voipio@iki.fi>,
Samuel Thibault <samuel.thibault@ens-lyon.org>,
Laurent Vivier <laurent@vivier.eu>
Subject: [Qemu-devel] [PULL 3/4] linux-user: Fix sched_getaffinity mask size
Date: Tue, 20 Feb 2018 10:16:39 +0100 [thread overview]
Message-ID: <20180220091640.10875-4-laurent@vivier.eu> (raw)
In-Reply-To: <20180220091640.10875-1-laurent@vivier.eu>
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
We properly computed the capped mask size to be put to the application
buffer, but didn't actually used it. Also, we need to return the capped mask
size instead of 0 on success.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180211174704.27441-1-samuel.thibault@ens-lyon.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/syscall.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index effc3a0881..e24f43c4a2 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -10502,7 +10502,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
ret = arg2;
}
- ret = host_to_target_cpu_mask(mask, mask_size, arg3, arg2);
+ if (host_to_target_cpu_mask(mask, mask_size, arg3, ret)) {
+ goto efault;
+ }
}
}
break;
--
2.14.3
next prev parent reply other threads:[~2018-02-20 9:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-20 9:16 [Qemu-devel] [PULL 0/4] Linux user for 2.12 patches Laurent Vivier
2018-02-20 9:16 ` [Qemu-devel] [PULL 1/4] linux-user: Implement ioctl cmd TIOCGPTPEER Laurent Vivier
2018-02-20 9:16 ` [Qemu-devel] [PULL 2/4] linux-user: Fix register used for 6th and 7th syscall argument on aarch64 Laurent Vivier
2018-02-20 9:16 ` Laurent Vivier [this message]
2018-02-20 9:16 ` [Qemu-devel] [PULL 4/4] linux-user: Remove THREAD macro Laurent Vivier
2018-02-20 10:34 ` [Qemu-devel] [PULL 0/4] Linux user for 2.12 patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180220091640.10875-4-laurent@vivier.eu \
--to=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=samuel.thibault@ens-lyon.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).