From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E1F6223E62; Thu, 12 Dec 2024 16:18:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734020333; cv=none; b=EBoCp5GZqP7hWA60/v9IcjFAJBxqIQG8nCuBCe1IbgUplTUmFYGQO320OoIOV+dJpscKD1zFvyESKAoHp70d+0f0UwNuSbSwCnKDpz5OgRcBpIu073slWSc9YrlhI9wIIeplpqP24RvEdp1DCY3kBmRtdq3U2PpMIaqKlng+H/4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734020333; c=relaxed/simple; bh=4as18MFMzWBgKQvaba+uinMTNQB9RVTzoTNKsXs3xfs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZeuQvvkMJ2F3qx4hLBd642hxEr+Rozu3Ywpb+b2I4r3x/5X6LEAMjO1sauD9fg/nPZXFrmbNq5C6YRJqIq5TBhPWlRd2iI7U5MVsu6OUiApgmRaCJbJanNo03x6Oux0A7aNPC2/OO6T/plJA6uIAoRszSFAxNvbw0squudf/TdE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=N8mJNyx7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="N8mJNyx7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72E14C4CECE; Thu, 12 Dec 2024 16:18:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1734020333; bh=4as18MFMzWBgKQvaba+uinMTNQB9RVTzoTNKsXs3xfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N8mJNyx7JChcJ2yGM7BeY1LmasQiecFJmGh4r4zdznJAw+R4anMrzKfAoTJI/qVE5 vRFQIe210UsfrWO+5LeULNJzkmFWswJ2eVxoKssCuQndjhI1CE3zk0nU/jD17Mqltf hag9cXamAkMGSQmiXbgiP5mtZLw5FFK3ynVXkUBw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alex Zenla , Alexander Merritt , Ariadne Conill , Juergen Gross , Dominique Martinet , Sasha Levin Subject: [PATCH 6.1 440/772] 9p/xen: fix init sequence Date: Thu, 12 Dec 2024 15:56:25 +0100 Message-ID: <20241212144408.107039504@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241212144349.797589255@linuxfoundation.org> References: <20241212144349.797589255@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alex Zenla [ Upstream commit 7ef3ae82a6ebbf4750967d1ce43bcdb7e44ff74b ] Large amount of mount hangs observed during hotplugging of 9pfs devices. The 9pfs Xen driver attempts to initialize itself more than once, causing the frontend and backend to disagree: the backend listens on a channel that the frontend does not send on, resulting in stalled processing. Only allow initialization of 9p frontend once. Fixes: c15fe55d14b3b ("9p/xen: fix connection sequence") Signed-off-by: Alex Zenla Signed-off-by: Alexander Merritt Signed-off-by: Ariadne Conill Reviewed-by: Juergen Gross Message-ID: <20241119211633.38321-1-alexander@edera.dev> Signed-off-by: Dominique Martinet Signed-off-by: Sasha Levin --- net/9p/trans_xen.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c index 68027e4fb4216..f95803736ced0 100644 --- a/net/9p/trans_xen.c +++ b/net/9p/trans_xen.c @@ -465,6 +465,7 @@ static int xen_9pfs_front_init(struct xenbus_device *dev) goto error; } + xenbus_switch_state(dev, XenbusStateInitialised); return 0; error_xenbus: @@ -512,8 +513,10 @@ static void xen_9pfs_front_changed(struct xenbus_device *dev, break; case XenbusStateInitWait: - if (!xen_9pfs_front_init(dev)) - xenbus_switch_state(dev, XenbusStateInitialised); + if (dev->state != XenbusStateInitialising) + break; + + xen_9pfs_front_init(dev); break; case XenbusStateConnected: -- 2.43.0