From: Julien Grall Date: Thu, 1 Jul 2021 14:03:07 +0000 (+0100) Subject: tools/xenstored: Stash the correct request in lu_status->in X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~365 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=09e2cd69956fe529bfc3d53dae477b44eff217d1;p=xen.git tools/xenstored: Stash the correct request in lu_status->in When Live-Updating with some load, Xenstored may hit the assert req->in == lu_status->in in do_lu_start(). This is happening because the request is stashed when Live-Update begins. This happens in a different request (see call lu_begin() when select the new binary) from the one performing Live-Update. To avoid the problem, stash the request in lu_start(). Fixes: 65f19ed62aa1 ("tools/xenstore: Don't assume conn->in points to the LU request") Reported-by: Michael Kurth Signed-off-by: Julien Grall Reviewed-by: luca.fancellu@arm.com Reviewed-by: Juergen Gross --- diff --git a/tools/xenstore/xenstored_control.c b/tools/xenstore/xenstored_control.c index a1b1bd5a71..ff9863c17f 100644 --- a/tools/xenstore/xenstored_control.c +++ b/tools/xenstore/xenstored_control.c @@ -103,7 +103,6 @@ static const char *lu_begin(struct connection *conn) if (!lu_status) return "Allocation failure."; lu_status->conn = conn; - lu_status->in = conn->in; talloc_set_destructor(lu_status, lu_destroy); return NULL; @@ -757,6 +756,7 @@ static const char *lu_start(const void *ctx, struct connection *conn, lu_status->force = force; lu_status->timeout = to; lu_status->started_at = time(NULL); + lu_status->in = conn->in; errno = delay_request(conn, conn->in, do_lu_start, conn, false);