android_kernel_motorola_sm6375/drivers/ntb
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Arnd Bergmann 302af84525 ntb: reduce stack usage in idt_scan_mws
[ Upstream commit aff12700b8dd7422bfe2277696e192af4df9de8f ]

idt_scan_mws() puts a large fixed-size array on the stack and copies
it into a smaller dynamically allocated array at the end. On 32-bit
targets, the fixed size can easily exceed the warning limit for
possible stack overflow:

drivers/ntb/hw/idt/ntb_hw_idt.c:1041:27: error: stack frame size (1032) exceeds limit (1024) in 'idt_scan_mws' [-Werror,-Wframe-larger-than]

Change it to instead just always use dynamic allocation for the
array from the start. It's too big for the stack, but not actually
all that much for a permanent allocation.

Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Signed-off-by: Jon Mason <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2025-05-02 07:39:28 +02:00
..
hw ntb: reduce stack usage in idt_scan_mws 2025-05-02 07:39:28 +02:00
test ntb_perf: Delete duplicate dmaengine_unmap_put() call in perf_copy_chunk() 2025-04-10 14:29:43 +02:00
core.c
Kconfig
Makefile
msi.c
ntb_transport.c ntb: use 64-bit arithmetic for the MSI doorbell mask 2025-05-02 07:39:17 +02:00