mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "YOSHIFUJI Hideaki / 吉藤英明" <yoshfuji@linux-ipv6.org>
To: davem@redhat.com, yxie@cs.stanford.edu
Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com
Subject: Re: [BUGS] [CHECKER] 99 synchronization bugs and a lock summary database
Date: Fri, 02 Jul 2004 17:47:53 +0900 (JST)	[thread overview]
Message-ID: <20040702.174753.93406678.yoshfuji@linux-ipv6.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0407011747040.4015-100000@kaki.stanford.edu>

Hello.

In article <Pine.LNX.4.44.0407011747040.4015-100000@kaki.stanford.edu> (at Thu, 1 Jul 2004 18:01:00 -0700 (PDT)), Yichen Xie <yxie@cs.stanford.edu> says:

>     http://glide.stanford.edu/linux-lock/err1.html (69 errors)
:
> err1.html consists of potential double locks/unlocks. Acquiring a lock
> twice in a row may result in a system hang, and releasing a lock more than
> once with certain mutex functions (e.g. up) may cause critical section
> violations.

Well,
lapb_iface.c:lapb_unregister() has typo and we failed to get lapb_list_lock.
rose_route.c:rose_remove_node()'s caller has rose_node_list_lock; so, this is 
dead lock.

Here's the fix.

===== net/lapb/lapb_iface.c 1.14 vs edited =====
--- 1.14/net/lapb/lapb_iface.c	2004-01-11 08:39:04 +09:00
+++ edited/net/lapb/lapb_iface.c	2004-07-02 17:23:27 +09:00
@@ -176,7 +176,7 @@
 	struct lapb_cb *lapb;
 	int rc = LAPB_BADTOKEN;
 
-	write_unlock_bh(&lapb_list_lock);
+	write_lock_bh(&lapb_list_lock);
 	lapb = __lapb_devtostruct(dev);
 	if (!lapb)
 		goto out;
===== net/rose/rose_route.c 1.12 vs edited =====
--- 1.12/net/rose/rose_route.c	2004-06-04 09:11:24 +09:00
+++ edited/net/rose/rose_route.c	2004-07-02 17:26:08 +09:00
@@ -206,7 +206,6 @@
 {
 	struct rose_node *s;
 
-	spin_lock_bh(&rose_node_list_lock);
 	if ((s = rose_node_list) == rose_node) {
 		rose_node_list = rose_node->next;
 		kfree(rose_node);

Thanks.

-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

      parent reply	other threads:[~2004-07-02  8:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-02  1:01 Yichen Xie
2004-07-02  4:35 ` Nathan Scott
2004-07-02  7:06   ` Yichen Xie
2004-07-02  7:44     ` Andrew Morton
2004-07-02 16:48       ` Yichen Xie
2004-07-02 20:42       ` Yichen Xie
2004-07-02 21:12         ` Yichen Xie
2004-07-02 22:50           ` J. Bruce Fields
2004-07-02 23:44             ` Yichen Xie
2004-07-02  4:38 ` Andrew Morton
2004-07-02  7:20   ` Yichen Xie
2004-07-02  7:33     ` Andrew Morton
2004-07-02  7:39   ` Martin Diehl
2004-07-02 10:00   ` Matthias Urlichs
2004-07-02 22:32     ` Andrew Morton
2004-07-02  8:15 ` Andrew Morton
2004-07-02 16:53   ` Yichen Xie
2004-07-02  8:19 ` Andrew Morton
2004-07-02 16:39   ` Yichen Xie
2004-07-02 17:00     ` J. Bruce Fields
2004-07-02  8:47 ` YOSHIFUJI Hideaki / 吉藤英明 [this message]

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=20040702.174753.93406678.yoshfuji@linux-ipv6.org \
    --to=yoshfuji@linux-ipv6.org \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=yxie@cs.stanford.edu \
    /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

all inboxes | Powered by JetHome®