This is a note to let you know that I've just added the patch titled swiotlb-xen: fix late init retry to the 5.14-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: swiotlb-xen-fix-late-init-retry.patch and it can be found in the queue-5.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 4c092c59015f7adf0f07685f869edb96d997a756 Mon Sep 17 00:00:00 2001 From: Jan Beulich <jbeulich@xxxxxxxx> Date: Tue, 7 Sep 2021 14:04:47 +0200 Subject: swiotlb-xen: fix late init retry From: Jan Beulich <jbeulich@xxxxxxxx> commit 4c092c59015f7adf0f07685f869edb96d997a756 upstream. The commit referenced below removed the assignment of "bytes" from xen_swiotlb_init() without - like done for xen_swiotlb_init_early() - adding an assignment on the retry path, thus leading to excessively sized allocations upon retries. Fixes: 2d29960af0be ("swiotlb: dynamically allocate io_tlb_default_mem") Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Reviewed-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/778299d6-9cfd-1c13-026e-25ee5d14ecb3@xxxxxxxx Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- drivers/xen/swiotlb-xen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -211,8 +211,8 @@ error: if (repeat--) { /* Min is 2MB */ nslabs = max(1024UL, (nslabs >> 1)); - pr_info("Lowering to %luMB\n", - (nslabs << IO_TLB_SHIFT) >> 20); + bytes = nslabs << IO_TLB_SHIFT; + pr_info("Lowering to %luMB\n", bytes >> 20); goto retry; } pr_err("%s (rc:%d)\n", xen_swiotlb_error(m_ret), rc); Patches currently in stable-queue which might be from jbeulich@xxxxxxxx are queue-5.14/swiotlb-xen-fix-late-init-retry.patch queue-5.14/swiotlb-xen-avoid-double-free.patch