From owner-cvs-src@FreeBSD.ORG Fri Jan 11 14:26:09 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BA2516A468; Fri, 11 Jan 2008 14:26:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from speedfactory.net (mail.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 58A2F13C4D9; Fri, 11 Jan 2008 14:26:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8q) with ESMTP id 228142535-1834499 for multiple; Fri, 11 Jan 2008 09:27:34 -0500 Received: from server.baldwin.cx (www@localhost [127.0.0.1]) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id m0BEQ3gv014678; Fri, 11 Jan 2008 09:26:03 -0500 (EST) (envelope-from jhb@FreeBSD.org) Received: (from www@localhost) by server.baldwin.cx (8.13.8/8.13.8/Submit) id m0BEQ3r4014677; Fri, 11 Jan 2008 09:26:03 -0500 (EST) (envelope-from jhb@FreeBSD.org) X-Authentication-Warning: server.baldwin.cx: www set sender to jhb@FreeBSD.org using -f Received: from osx.baldwin.cx ([192.168.0.18]) (SquirrelMail authenticated user john) by mail.baldwin.cx with HTTP; Fri, 11 Jan 2008 09:26:03 -0500 (EST) Message-ID: <59750.192.168.0.18.1200061563.squirrel@mail.baldwin.cx> In-Reply-To: <200801111153.m0BBr4Ho032590@repoman.freebsd.org> References: <200801111153.m0BBr4Ho032590@repoman.freebsd.org> Date: Fri, 11 Jan 2008 09:26:03 -0500 (EST) From: "John Baldwin" To: "Konstantin Belousov" User-Agent: SquirrelMail/1.4.7 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Greylist: Sender is SPF-compliant, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 11 Jan 2008 09:26:03 -0500 (EST) X-Virus-Scanned: ClamAV 0.91.2/5477/Fri Jan 11 07:26:19 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/fdc fdc.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2008 14:26:09 -0000 On Fri, January 11, 2008 6:53 am, Konstantin Belousov wrote: > kib 2008-01-11 11:53:04 UTC > > FreeBSD src repository > > Modified files: > sys/dev/fdc fdc.c > Log: > Fix unload of the fdc.ko: > > Wakeup the thread doing the fdc_detach() when the fdc worker thread > exits [1]. > Write access to the write-protected floppy shall call device_unbusy() to > pair the device_busy() in the fd_access() [2]. > > PR: 116537 [1], 116539 [2] > MFC after: 1 week > > Revision Changes Path > 1.319 +8 -1 src/sys/dev/fdc/fdc.c [1] is wrong and reintroduces a panic race on module unload. The wakeup() is internal to kproc_exit/kthread_exit. The correct fix is to fix the msleep() in detach to sleep on fdc->fdc_thread instead of &fdc->fdc_thread. -- John Baldwin