Date: Tue, 30 Dec 2008 22:08:26 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: Peter Holm <pho@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186615 - head/sys/kern Message-ID: <20081230214755.Q28465@maildrop.int.zabbadoz.net> In-Reply-To: <200812302039.mBUKdmHC004512@svn.freebsd.org> References: <200812302039.mBUKdmHC004512@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081230214755.Q28465>