Skip to content
Commit 2ac5a6d3 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jason Gunthorpe
Browse files

RDMA/usnic: Avoid overly large buffers on stack

It's never a good idea to put a 1000-byte buffer on the kernel stack. The
compiler warns about this instance when usnic_ib_log_vf() gets inlined
into usnic_ib_pci_probe():

drivers/infiniband/hw/usnic/usnic_ib_main.c:543:12: error: stack frame size of 1044 bytes in function 'usnic_ib_pci_probe' [-Werror,-Wframe-larger-than=]

As this is only called for debugging purposes in the setup path, it's
trivial to convert to a dynamic allocation.

Link: https://lore.kernel.org/r/20190906155730.2750200-1-arnd@arndb.de


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent b97b218b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment