netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Pavlic <fpavlic@de.ibm.com>
To: jgarzik@pobox.com
Cc: netdev@vger.kernel.org
Subject: [PATCH 3/8] s390: avoid inconsistent lock state in qeth
Date: Wed, 20 Jun 2007 12:58:02 +0200	[thread overview]
Message-ID: <20070620105802.GC9454@de.ibm.com> (raw)
In-Reply-To: <20070620104817.GA2627@de.ibm.com>

From: Ursula Braun <braunu@de.ibm.com>

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: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
---
 drivers/s390/net/qeth_main.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index c5a9507..79b7379 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -5850,9 +5850,9 @@ qeth_add_vlan_mc6(struct qeth_card *card)
 		in_dev = in6_dev_get(netdev);
 		if (!in_dev)
 			continue;
-		read_lock(&in_dev->lock);
+		read_lock_bh(&in_dev->lock);
 		qeth_add_mc6(card,in_dev);
-		read_unlock(&in_dev->lock);
+		read_unlock_bh(&in_dev->lock);
 		in6_dev_put(in_dev);
 	}
 #endif /* CONFIG_QETH_VLAN */
@@ -5869,10 +5869,10 @@ qeth_add_multicast_ipv6(struct qeth_card *card)
 	in6_dev = in6_dev_get(card->dev);
 	if (in6_dev == NULL)
 		return;
-	read_lock(&in6_dev->lock);
+	read_lock_bh(&in6_dev->lock);
 	qeth_add_mc6(card, in6_dev);
 	qeth_add_vlan_mc6(card);
-	read_unlock(&in6_dev->lock);
+	read_unlock_bh(&in6_dev->lock);
 	in6_dev_put(in6_dev);
 }
 #endif /* CONFIG_QETH_IPV6 */
-- 
1.5.2.1


  parent reply	other threads:[~2007-06-20 10:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-20 10:48 [PATCH 0/8] s390: network device driver fixes Frank Pavlic
2007-06-20 10:55 ` [PATCH 1/8] s390: print correct level for HiperSockets devices Frank Pavlic
2007-06-20 23:13   ` Jeff Garzik
2007-06-20 10:56 ` [PATCH 2/8] s390: qeth driver does not recover Frank Pavlic
2007-06-20 10:58 ` Frank Pavlic [this message]
2007-06-20 10:59 ` [PATCH 4/8] s390: qeth: wrong packet length in qdio header Frank Pavlic
2007-06-20 11:00 ` [PATCH 5/8] s390: Use ccw_device_get_id() in qeth/claw drivers Frank Pavlic
2007-06-20 11:01 ` [PATCH 6/8] s390: don't call iucv_path_connect from tasklet context Frank Pavlic
2007-06-20 11:02 ` [PATCH 7/8] s390: netiucv spinlock initializer cleanup Frank Pavlic
2007-06-20 11:03 ` [PATCH 8/8] s390: netiucv inlining cleanup Frank Pavlic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070620105802.GC9454@de.ibm.com \
    --to=fpavlic@de.ibm.com \
    --cc=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).