From nobody Mon Feb 9 08:19:14 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; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1610751203; cv=none; d=zohomail.com; s=zohoarc; b=RKa2acuDZ2RZWE25v9XmXID68euhTGhn6cUpnS0BUBGdB2CZIjTRzNZEYXEgMzAa+Jfiul4e/vzYl8NNoKhLmJvWg+jAnL5NQ4ZMyWzCtDgaufQPRYKNmiXu/Ri/LkPq7moFisDKVX9WK/QTQn7esoi3UMLCJXpAMnpZb8V9Cr4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610751203; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=t9BYr/GOUJ4zhxBVjQ9kj50YpG+EWP4gkDeD7W5LLp4=; b=nXMmyYRuoiYHbJXOuypH2MrN5xqodVOXMZNleoP8IR24RLV1AAV/c8cv5Egy7UrfSVH3EcALtVBghQLCFMx2AWMFFi4ZWJUdaFm1DchEVsE3ZG/N5X3jHDTw1bNTcsMqBNMvnuhnJcPeUYKDEkc4Fv7em7mtsV4VK5zYRdXdiqg= 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; dmarc=pass header.from= (p=reject dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1610751203306939.242674691854; Fri, 15 Jan 2021 14:53:23 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.68741.123200 (Exim 4.92) (envelope-from ) id 1l0Xxo-0002J1-Nz; Fri, 15 Jan 2021 22:53:04 +0000 Received: by outflank-mailman (output) from mailman id 68741.123200; Fri, 15 Jan 2021 22:53:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l0Xxo-0002Io-JN; Fri, 15 Jan 2021 22:53:04 +0000 Received: by outflank-mailman (input) for mailman id 68741; Fri, 15 Jan 2021 22:53:03 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l0Xxm-0001Wj-W2 for xen-devel@lists.xenproject.org; Fri, 15 Jan 2021 22:53:03 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 880bf2fc-3093-4f9a-a717-2ccf85eaf5af; Fri, 15 Jan 2021 22:52:34 +0000 (UTC) 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" X-Inumbo-ID: 880bf2fc-3093-4f9a-a717-2ccf85eaf5af DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1610751154; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=f2+2EkVgRSKwnJg04mCaQfo6Y0AeER0uEpuI0RzaCok=; b=iL948vxEipj/eqMhk7+3/rU+EnlL26wqVZVlWPMI6+iDvA7fpblkCYSh bRDFJlGHvZ8E13vwTGLFO5vvOMJq7FzR4YTOXki9tg7pAEyDr7EDAiGAy KfTpvwN1TzqHu6tuHvLbYy/m69B5BiAtt9gOtRi1pBuWr9dLs25lYhAwC c=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: v+h0zdLX7VPiugjB/jYhRxC8UwuubOWqPqzGEsksAgLzCC/Rn75Wan3af3zyCWny0Fdu7dCw4f 4vlEDqsqF4qdUCSqtBwrh0GfvWwNo6QO66WhL2q9klC4o0DjYF1OJfaETC2r89EgSrMxQobTnq 9IlY3KJm534NjMuAGG6D9ZnUe9W/Q92gsckucHjNWNJRKCrz0oHKC38FseKa9BY1H4uVRLfPQo 7AZ5EJ8bjx1uY3UEJS785XbVAbgYvpnBhQcUT3cbeAVLrFp3sEESG+1Lkb/gE0ycNOEceeLsSr GyU= X-SBRS: 5.1 X-MesageID: 35263548 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.79,350,1602561600"; d="scan'208";a="35263548" From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= To: CC: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= , "Christian Lindig" , David Scott , "Ian Jackson" , Wei Liu Subject: [PATCH v1 4/4] tools/ocaml/xenstored: mkdir conflicts were sometimes missed Date: Fri, 15 Jan 2021 22:29:09 +0000 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Due to how set_write_lowpath was used here it didn't detect create/delete conflicts. When we create an entry we must mark our parent as modified (this is what creating a new node via write does). Otherwise we can have 2 transactions one creating, and another deleting a node both succeeding depending on timing. Or one transaction reading an entry, concluding it doesn't exist, do some other work based on that information and successfully commit even if another transaction creates the node via mkdir meanwhile. Signed-off-by: Edwin T=C3=B6r=C3=B6k --- tools/ocaml/xenstored/transaction.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ocaml/xenstored/transaction.ml b/tools/ocaml/xenstored/t= ransaction.ml index 4ee77b6e14..0466b04ae3 100644 --- a/tools/ocaml/xenstored/transaction.ml +++ b/tools/ocaml/xenstored/transaction.ml @@ -172,7 +172,7 @@ let write t perm path value =3D =20 let mkdir ?(with_watch=3Dtrue) t perm path =3D Store.mkdir t.store perm path; - set_write_lowpath t path; + set_write_lowpath t (Store.Path.get_parent path); if with_watch then add_wop t Xenbus.Xb.Op.Mkdir path =20 --=20 2.29.2