qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: patches@linaro.org, Riku Voipio <riku.voipio@iki.fi>
Subject: [Qemu-devel] [PATCH 0/2] linux-user: fix some msgrcv edge cases
Date: Fri, 20 May 2016 19:00:55 +0100	[thread overview]
Message-ID: <1463767257-20466-1-git-send-email-peter.maydell@linaro.org> (raw)

These patches fix a couple of issues with handling edge cases
in our linux-user msgrcv implementation:
 * we weren't dealing with negative msgsz correctly (should fail EINVAL)
 * we were using g_malloc() rather than g_try_malloc() for an allocatino
   whose size is controlled by the guest

(Both these were already handled correctly for msgsnd.)

This fixes a hang in the Linux Test Project msgrcv03 test case.

Peter Maydell (2):
  linux-user: Handle msgrcv error case correctly
  linux-user: Use g_try_malloc() in do_msgrcv()

 linux-user/syscall.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

-- 
1.9.1

             reply	other threads:[~2016-05-20 18:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-20 18:00 Peter Maydell [this message]
2016-05-20 18:00 ` [Qemu-devel] [PATCH 1/2] linux-user: Handle msgrcv error case correctly Peter Maydell
2016-05-20 18:00 ` [Qemu-devel] [PATCH 2/2] linux-user: Use g_try_malloc() in do_msgrcv() 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=1463767257-20466-1-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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).