qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [PATCH] qga: fix assert regression on guest-shutdown
Date: Mon, 15 Jun 2020 09:24:02 +0200	[thread overview]
Message-ID: <CAATJJ0KrXxGeZ2zo7eejGFh_ika-CTpBkhu+M3nqR66o8k5CRQ@mail.gmail.com> (raw)
In-Reply-To: <CAATJJ0+zTJBqNPV8e4A827Z-Hf0is1ocBFiZ3TmRb_2PV2HqQg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1889 bytes --]

On Tue, Jun 9, 2020 at 1:15 PM Christian Ehrhardt <
christian.ehrhardt@canonical.com> wrote:

>
>
> On Thu, Jun 4, 2020 at 3:43 PM Christian Ehrhardt <
> christian.ehrhardt@canonical.com> wrote:
>
>>
>>
>> On Thu, Jun 4, 2020 at 11:46 AM Marc-André Lureau <
>> marcandre.lureau@redhat.com> wrote:
>>
>>> Since commit 781f2b3d1e ("qga: process_event() simplification"),
>>> send_response() is called unconditionally, but will assert when "rsp" is
>>> NULL. This may happen with QCO_NO_SUCCESS_RESP commands, such as
>>> "guest-shutdown".
>>>
>>> Fixes: 781f2b3d1e5ef389b44016a897fd55e7a780bf35
>>> Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
>>> Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
>>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>>> ---
>>>  qga/main.c | 6 +++++-
>>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/qga/main.c b/qga/main.c
>>> index f0e454f28d3..3febf3b0fdf 100644
>>> --- a/qga/main.c
>>> +++ b/qga/main.c
>>> @@ -531,7 +531,11 @@ static int send_response(GAState *s, const QDict
>>> *rsp)
>>>      QString *payload_qstr, *response_qstr;
>>>      GIOStatus status;
>>>
>>> -    g_assert(rsp && s->channel);
>>> +    g_assert(s->channel);
>>> +
>>> +    if (!rsp) {
>>> +        return 0;
>>> +    }
>>>
>>>
>>>
>> Thanks Marc-André,
>> LGTM and should fix the issues I was seeing.
>>
>> Reviewed-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
>>
>
> In the meantime I also got to test this against the initially reported
> issue, LGTM as well (ran as no-change backport onto 4.2).
>
> Tested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
>

This LGTM with 2*reviews 1*tested and 11 days on the list without any
negative feedback.
I just wanted to re-check if there is anything else left for this to be
committed?

[-- Attachment #2: Type: text/html, Size: 3348 bytes --]

      reply	other threads:[~2020-06-15  7:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04  9:44 [PATCH] qga: fix assert regression on guest-shutdown Marc-André Lureau
2020-06-04 10:09 ` Philippe Mathieu-Daudé
2020-06-04 13:43 ` Christian Ehrhardt
2020-06-09 11:15   ` Christian Ehrhardt
2020-06-15  7:24     ` Christian Ehrhardt [this message]

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=CAATJJ0KrXxGeZ2zo7eejGFh_ika-CTpBkhu+M3nqR66o8k5CRQ@mail.gmail.com \
    --to=christian.ehrhardt@canonical.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.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).