Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Apr 2011 13:05:21 +0200
From:      Svatopluk Kraus <onwahe@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: schedcpu() in /sys/kern/sched_4bsd.c calls thread_lock() on thread with un-initialized td_lock
Message-ID:  <BANLkTim9br99oY-qD=TyfnKuiaTvcA0-WQ@mail.gmail.com>
In-Reply-To: <201103311434.41188.jhb@freebsd.org>
References:  <AANLkTimEiOW%2BkSZD6n1MHiRou3UWibU6Oy3fr9RO4_O4@mail.gmail.com> <201103310958.51416.jhb@freebsd.org> <AANLkTi=Qiugq9-mU2C3bgR0p_F70OeahbtvQUu7n_K6C@mail.gmail.com> <201103311434.41188.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
PiBIZXJlIGlzIGEgbGFyZ2VyIHBhdGNoOgo+Cj4gSW5kZXg6IGtlcm4va2Vybl9rdHJhY2UuYwo+
ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT0KPiAtLS0ga2Vybi9rZXJuX2t0cmFjZS5jIKAocmV2aXNpb24gMjIwMTkwKQo+
ICsrKyBrZXJuL2tlcm5fa3RyYWNlLmMgoCh3b3JraW5nIGNvcHkpCj4gQEAgLTg4Miw3ICs4ODIs
OCBAQAo+IKAgoCCgIKAgoCCgIKAgoG5mb3VuZCA9IDA7Cj4goCCgIKAgoCCgIKAgoCCgTElTVF9G
T1JFQUNIKHAsICZwZy0+cGdfbWVtYmVycywgcF9wZ2xpc3QpIHsKPiCgIKAgoCCgIKAgoCCgIKAg
oCCgIKAgoFBST0NfTE9DSyhwKTsKPiAtIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCBpZiAocF9jYW5z
ZWUodGQsIHApICE9IDApIHsKPiArIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCBpZiAocC0+cF9zdGF0
ZSA9PSBQUlNfTkV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