2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 13:43:55 +08:00
linux-next/drivers/scsi/bnx2fc
Arnd Bergmann 720ba808e9 bnx2fc: reduce stack usage in __bnx2fc_enable
When the bnx2fc driver was changed to read the npiv table from
nvram, the stack of the __bnx2fc_enable function gained an
additional 1028 byte structure that gcc rightfully warns about:

drivers/scsi/bnx2fc/bnx2fc_fcoe.c: In function '__bnx2fc_enable':
drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2134:1: warning: the frame size of 1128 bytes is larger than 1024 bytes [-Wframe-larger-than=]

In order to avoid a possible kernel stack overflow and to get rid
of the warning, this changes the function to use a dynamic allocation
of the structure using kzalloc.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 2971ff67bd ("bnx2fc: Read npiv table from nvram and create vports.")
Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-11-09 17:10:24 -08:00
..
57xx_hsi_bnx2fc.h bnx2fc: Rebranding bnx2fc driver 2014-07-25 17:16:59 -04:00
bnx2fc_constants.h bnx2fc: Rebranding bnx2fc driver 2014-07-25 17:16:59 -04:00
bnx2fc_debug.c bnx2fc: Rebranding bnx2fc driver 2014-07-25 17:16:59 -04:00
bnx2fc_debug.h bnx2fc: Rebranding bnx2fc driver 2014-07-25 17:16:59 -04:00
bnx2fc_els.c bnx2fc: fix tgt spinlock locking 2014-11-10 15:25:41 +01:00
bnx2fc_fcoe.c bnx2fc: reduce stack usage in __bnx2fc_enable 2015-11-09 17:10:24 -08:00
bnx2fc_hwi.c bnx2fc: Rebranding bnx2fc driver 2014-07-25 17:16:59 -04:00
bnx2fc_io.c fc: FCP_PTA_SIMPLE is 0 2014-12-04 09:58:33 +01:00
bnx2fc_tgt.c bnx2fc: Rebranding bnx2fc driver 2014-07-25 17:16:59 -04:00
bnx2fc.h bnx2fc: Rebranding bnx2fc driver 2014-07-25 17:16:59 -04:00
Kconfig scsi: Use 'depends' with LIBFC instead of 'select'. 2014-09-22 13:14:33 -04:00
Makefile [SCSI] bnx2fc: Reduce object size by consolidating formats 2012-07-20 08:58:17 +01:00