]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:26:36 +0000 (14:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:26:36 +0000 (14:26 +0200)
added patches:
xen-blkback-don-t-leak-persistent-grants-from.patch

queue-4.4/series
queue-4.4/xen-blkback-don-t-leak-persistent-grants-from.patch [new file with mode: 0644]

index a385ef331288730b017a0af5c8fce5829a9992df..abbd7d875d78e96eb797766bde4febde60782e49 100644 (file)
@@ -31,3 +31,4 @@ perf-auxtrace-fix-auxtrace-queue-conflict.patch
 can-dev-move-device-back-to-init-netns-on-owning-netns-delete.patch
 net-sched-validate-stab-values.patch
 mac80211-fix-double-free-in-ibss_leave.patch
+xen-blkback-don-t-leak-persistent-grants-from.patch
diff --git a/queue-4.4/xen-blkback-don-t-leak-persistent-grants-from.patch b/queue-4.4/xen-blkback-don-t-leak-persistent-grants-from.patch
new file mode 100644 (file)
index 0000000..66c9eb9
--- /dev/null
@@ -0,0 +1,36 @@
+From b7649f4e1d73402aaf46cb8260df6161b101b593 Mon Sep 17 00:00:00 2001
+From: Jan Beulich <jbeulich@suse.com>
+Date: Fri, 26 Mar 2021 16:28:57 +0100
+Subject: xen-blkback: don't leak persistent grants from xen_blkbk_map()
+
+From: Jan Beulich <jbeulich@suse.com>
+
+commit a846738f8c3788d846ed1f587270d2f2e3d32432 upstream.
+
+The fix for XSA-365 zapped too many of the ->persistent_gnt[] entries.
+Ones successfully obtained should not be overwritten, but instead left
+for xen_blkbk_unmap_prepare() to pick up and put.
+
+This is XSA-371.
+
+Signed-off-by: Jan Beulich <jbeulich@suse.com>
+Cc: stable@vger.kernel.org
+Reviewed-by: Juergen Gross <jgross@suse.com>
+Reviewed-by: Wei Liu <wl@xen.org>
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/block/xen-blkback/blkback.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/block/xen-blkback/blkback.c
++++ b/drivers/block/xen-blkback/blkback.c
+@@ -919,7 +919,7 @@ next:
+ out:
+       for (i = last_map; i < num; i++) {
+               /* Don't zap current batch's valid persistent grants. */
+-              if(i >= last_map + segs_to_map)
++              if(i >= map_until)
+                       pages[i]->persistent_gnt = NULL;
+               pages[i]->handle = BLKBACK_INVALID_HANDLE;
+       }