This is a note to let you know that I've just added the patch titled xen-blkback: don't leak persistent grants from xen_blkbk_map() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: xen-blkback-don-t-leak-persistent-grants-from.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From b7649f4e1d73402aaf46cb8260df6161b101b593 Mon Sep 17 00:00:00 2001 From: Jan Beulich <jbeulich@xxxxxxxx> 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@xxxxxxxx> 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@xxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Reviewed-by: Juergen Gross <jgross@xxxxxxxx> Reviewed-by: Wei Liu <wl@xxxxxxx> Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- 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 @@ -937,7 +937,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; } Patches currently in stable-queue which might be from jbeulich@xxxxxxxx are queue-4.9/xen-blkback-don-t-leak-persistent-grants-from.patch