From owner-svn-src-all@freebsd.org Mon Dec 19 17:37:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABD74C88FF8; Mon, 19 Dec 2016 17:37:50 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74B211C29; Mon, 19 Dec 2016 17:37:49 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 3FBD51FE1B5; Mon, 19 Dec 2016 18:37:47 +0100 (CET) Subject: Re: svn commit: r310242 - head/sys/dev/usb To: John Baldwin References: <201612190928.uBJ9SDFc078376@repo.freebsd.org> <2058091.PnquSlH0qI@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <57d2d5e2-1b2d-09d5-41e2-92b6f22fb229@selasky.org> Date: Mon, 19 Dec 2016 18:37:17 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <2058091.PnquSlH0qI@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2016 17:37:50 -0000 On 12/19/16 17:13, John Baldwin wrote: > On Monday, December 19, 2016 09:28:13 AM Hans Petter Selasky wrote: >> Author: hselasky >> Date: Mon Dec 19 09:28:12 2016 >> New Revision: 310242 >> URL: https://svnweb.freebsd.org/changeset/base/310242 >> >> Log: >> Defer USB enumeration until the SI_SUB_KICK_SCHEDULER is executed to avoid >> boot panics in conjunction with the recently added EARLY_AP_STARTUP feature. >> The panics happen due to using kernel facilities like callouts too early. >> >> Tested by: jhb @ >> MFC after: 1 week > > As mentioned in the thread, the patches to usb_hub.c weren't needed and the block > in usb_process.c can just be removed unconditionally since it should never execute > in the non-EARLY_AP_STARTUP case. > Hi John, The checks in usb_process.c are needed in case attaching a USB controller fails for some unknown reason. Then there is a problem that thread0 cannot wait/sleep for the process to exit, so that it doesn't access freed memory. Did I miss anything? --HPS