bnxt_en: take coredump_record structure off stack
authorArnd Bergmann <arnd@arndb.de>
Mon, 13 Aug 2018 22:12:45 +0000 (00:12 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Aug 2018 03:45:49 +0000 (20:45 -0700)
commit1bbf3aed25e0fc256e825da1f5c45d7b4daa828e
tree785d4d7d59822490c0709d379954e3dba35729f1
parentcf87615d15f37182b2a3a4cd722288d3d5956900
bnxt_en: take coredump_record structure off stack

The bnxt_coredump_record structure is very long, causing a warning
about possible stack overflow on 32-bit architectures:

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c: In function 'bnxt_get_coredump':
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2989:1: error: the frame size of 1188 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

I could not see any reason to operate on an on-stack copy of the
structure before copying it back into the caller-provided buffer, which
also simplifies the code here.

Fixes: 6c5657d085ae ("bnxt_en: Add support for ethtool get dump.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c