Skip to content

Commit 45c4225

Browse files
authored
chore: add 9p disconnection fix, sent upstream (#136)
1 parent 2d459b5 commit 45c4225

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ patches:
7474
- zone-amdgpu
7575
- patch: 0001-x86-CPU-AMD-avoid-printing-reset-reasons-on-Xen-domU.patch
7676
lower: '6.16'
77+
- patch: 0001-9p-xen-mark-9p-transport-device-as-closing-when-remo.patch
78+
lower: '6.1'
7779
images:
7880
- target: kernelsrc
7981
name: kernel-src
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From 8e7d925b756b09c7c52b1b06a3c3c996d9127d64 Mon Sep 17 00:00:00 2001
2+
From: Ariadne Conill <[email protected]>
3+
Date: Mon, 8 Dec 2025 11:40:56 -0800
4+
Subject: [PATCH] 9p/xen: mark 9p transport device as closing when removing it
5+
6+
We need to do this so that we can signal to the other end that the
7+
device is being removed, so that it will release its claim on the
8+
underlying memory allocation. Otherwise releasing the grant-table
9+
entries is deferred resulting in a kernel oops since the pages have
10+
already been freed.
11+
12+
Cc: Juergen Gross <[email protected]>
13+
Cc: Stefano Stabellini <[email protected]>
14+
Fixes: 71ebd71921e45 ("xen/9pfs: connect to the backend")
15+
Signed-off-by: Ariadne Conill <[email protected]>
16+
Signed-off-by: Alex Zenla <[email protected]>
17+
---
18+
net/9p/trans_xen.c | 1 +
19+
1 file changed, 1 insertion(+)
20+
21+
diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c
22+
index b9ff69c7522a..cde283c42dc6 100644
23+
--- a/net/9p/trans_xen.c
24+
+++ b/net/9p/trans_xen.c
25+
@@ -312,6 +312,7 @@ static void xen_9pfs_front_remove(struct xenbus_device *dev)
26+
{
27+
struct xen_9pfs_front_priv *priv = dev_get_drvdata(&dev->dev);
28+
29+
+ xenbus_switch_state(dev, XenbusStateClosing);
30+
dev_set_drvdata(&dev->dev, NULL);
31+
xen_9pfs_front_free(priv);
32+
}
33+
--
34+
2.52.0
35+

0 commit comments

Comments
 (0)