Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 986E7C433F5 for ; Tue, 12 Oct 2021 07:11:01 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3DFC46108F for ; Tue, 12 Oct 2021 07:11:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3DFC46108F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.206775.362423 (Exim 4.92) (envelope-from ) id 1maBvq-0005Ij-Uk; Tue, 12 Oct 2021 07:10:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 206775.362423; Tue, 12 Oct 2021 07:10:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1maBvq-0005Ic-RX; Tue, 12 Oct 2021 07:10:38 +0000 Received: by outflank-mailman (input) for mailman id 206775; Tue, 12 Oct 2021 06:55: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 1maBgl-0003Y3-PA for xen-devel@lists.xen.org; Tue, 12 Oct 2021 06:55:03 +0000 Received: from mail-pj1-x102c.google.com (unknown [2607:f8b0:4864:20::102c]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 12b90e37-6251-44b2-956f-cdc3ac6b83cf; Tue, 12 Oct 2021 06:55:02 +0000 (UTC) Received: by mail-pj1-x102c.google.com with SMTP id oa4so14279052pjb.2 for ; Mon, 11 Oct 2021 23:55:02 -0700 (PDT) Received: from [30.135.82.253] ([23.98.35.75]) by smtp.gmail.com with ESMTPSA id r5sm1517362pjd.13.2021.10.11.23.55.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Oct 2021 23:55:01 -0700 (PDT) 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: 12b90e37-6251-44b2-956f-cdc3ac6b83cf DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:date:subject:from:to:message-id:thread-topic :mime-version; bh=R/vIZ5wUWsewvsCHSMp/LZJQsRQ5v5ylj55ne08rR6Q=; b=TNUENUnXsW0uSysSIqkqkFDEu8cl7aANF/3cEfW17wjWDoYS5IBjB2m0HQIRNUVXjn a8QD4gyqCNYxu55hNjB4SEFQKZJvjWPfUQge9Vd2qUbt7WnSLujlzcwi50Ee3tjBuA4g Giokn+qA13rNbuvsKyNeSRwTGr2z4VwLYJNKGyGux97Rxyv32NnX2iwER02O7JexmnMc 9MyL20AOMGE1orpsLyADng/B9Gty/IoWgpZuMOXXKHBiVRx2N70nzuKI0M9pfy9FZebV rEumN2smv4iEz4nh0N3Zp6Y/jlDqi0etywvCcZSH6rD7x6ULEMPOMigcy8Kqy6Fr/Ujw JnGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:user-agent:date:subject:from:to:message-id :thread-topic:mime-version; bh=R/vIZ5wUWsewvsCHSMp/LZJQsRQ5v5ylj55ne08rR6Q=; b=296yA5DBKy0iHo4x5leig1ShVzzdy9YvjNotsa+xAgRmNGmZ0Vfy6qGZ1KABDD8NZC T9wXMsUliTy9nx2rVrLKaQo5ICx+uj8M4GjcZNVlw+s/nO+ZxDj9msip6WzTX5sAQmWs LRmK49ylWD8Yk6htFiMCV9xXT0LSTvBIi7LaAEWJ4gsJyWDMwwN7mgDwh0Sb2jfotmjl /P3gZgKsAVl5HxdNCTtfSRey3C7m90q5/eIlFgC67ad1IBwk9NBtwqOIeZ1e9noWkF6x 7UrcnWlAkqbzr0WisbZiRX/KvGWfdDcrWNS/4MFdH+tfjpYMDHDtrFmvmKqYVp6WiEVK gxhg== X-Gm-Message-State: AOAM533gGhzXqIIIUgk1230v0BBtXI29f/4HU63OGKgvJJ6G9mT1Apyo lmeOoo82to9IGyLt8f957EcnQktQ/vI= X-Google-Smtp-Source: ABdhPJzx0x4B57V5RuX/vFxRy1ULjPQX3pzLyOJiKPcgIDKIKf6LZDli68ooKofdWe3bFHs0WocvEA== X-Received: by 2002:a17:90a:df91:: with SMTP id p17mr4041156pjv.185.1634021701612; Mon, 11 Oct 2021 23:55:01 -0700 (PDT) User-Agent: Microsoft-MacOutlook/16.53.21091200 Date: Tue, 12 Oct 2021 14:54:57 +0800 Subject: [BUG] improper locking due to the unreleased lock From: Ryan Cai To: , Message-ID: <747C0632-F341-4716-8B4A-10428A39A07D@gmail.com> Thread-Topic: [BUG] improper locking due to the unreleased lock Mime-version: 1.0 Content-type: multipart/alternative; boundary="B_3716895300_1494279762" > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3716895300_1494279762 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable Dear maintainers for Xen Project, =20 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 I am writing you to report a bug due to the unrele= ased lock. The impact could be deadlock or memory consumption. In the functi= on of read_watch_internal, the mutex lock h->watch_mutex (Line901) is not re= leased correctly when read_message(h,nonblocking)=3D=3D -1(Line 923). Looking fo= rward to your feedback. Thank for checking. =20 =20 Locations, https://github.com/xen-project/xen/blob/master/tools/libs/store/= xs.c#L902-L924 =20 Best, Ryan Cai =20 --B_3716895300_1494279762 Content-type: text/html; charset="UTF-8" Content-transfer-encoding: quoted-printable

Dear maintainers for Xen Project,

&n= bsp;

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 I am writing you to report a bug due to the u= nreleased lock. The impact could be deadlock or memory consumption. In the f= unction of read_watch_internal, the mutex lock h->watch_mutex (Line901) is not released correctly when read_message(h,nonblocking)=3D=3D -1(Line 923). Looking forward to your feedback. Thank for= checking.

 

&nb= sp;

Locations, https://github.com/xen-project/xen/blob/master/tools/libs/st= ore/xs.c#L902-L924

 

Best,

Ryan Cai

 

--B_3716895300_1494279762--