From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 22:10:06 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC5071065670; Tue, 30 Dec 2008 22:10:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id A28258FC13; Tue, 30 Dec 2008 22:10:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id D0F1C41C7C9; Tue, 30 Dec 2008 23:10:05 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id UnycDox0Wxck; Tue, 30 Dec 2008 23:10:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 609E941C7D6; Tue, 30 Dec 2008 23:10:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id B8A2C4448D5; Tue, 30 Dec 2008 22:08:26 +0000 (UTC) Date: Tue, 30 Dec 2008 22:08:26 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Peter Holm In-Reply-To: <200812302039.mBUKdmHC004512@svn.freebsd.org> Message-ID: <20081230214755.Q28465@maildrop.int.zabbadoz.net> References: <200812302039.mBUKdmHC004512@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186615 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 30 Dec 2008 22:10:07 -0000 On Tue, 30 Dec 2008, Peter Holm wrote: > Author: pho > Date: Tue Dec 30 20:39:47 2008 > New Revision: 186615 > URL: http://svn.freebsd.org/changeset/base/186615 > > Log: > Added missing second part of cleaning j->ip[46] as requested by bz > > Approved by: kib (mentor) > Pointy hat: pho That's not yours; this is mine. Can I grab the extra large one? In short with the words of W.S. 'much ado about nothing'. The NULLifications down there are not necessarily needed; They'll be good in case the calling code changes and doesn't immediately return after we report the copyin error here; so we might consider leaving them in as bandaid. But as long as handling of the IPs is the first thing and we abort the syscall with an error, they are superfluous. After your first commmit there was no way to escape from that function without an error or sane pointers anymore. My fault. Seen too many different versions at various stages of different virtualization and management code lately. I'll check if other upcoming code might need them or back this out myself. Sorry. > Modified: > head/sys/kern/kern_jail.c > > Modified: head/sys/kern/kern_jail.c > ============================================================================== > --- head/sys/kern/kern_jail.c Tue Dec 30 20:31:37 2008 (r186614) > +++ head/sys/kern/kern_jail.c Tue Dec 30 20:39:47 2008 (r186615) > @@ -329,9 +329,11 @@ jail_copyin_ips(struct jail *j) > e_free_ip: > #ifdef INET6 > free(ip6, M_PRISON); > + j->ip6 = NULL; > #endif > #ifdef INET > free(ip4, M_PRISON); > + j->ip4 = NULL; > #endif > return (error); > } > -- Bjoern A. Zeeb The greatest risk is not taking one.