diff options
author | frank.blaschka@de.ibm.com <frank.blaschka@de.ibm.com> | 2012-07-24 18:34:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-25 18:24:13 -0400 |
commit | eabfbe6230ee7363681e7a561948d362b87169f0 (patch) | |
tree | 3c13da441a3f997ab5e9e15028bc55199382d3ad /drivers/s390 | |
parent | 0b945293c4fa89347b295ccb355e5faad1585039 (diff) |
qeth: repair crash in qeth_l3_vlan_rx_kill_vid()
Commit efc73f4b "net: Fix memory leak - vlan_info struct" adds deletion of
VLAN 0 for devices with feature NETIF_F_HW_VLAN_FILTER. For driver
qeth these are the layer 3 devices. Usually there exists no
separate vlan net_device for VLAN 0. Thus the qeth functions
qeth_l3_free_vlan_addresses4() and qeth_l3_free_vlan_addresses6()
require an extra checking if function __vlan_find_dev_deep()
returns with a net_device.
Cc: stable@vger.kernel.org
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')
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 0cf706699a04..c5f03fa70fba 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -1758,6 +1758,8 @@ static void qeth_l3_free_vlan_addresses4(struct qeth_card *card, | |||
1758 | QETH_CARD_TEXT(card, 4, "frvaddr4"); | 1758 | QETH_CARD_TEXT(card, 4, "frvaddr4"); |
1759 | 1759 | ||
1760 | netdev = __vlan_find_dev_deep(card->dev, vid); | 1760 | netdev = __vlan_find_dev_deep(card->dev, vid); |
1761 | if (!netdev) | ||
1762 | return; | ||
1761 | in_dev = in_dev_get(netdev); | 1763 | in_dev = in_dev_get(netdev); |
1762 | if (!in_dev) | 1764 | if (!in_dev) |
1763 | return; | 1765 | return; |
@@ -1786,6 +1788,8 @@ static void qeth_l3_free_vlan_addresses6(struct qeth_card *card, | |||
1786 | QETH_CARD_TEXT(card, 4, "frvaddr6"); | 1788 | QETH_CARD_TEXT(card, 4, "frvaddr6"); |
1787 | 1789 | ||
1788 | netdev = __vlan_find_dev_deep(card->dev, vid); | 1790 | netdev = __vlan_find_dev_deep(card->dev, vid); |
1791 | if (!netdev) | ||
1792 | return; | ||
1789 | in6_dev = in6_dev_get(netdev); | 1793 | in6_dev = in6_dev_get(netdev); |
1790 | if (!in6_dev) | 1794 | if (!in6_dev) |
1791 | return; | 1795 | return; |