Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9a1f766 authored by Alex Zenla's avatar Alex Zenla Committed by Greg Kroah-Hartman
Browse files

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: default avatarAlex Zenla <alex@edera.dev>
Signed-off-by: default avatarAlexander Merritt <alexander@edera.dev>
Signed-off-by: default avatarAriadne Conill <ariadne@ariadne.space>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Message-ID: <20241119211633.38321-1-alexander@edera.dev>
Signed-off-by: default avatarDominique Martinet <asmadeus@codewreck.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3947b10e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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: