From nobody Wed Feb 11 05:13:37 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1623854632; cv=none; d=zohomail.com; s=zohoarc; b=WH1cogDC/0XmsE4BQqedMzJ0y6Rq/G+MPnKxYzcrj26oT5tY2ycaAGMxTp81emlb7zeWYzaaF8aX67RxemW7li5/bORrItDYNhONMnFH3XHz1VuU+mHSdAeJ4xB+3x8OODO6oecbKBb6i0iy3qxY9hRvghaSPmDlk8Anb7wAgHY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623854632; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=ntUe4oRZZR/IFXSXsYlm7XZxb7Y2yIuX7QXLhkAF0hE=; b=jdDfR62yx16ArYX3XdXjGbxhce/o1fENjO4YDIZMz3/yF42y5ZSxGCpkCBwl0aWlWt634TiDLlfUN1abePkA1Pk7/Bh3kHdMD+RI0rVzMjjjl0gmZJslf2st3vq0wQd8BVrOxTA2AQtVnyb7m9w3KZwNAhhQqtcq8GlfIk2tJ/I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1623854632528845.9837917921143; Wed, 16 Jun 2021 07:43:52 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.143286.264190 (Exim 4.92) (envelope-from ) id 1ltWlY-00072v-Hf; Wed, 16 Jun 2021 14:43:40 +0000 Received: by outflank-mailman (output) from mailman id 143286.264190; Wed, 16 Jun 2021 14:43:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ltWlY-00071R-9W; Wed, 16 Jun 2021 14:43:40 +0000 Received: by outflank-mailman (input) for mailman id 143286; Wed, 16 Jun 2021 14:43:38 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ltWlW-0006jG-Lk for xen-devel@lists.xenproject.org; Wed, 16 Jun 2021 14:43:38 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ltWlV-0004EM-II; Wed, 16 Jun 2021 14:43:37 +0000 Received: from 54-240-197-235.amazon.com ([54.240.197.235] helo=ufe34d9ed68d054.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltWlV-0007D0-9n; Wed, 16 Jun 2021 14:43:37 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=ntUe4oRZZR/IFXSXsYlm7XZxb7Y2yIuX7QXLhkAF0hE=; b=IDKUeY/nN0OTprDr81ImN5AMo ppaCwTSJm8FAjz1yN1Oo8Xho+UoCUB5Hxqcr0Ow7Vl4VFyAQtyAQaf3r0w2i48mZ+1l/+2WnTN8pe EfoouNnL+UYE25y6EOdvJJKnh+KpSuVQbHnNXJUD3LCaXFXr51N0x84BnFJLFEGA0ELOA=; From: Julien Grall To: xen-devel@lists.xenproject.org Cc: raphning@amazon.co.uk, doebel@amazon.de, Julien Grall , Ian Jackson , Wei Liu , Juergen Gross , Julien Grall Subject: [PATCH 07/10] tools/xenstored: delay_request: don't assume conn->in == in Date: Wed, 16 Jun 2021 15:43:21 +0100 Message-Id: <20210616144324.31652-8-julien@xen.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210616144324.31652-1-julien@xen.org> References: <20210616144324.31652-1-julien@xen.org> X-ZohoMail-DKIM: pass (identity @xen.org) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Julien Grall delay_request() is currently assuming that the request delayed is always conn->in. This is currently correct, but it is a call for a latent bug as the function allows the caller to specify any request. To prevent any future surprise, check if the request delayed is the current one. Fixes: c5ca1404b4 ("tools/xenstore: add support for delaying execution of a= xenstore request") Signed-off-by: Julien Grall Reviewed-by: Juergen Gross Reviewed-by: Luca Fancellu --- tools/xenstore/xenstored_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_cor= e.c index 2e5760fe4599..a5084a5b173d 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -306,7 +306,9 @@ int delay_request(struct connection *conn, struct buffe= red_data *in, delayed_requests++; list_add(&req->list, &conn->delayed); =20 - conn->in =3D NULL; + /* Unlink the request from conn if this is the current one */ + if (conn->in =3D=3D in) + conn->in =3D NULL; =20 return 0; } --=20 2.17.1