lkml.org 
[lkml]   [2019]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] usnic: avoid overly large buffers on stack
Date
On Fri, Sep 06, 2019 at 05:57:17PM +0200, Arnd Bergmann wrote:
> 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.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/infiniband/hw/usnic/usnic_ib_main.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)

Applied to for-next, thanks

Jason

\
 
 \ /
  Last update: 2019-09-12 15:48    [W:0.042 / U:0.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site