From owner-freebsd-current@FreeBSD.ORG Mon Aug 17 12:38:01 2009 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 97B7B106568F for ; Mon, 17 Aug 2009 12:38:01 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.freebsd.org (Postfix) with ESMTP id 58D7C8FC16 for ; Mon, 17 Aug 2009 12:38:01 +0000 (UTC) Received: from [172.31.193.10] (cpe-069-134-110-200.nc.res.rr.com [69.134.110.200]) (authenticated bits=0) by duke.cs.duke.edu (8.14.2/8.14.2) with ESMTP id n7HCbbwh016480 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 17 Aug 2009 08:37:37 -0400 (EDT) X-DKIM: Sendmail DKIM Filter v2.8.3 duke.cs.duke.edu n7HCbbwh016480 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail; t=1250512657; bh=FUoSwe4mJLTItv0MG3GurBxqa10gqEp/mh1usaMziks=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=pfjro2ckZJVCZQUZGMHMqhWE1BiPuxf/4wYyvQ1h0uItRqduIPr2sc93qdUgx57kZ JABBMUEavqdye95hn/Pja6iC2p/fNaEoTvh8AEDNGd1vxr4nqXNzBbQrhPh+0C97Z2 UXAQ2GR3ZcwwUo4T4e69wJnCtFE+jf85DhmuxWlk= Message-ID: <4A894F0B.3080606@cs.duke.edu> Date: Mon, 17 Aug 2009 08:37:31 -0400 From: Andrew Gallatin User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Ed Schouten References: <4A857D16.9070403@cs.duke.edu> <4A85B9CD.4050802@cs.duke.edu> <20090814193254.GO1884@deviant.kiev.zoral.com.ua> <4A85C325.6050400@cs.duke.edu> <20090816180911.GL1292@hoeg.nl> In-Reply-To: <20090816180911.GL1292@hoeg.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: clone_cleanup() doesn't 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: Mon, 17 Aug 2009 12:38:01 -0000 Ed Schouten wrote: > * Andrew Gallatin wrote: >> FWIW, the fix to my problem was to add D_NEEDMINOR to >> my cdevsw d_flags, to restore the same behavior as FreeBSD 5/6/7 > > Yes. INVARIANTS should trigger a kernel panic if you use clone_create() > without D_NEEDMINOR. I think you probably didn't have it enabled, which > means it dies later on. > No, I didn't have INVARIANTS compiled in, I probably should have. Is there any reason you don't just |= in D_NEEDMINOR on first use of clone_create()? By adding the requirement of this flag, you've gratuitously broken any 3rd party driver using clones, which has used the same API unchanged since 5.x Drew