aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_l3_main.c
diff options
context:
space:
mode:
authorUrsula Braun <ursula.braun@de.ibm.com>2009-01-04 20:35:18 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-04 20:35:18 -0500
commitfc9c24603c4b93d84160e14c0a98a754d4328d15 (patch)
treef90344411a906d8b9f06267c8dbc278c44588bdf /drivers/s390/net/qeth_l3_main.c
parentfe94e2e0a63a49d23753f56eacb446c4f73c1dea (diff)
qeth: avoid crash in case of layer mismatch for VSWITCH
For z/VM GuestLAN or VSWITCH devices the transport layer is configured in z/VM. The layer2 attribute of a participating Linux device has to match the z/VM definition. In case of a mismatch Linux currently crashes in qeth recovery due to a reference to the not yet existing net_device. Solution: add a check for existence of net_device and add a message pointing to the mismatch of layer definitions in Linux and z/VM. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l3_main.c')
-rw-r--r--drivers/s390/net/qeth_l3_main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index cdd6ab9c894d..8f30085ef5b4 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -2082,9 +2082,11 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
2082 if (recovery_mode) 2082 if (recovery_mode)
2083 qeth_l3_stop(card->dev); 2083 qeth_l3_stop(card->dev);
2084 else { 2084 else {
2085 rtnl_lock(); 2085 if (card->dev) {
2086 dev_close(card->dev); 2086 rtnl_lock();
2087 rtnl_unlock(); 2087 dev_close(card->dev);
2088 rtnl_unlock();
2089 }
2088 } 2090 }
2089 if (!card->use_hard_stop) { 2091 if (!card->use_hard_stop) {
2090 rc = qeth_send_stoplan(card); 2092 rc = qeth_send_stoplan(card);