Commit add3f2fa authored by Ursula Braun's avatar Ursula Braun Committed by Jeff Garzik

s390: avoid inconsistent lock state in qeth

ipv6_regen_rndid in net/ipv6/addrconf.c makes use of "write_lock_bh"
for its inet6_dev->lock. It may run in softirq-context.
qeth makes use of "read_lock" for the same inet6_dev->lock.
To avoid a potential deadlock situation, qeth should make use of
"read_lock_bh" for its usages of inet6_dev->lock.
Signed-off-by: default avatarUrsula Braun <braunu@de.ibm.com>
Signed-off-by: default avatarFrank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent d81ef0fb
...@@ -5850,9 +5850,9 @@ qeth_add_vlan_mc6(struct qeth_card *card) ...@@ -5850,9 +5850,9 @@ qeth_add_vlan_mc6(struct qeth_card *card)
in_dev = in6_dev_get(netdev); in_dev = in6_dev_get(netdev);
if (!in_dev) if (!in_dev)
continue; continue;
read_lock(&in_dev->lock); read_lock_bh(&in_dev->lock);
qeth_add_mc6(card,in_dev); qeth_add_mc6(card,in_dev);
read_unlock(&in_dev->lock); read_unlock_bh(&in_dev->lock);
in6_dev_put(in_dev); in6_dev_put(in_dev);
} }
#endif /* CONFIG_QETH_VLAN */ #endif /* CONFIG_QETH_VLAN */
...@@ -5869,10 +5869,10 @@ qeth_add_multicast_ipv6(struct qeth_card *card) ...@@ -5869,10 +5869,10 @@ qeth_add_multicast_ipv6(struct qeth_card *card)
in6_dev = in6_dev_get(card->dev); in6_dev = in6_dev_get(card->dev);
if (in6_dev == NULL) if (in6_dev == NULL)
return; return;
read_lock(&in6_dev->lock); read_lock_bh(&in6_dev->lock);
qeth_add_mc6(card, in6_dev); qeth_add_mc6(card, in6_dev);
qeth_add_vlan_mc6(card); qeth_add_vlan_mc6(card);
read_unlock(&in6_dev->lock); read_unlock_bh(&in6_dev->lock);
in6_dev_put(in6_dev); in6_dev_put(in6_dev);
} }
#endif /* CONFIG_QETH_IPV6 */ #endif /* CONFIG_QETH_IPV6 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment