mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Dawson Engler <engler@csl.Stanford.EDU>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [CHECKER] 56 potential lock/unlock bugs in 2.5.8
Date: 12 Jul 2002 00:34:04 +0200	[thread overview]
Message-ID: <p73r8i9vqqr.fsf@oldwotan.suse.de> (raw)
In-Reply-To: Dawson Engler's message of "11 Jul 2002 23:39:35 +0200"

Dawson Engler <engler@csl.Stanford.EDU> writes:

> [BUG]  recheck: seems unlikely, though it does seem that the path is valid.
> /u2/engler/mc/oses/linux/2.5.8/net/ipv6/tcp_ipv6.c:206:tcp_v6_get_port: ERROR:A_B:112:206:Did not reverse 'spin_lock' [COUNTER=spin_lock:112] [fit=3] [fit_fn=11] [fn_ex=2] [fn_counter=1] [ex=5619] [counter=272] [z = 1.34804760770983] [fn-z = -2.25170500701057]
> 		rover = tcp_port_rover;
> 		do {	rover++;
> 			if ((rover < low) || (rover > high))
> 				rover = low;
> 			head = &tcp_bhash[tcp_bhashfn(rover)];
> Start --->
> 			spin_lock(&head->lock);
> 

           } while (--remaining > 0);
                tcp_port_rover = rover;
                spin_unlock(&tcp_portalloc_lock);

                /* Exhausted local port range during search? */
                ret = 1;
                if (remaining <= 0)
                        goto fail;


the goto can only hit when the lock hasn't been taken, so not unlocking it
is correct. It just rechecks the loop end condition, but your tool probably
doesn't know that. The wonders of structured programming :-)


-Andi

       reply	other threads:[~2002-07-11 22:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200207112135.OAA03801@csl.Stanford.EDU.suse.lists.linux.kernel>
2002-07-11 22:34 ` Andi Kleen [this message]
2002-07-11 22:32 Grover, Andrew
2002-07-11 23:26 ` Dawson Engler
  -- strict thread matches above, loose matches on Subject: below --
2002-07-11 21:35 Dawson Engler
2002-07-11 21:54 ` Thunder from the hill
2002-07-11 22:21 ` Oliver Neukum
2002-07-11 23:14 ` Thunder from the hill
2002-07-11 23:32   ` Andreas Dilger
2002-07-11 23:45     ` Thunder from the hill
2002-07-11 23:41   ` Chris Wright
2002-07-12  0:21   ` Andrew Morton
2002-07-12  1:44     ` Arnaldo Carvalho de Melo
2002-07-12 17:40   ` Roman Zippel
2002-07-12 17:53     ` Thunder from the hill
2002-07-12 18:37       ` Roman Zippel
2002-07-12 18:05     ` Dave Jones
2002-07-12 18:32       ` Roman Zippel
2002-07-12 18:37         ` Dave Jones
2002-07-12 20:34           ` Roman Zippel
2002-07-12 20:48             ` Dave Jones
2002-07-12 21:30               ` Roman Zippel
2002-07-12 21:38                 ` Dave Jones
2002-07-12 21:56                   ` Roman Zippel
2002-07-12 22:14                     ` Dave Jones
2002-07-12 22:34                       ` Roman Zippel
2002-07-12 22:41                         ` Dave Jones
2002-07-12 13:17 ` David Woodhouse
2002-07-12 13:26   ` Thunder from the hill

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=p73r8i9vqqr.fsf@oldwotan.suse.de \
    --to=ak@suse.de \
    --cc=engler@csl.Stanford.EDU \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®