]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf6ba40b6e21b5cb4afeecbe5e16f85dea76bf776
treece7eeeb0770694a9c05e5f23c293b0e4fbb57032
parentb28b7507a1893a81033f086e82d657a982fb03fb
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