netxen: check for root bus in netxen_mask_aer_correctable
authorNikolay Aleksandrov <nikolay@redhat.com>
Fri, 14 Sep 2012 05:50:03 +0000 (05:50 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Oct 2012 20:28:05 +0000 (05:28 +0900)
commitb89ea13784c385483ef3a47a992f92842171f5c1
tree6d31752679d7609eab7c28c1f18edea43cf32c10
parentc56a0fd7b6d69ef122a01b9b1db83ba62c9f6622
netxen: check for root bus in netxen_mask_aer_correctable

[ Upstream commit e4d1aa40e363ed3e0486aeeeb0d173f7f822737e ]

Add a check if pdev->bus->self == NULL (root bus). When attaching
a netxen NIC to a VM it can be on the root bus and the guest would
crash in netxen_mask_aer_correctable() because of a NULL pointer
dereference if CONFIG_PCIEAER is present.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/netxen/netxen_nic_main.c