From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78857F01832 for ; Fri, 6 Mar 2026 13:32:27 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vyVHp-00046N-Ut; Fri, 06 Mar 2026 08:32:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vyVHo-000465-6Y for qemu-devel@nongnu.org; Fri, 06 Mar 2026 08:32:12 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vyVHm-0004Vk-AH for qemu-devel@nongnu.org; Fri, 06 Mar 2026 08:32:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772803928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QaBA0UAXjDmpKbjNHbFfHG/mQKe5wtlX+MmXGdnItSU=; b=eLj7BTkKo0MVUpaETLiEFAEbUN2M6LcHh3uVOmr613VrrHmqgxobyK/R3NDXbNXe81H3p9 a/sQJQ5plZzlqwSaIKKkwVCSBlzjI6GHxXBmeLp9WRo2tNSSDzEMd/UbDZstinCZDdqpPk Tqpy1dqDSI8gJbsoVacedsrgDIOoGE8= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-483-zXO_CHVrNqKJso5e5HVQrw-1; Fri, 06 Mar 2026 08:32:07 -0500 X-MC-Unique: zXO_CHVrNqKJso5e5HVQrw-1 X-Mimecast-MFC-AGG-ID: zXO_CHVrNqKJso5e5HVQrw_1772803926 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3F4C11956094; Fri, 6 Mar 2026 13:32:05 +0000 (UTC) Received: from redhat.com (unknown [10.45.224.210]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EAEDE3003E9F; Fri, 6 Mar 2026 13:32:02 +0000 (UTC) Date: Fri, 6 Mar 2026 14:32:00 +0100 From: Kevin Wolf To: Hanna Czenczek Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, Peter Lieven , qemu-stable@nongnu.org Subject: Re: [PATCH] block/nfs: Do not enter coroutine from CB Message-ID: References: <20260102153246.154207-1-hreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260102153246.154207-1-hreitz@redhat.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass client-ip=170.10.129.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -9 X-Spam_score: -1.0 X-Spam_bar: - X-Spam_report: (-1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.411, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.679, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Am 02.01.2026 um 16:32 hat Hanna Czenczek geschrieben: > The reasoning I gave for why it would be safe to call aio_co_wake() > despite holding the mutex was wrong: It is true that the current request > will not re-acquire the mutex, but a subsequent request in the same > coroutine can. Because the mutex is a non-coroutine mutex, this will > result in a deadlock. > > Therefore, we must either not enter the coroutine here (only scheduling > it), or release the mutex around aio_co_wake(). I opt for the former, > as it is the behavior prior to the offending commit, and so seems safe > to do. > > Fixes: deb35c129b859b9bec70fd42f856a0b7c1dc6e61 > ("nfs: Run co BH CB in the coroutine’s AioContext") > Buglink: https://gitlab.com/qemu-project/qemu/-/issues/2622#note_2965097035 > Cc: qemu-stable@nongnu.org > Signed-off-by: Hanna Czenczek Thanks, applied to the block branch. Kevin