From owner-freebsd-current@FreeBSD.ORG Fri Apr 1 11:05:22 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E2A4106564A; Fri, 1 Apr 2011 11:05:22 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6CA3F8FC14; Fri, 1 Apr 2011 11:05:22 +0000 (UTC) Received: by pzk27 with SMTP id 27so769909pzk.13 for ; Fri, 01 Apr 2011 04:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=I9C+E+FfRbUbf5RcGMvsQmJBwkVdEW7uOzDtFW3xzao=; b=mQL2DrTjf7BNOjphP7QPkdXzqzxZouo4BtD9WiLsbOSKw8mMxf5Ha/61w9ADoQAGPT zA2MS2u29Q9e16SodTNGB+0smb0k8SXLiNswCFl6jZzSk9HEWuSJD6bc45uJ8NYjACBD Xo8Vsh3kiJXBgY3X8Dl248J7IfOFyUrCOdDEY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=jpHFWFLjOoUirnYzGBPE/AI2a58TKw6vCE01Sy4WTgofnTosyNQuNw8n1xLmUIHoFA yv1rOOzlkAwAS+6ljXUN0fDc9dE/hs50dIxRClQGlSgFcSRP3khAMKH1GAY3nCf9mB8y 0sIo+FN3B8MDRvaSUGguCer8CWocv03Bxw6vQ= MIME-Version: 1.0 Received: by 10.142.13.5 with SMTP id 5mr2833401wfm.426.1301655921918; Fri, 01 Apr 2011 04:05:21 -0700 (PDT) Received: by 10.142.153.15 with HTTP; Fri, 1 Apr 2011 04:05:21 -0700 (PDT) In-Reply-To: <201103311434.41188.jhb@freebsd.org> References: <201103310958.51416.jhb@freebsd.org> <201103311434.41188.jhb@freebsd.org> Date: Fri, 1 Apr 2011 13:05:21 +0200 Message-ID: From: Svatopluk Kraus To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: base64 Cc: freebsd-current@freebsd.org Subject: Re: schedcpu() in /sys/kern/sched_4bsd.c calls thread_lock() on thread with un-initialized td_lock X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2011 11:05:22 -0000 PiBIZXJlIGlzIGEgbGFyZ2VyIHBhdGNoOgo+Cj4gSW5kZXg6IGtlcm4va2Vybl9rdHJhY2UuYwo+ ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT0KPiAtLS0ga2Vybi9rZXJuX2t0cmFjZS5jIKAocmV2aXNpb24gMjIwMTkwKQo+ ICsrKyBrZXJuL2tlcm5fa3RyYWNlLmMgoCh3b3JraW5nIGNvcHkpCj4gQEAgLTg4Miw3ICs4ODIs OCBAQAo+IKAgoCCgIKAgoCCgIKAgoG5mb3VuZCA9IDA7Cj4goCCgIKAgoCCgIKAgoCCgTElTVF9G T1JFQUNIKHAsICZwZy0+cGdfbWVtYmVycywgcF9wZ2xpc3QpIHsKPiCgIKAgoCCgIKAgoCCgIKAg oCCgIKAgoFBST0NfTE9DSyhwKTsKPiAtIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCBpZiAocF9jYW5z ZWUodGQsIHApICE9IDApIHsKPiArIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCBpZiAocC0+cF9zdGF0 ZSA9PSBQUlNfTkVXIHx8Cj4gKyCgIKAgoCCgIKAgoCCgIKAgoCCgIK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