svn commit: r186615 - head/sys/kern

Bjoern A. Zeeb bz at FreeBSD.org
Tue Dec 30 22:10:07 UTC 2008


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.


More information about the svn-src-all mailing list