diff --git a/config.yaml b/config.yaml index 1b9643c..28041b9 100644 --- a/config.yaml +++ b/config.yaml @@ -74,6 +74,8 @@ patches: - zone-amdgpu - patch: 0001-x86-CPU-AMD-avoid-printing-reset-reasons-on-Xen-domU.patch lower: '6.16' +- patch: 0001-9p-xen-mark-9p-transport-device-as-closing-when-remo.patch + lower: '6.1' images: - target: kernelsrc name: kernel-src diff --git a/patches/0001-9p-xen-mark-9p-transport-device-as-closing-when-remo.patch b/patches/0001-9p-xen-mark-9p-transport-device-as-closing-when-remo.patch new file mode 100644 index 0000000..f8870f4 --- /dev/null +++ b/patches/0001-9p-xen-mark-9p-transport-device-as-closing-when-remo.patch @@ -0,0 +1,35 @@ +From 8e7d925b756b09c7c52b1b06a3c3c996d9127d64 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill +Date: Mon, 8 Dec 2025 11:40:56 -0800 +Subject: [PATCH] 9p/xen: mark 9p transport device as closing when removing it + +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 +Cc: Stefano Stabellini +Fixes: 71ebd71921e45 ("xen/9pfs: connect to the backend") +Signed-off-by: Ariadne Conill +Signed-off-by: Alex Zenla +--- + 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 +