bnx2x: Safe bnx2x_panic_dump()
authorYuval Mintz <Yuval.Mintz@qlogic.com>
Sun, 17 Aug 2014 13:47:47 +0000 (16:47 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Aug 2014 19:31:16 +0000 (12:31 -0700)
commite261199872a232beb6541c7dc6af2af0de840a27
treece7eeeb0770694a9c05e5f23c293b0e4fbb57032
parent626041248d3fb5b2fca5c9af172f00fa3bb6dcfe
bnx2x: Safe bnx2x_panic_dump()

The bnx2x panic dump spills a lot of information from the driver's
fastpath, but may be called while some of the fastpath is uninitialized.

This patch verifies that pointers are already allocated before dereferencing
them to prevent possible kernel panics.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c