From owner-freebsd-current Fri Feb 14 6:33:15 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F80537B401 for ; Fri, 14 Feb 2003 06:33:14 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F15C43F93 for ; Fri, 14 Feb 2003 06:33:14 -0800 (PST) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 0995AAE160; Fri, 14 Feb 2003 06:33:14 -0800 (PST) Date: Fri, 14 Feb 2003 15:33:14 +0100 From: Maxime Henrion To: Hiten Pandya Cc: current@FreeBSD.ORG Subject: Re: KASSERT's for vfs_{get,copy}opt() Message-ID: <20030214143313.GC60813@elvis.mu.org> References: <20030214103359.GA73639@unixdaemons.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030214103359.GA73639@unixdaemons.com> User-Agent: Mutt/1.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hiten Pandya wrote: > Hello everyone. This not something major, but I recently experienced > panics in some of my old QNX4 filesystem porting code, and an old 5.0 > kernel with UNIONFS problems. > > The kernel will panic if vfs_get/copyopt() was passed 'opts' as NULL. > It would be good to add KASSERT's to these calls. I have passed this > patch around on IRC, and have not seen any objections. Why the need for a KASSERT() when we will panic() anyway if NULL is passed ? There's no need for manually calling panic() when the code will end doing so, and I specifically did not put KASSERT() there for this reason. Cheers, Maxime To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message