Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Aug 2003 16:22:30 -0700
From:      Sam Leffler <sam@errno.com>
To:        Ted Unangst <tedu@stanford.edu>, freebsd-hackers@freebsd.org
Subject:   Re: possible deadlocks?
Message-ID:  <1650093869.1060186950@melange.errno.com>
In-Reply-To: <Pine.GSO.4.44.0308061506120.29218-100000@saga0.Stanford.EDU>
References:  <Pine.GSO.4.44.0308061506120.29218-100000@saga0.Stanford.EDU>

next in thread | previous in thread | raw e-mail | index | archive | help
> My advisor Dawson Engler has written a deadlock detector, and we'd like
> some verification. They look like bugs, unless there is some other reason
> why two call chains cannot happen at the same time.
>

Dawson?  Hey Dawson!

> second one in bpf, between bpfif_lock and bpfd_lock.
>
> thread 1:
> bpf_tap() /* or bpf_mtap */
>   BPFIF_LOCK(bp); /* gets this lock */
>   for (d = bp->bif_dlist; d != 0; d = d->bd_next) {
> 	BPFD_LOCK(d); /* waits for thread 2 */
>
> thread 2:
> bpf_setdlt()
>   BPFD_LOCK(d); /* gets lock */
>   bpf_detachd(d); /* or bpf_attachd */
>     BPFIF_LOCK(bp); /* waits for thread 1 */

Yeah, this is my bad.  Will have to look if it's possible.

Does this mean you're going to prove -current is "lockably corrrect"? :)

	Sam



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1650093869.1060186950>