public inbox for v9fs@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] 9p/xen: mark 9p transport device as closing when removing it
@ 2025-12-08 19:51 Ariadne Conill
  2025-12-09 10:41 ` Demi Marie Obenour
  2025-12-09 20:45 ` Marek Marczykowski-Górecki
  0 siblings, 2 replies; 8+ messages in thread
From: Ariadne Conill @ 2025-12-08 19:51 UTC (permalink / raw)
  To: v9fs
  Cc: xen-devel, asmadeus, linux_oss, lucho, ericvh, Ariadne Conill,
	Juergen Gross, Stefano Stabellini, Alex Zenla

We need to do this so that we can signal to the other end that the
device is being removed, so that it will release its claim on the
underlying memory allocation.  Otherwise releasing the grant-table
entries is deferred resulting in a kernel oops since the pages have
already been freed.

Cc: Juergen Gross <jgross@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Fixes: 71ebd71921e45 ("xen/9pfs: connect to the backend")
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Signed-off-by: Alex Zenla <alex@edera.dev>
---
 net/9p/trans_xen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c
index b9ff69c7522a..cde283c42dc6 100644
--- a/net/9p/trans_xen.c
+++ b/net/9p/trans_xen.c
@@ -312,6 +312,7 @@ static void xen_9pfs_front_remove(struct xenbus_device *dev)
 {
 	struct xen_9pfs_front_priv *priv = dev_get_drvdata(&dev->dev);
 
+	xenbus_switch_state(dev, XenbusStateClosing);
 	dev_set_drvdata(&dev->dev, NULL);
 	xen_9pfs_front_free(priv);
 }
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-12-20  2:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-08 19:51 [PATCH] 9p/xen: mark 9p transport device as closing when removing it Ariadne Conill
2025-12-09 10:41 ` Demi Marie Obenour
2025-12-09 17:09   ` Ariadne Conill
2025-12-09 17:12     ` Demi Marie Obenour
2025-12-09 17:18       ` Ariadne Conill
2025-12-18  8:14   ` Jürgen Groß
2025-12-20  2:02     ` Demi Marie Obenour
2025-12-09 20:45 ` Marek Marczykowski-Górecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox