diff options
author | Alex Zenla <alex@edera.dev> | 2024-11-19 21:16:33 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-05 10:59:42 +0100 |
commit | c9a1f766ab1c154c4ef9f2211285f5021c3bfd73 (patch) | |
tree | 9741fd522ca2d82df84d9873dc6ee54fa0dda008 | |
parent | 3947b10ee8cdb1f9cac96e4cc294d641c7e67743 (diff) |
9p/xen: fix init sequence
[ 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 <alex@edera.dev>
Signed-off-by: Alexander Merritt <alexander@edera.dev>
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Reviewed-by: Juergen Gross <jgross@suse.com>
Message-ID: <20241119211633.38321-1-alexander@edera.dev>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | net/9p/trans_xen.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c index c87146a49636..77d7e6c3d7a2 100644 --- a/net/9p/trans_xen.c +++ b/net/9p/trans_xen.c @@ -480,6 +480,7 @@ static int xen_9pfs_front_init(struct xenbus_device *dev) goto error; } + xenbus_switch_state(dev, XenbusStateInitialised); return 0; error_xenbus: @@ -527,8 +528,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: |