Merge ~paelzer/ubuntu/+source/qemu:lp-1878973-qga-assert-EOAN into ubuntu/+source/qemu:ubuntu/eoan-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: 77fd1b3fa19b373fdb3039343eeb36ac92ebfd29
Merge reported by: Christian Ehrhardt 
Merged at revision: 77fd1b3fa19b373fdb3039343eeb36ac92ebfd29
Proposed branch: ~paelzer/ubuntu/+source/qemu:lp-1878973-qga-assert-EOAN
Merge into: ubuntu/+source/qemu:ubuntu/eoan-devel
Diff against target: 71 lines (+49/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/series (+1/-0)
debian/patches/ubuntu/lp-1878973-fix-assert-regression.patch (+41/-0)
Reviewer Review Type Date Requested Status
Rafael David Tinoco (community) Approve
Canonical Server Pending
Canonical Server packageset reviewers Pending
Review via email: mp+385878@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Quick approval for a simple fix. Not testing install/upgrade paths.

+1

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks, tagged and uploaded to -unapproved

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

accepted into -proposed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 4450378..a51cec1 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+qemu (1:4.0+dfsg-0ubuntu9.8) eoan; urgency=medium
7+
8+ * debian/patches/ubuntu/lp-1878973-*: fix assert in qemu-guest-agent that
9+ crashes it on shutdown (LP: #1878973)
10+
11+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 02 Jun 2020 10:42:49 +0200
12+
13 qemu (1:4.0+dfsg-0ubuntu9.7) eoan; urgency=medium
14
15 * d/p/ubuntu/lp-1805256*: Fixes for QEMU on aarch64 ARM hosts
16diff --git a/debian/patches/series b/debian/patches/series
17index 43a5b90..0ab2ff2 100644
18--- a/debian/patches/series
19+++ b/debian/patches/series
20@@ -54,3 +54,4 @@ ubuntu/CVE-2020-10702.patch
21 ubuntu/CVE-2020-1983.patch
22 ubuntu/lp-1805256-async_use_explicit_mem_barriers.patch
23 ubuntu/lp-1805256-aio-wait_delegate_poll_aioctx_bql.patch
24+ubuntu/lp-1878973-fix-assert-regression.patch
25diff --git a/debian/patches/ubuntu/lp-1878973-fix-assert-regression.patch b/debian/patches/ubuntu/lp-1878973-fix-assert-regression.patch
26new file mode 100644
27index 0000000..4d72c0b
28--- /dev/null
29+++ b/debian/patches/ubuntu/lp-1878973-fix-assert-regression.patch
30@@ -0,0 +1,41 @@
31+qga: fix assert regression on guest-shutdown
32+From: Marc-André Lureau
33+Subject: [PATCH] qga: fix assert regression on guest-shutdown
34+Date: Thu, 4 Jun 2020 11:44:25 +0200
35+
36+Since commit 781f2b3d1e ("qga: process_event() simplification"),
37+send_response() is called unconditionally, but will assert when "rsp" is
38+NULL. This may happen with QCO_NO_SUCCESS_RESP commands, such as
39+"guest-shutdown".
40+
41+Fixes: 781f2b3d1e5ef389b44016a897fd55e7a780bf35
42+Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
43+Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
44+Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
45+
46+Origin: upstream, https://lists.nongnu.org/archive/html/qemu-devel/2020-06/msg00962.html
47+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1878973
48+Last-Update: 2020-06-09
49+---
50+ qga/main.c | 6 +++++-
51+ 1 file changed, 5 insertions(+), 1 deletion(-)
52+
53+diff --git a/qga/main.c b/qga/main.c
54+index f0e454f28d3..3febf3b0fdf 100644
55+--- a/qga/main.c
56++++ b/qga/main.c
57+@@ -531,7 +531,11 @@ static int send_response(GAState *s, const QDict *rsp)
58+ QString *payload_qstr, *response_qstr;
59+ GIOStatus status;
60+
61+- g_assert(rsp && s->channel);
62++ g_assert(s->channel);
63++
64++ if (!rsp) {
65++ return 0;
66++ }
67+
68+ payload_qstr = qobject_to_json(QOBJECT(rsp));
69+ if (!payload_qstr) {
70+--
71+2.26.2.561.g07d8ea56f2

Subscribers

People subscribed via source and target branches