Skip to content

Commit 4c092c5

Browse files
jbeulichjgross1
authored andcommitted
swiotlb-xen: fix late init retry
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: 2d29960 ("swiotlb: dynamically allocate io_tlb_default_mem") Signed-off-by: Jan Beulich <[email protected]> Cc: [email protected] Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
1 parent ce6a80d commit 4c092c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/xen/swiotlb-xen.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ int __ref xen_swiotlb_init(void)
211211
if (repeat--) {
212212
/* Min is 2MB */
213213
nslabs = max(1024UL, (nslabs >> 1));
214-
pr_info("Lowering to %luMB\n",
215-
(nslabs << IO_TLB_SHIFT) >> 20);
214+
bytes = nslabs << IO_TLB_SHIFT;
215+
pr_info("Lowering to %luMB\n", bytes >> 20);
216216
goto retry;
217217
}
218218
pr_err("%s (rc:%d)\n", xen_swiotlb_error(m_ret), rc);

0 commit comments

Comments
 (0)