tg3: Avoid null pointer dereference in tg3_interrupt in netconsole mode
authorNithin Nayak Sujir <nsujir@broadcom.com>
Mon, 14 Jan 2013 17:10:59 +0000 (17:10 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 20 Feb 2013 03:15:39 +0000 (03:15 +0000)
commitac7551bedf950ef638df23badb0df0a7ca8045fd
tree0758be3100c25b751f59d566355ab25382b8ffda
parent335c3391c34f5a607ca63d606f9b2d9f747bab4a
tg3: Avoid null pointer dereference in tg3_interrupt in netconsole mode

[ Upstream commit 9c13cb8bb477a83b9a3c9e5a5478a4e21294a760 ]

When netconsole is enabled, logging messages generated during tg3_open
can result in a null pointer dereference for the uninitialized tg3
status block. Use the irq_sync flag to disable polling in the early
stages. irq_sync is cleared when the driver is enabling interrupts after
all initialization is completed.

Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/broadcom/tg3.c