Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Dec 2012 11:10:01 GMT
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        freebsd-jail@FreeBSD.org
Subject:   Re: misc/174436: [jail] Jails with numbers as names don't work
Message-ID:  <201212181110.qBIBA1nl009352@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/174436; it has been noted by GNATS.

From: Mateusz Guzik <mjguzik@gmail.com>
To: Robert Schulze <rs@bytecamp.net>
Cc: bug-followup@FreeBSD.org
Subject: Re: misc/174436: [jail] Jails with numbers as names don't work
Date: Tue, 18 Dec 2012 12:08:30 +0100

 On Tue, Dec 18, 2012 at 12:01:43PM +0100, Robert Schulze wrote:
 > Hi,
 > 
 > Am 18.12.2012 11:18, schrieb Mateusz Guzik:
 > >I was reading wrong version of rc.d script. Name is passed with -n switch.
 > >
 > >Looks like we can get to prison_deref before RACCT is initialized for
 > >given prison.
 > >
 > >Please test the following:
 > >diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
 > >index 1dc43ab..7ca1d72 100644
 > >--- a/sys/kern/kern_jail.c
 > >+++ b/sys/kern/kern_jail.c
 > >@@ -2604,7 +2604,8 @@ prison_deref(struct prison *pr, int flags)
 > >                         cpuset_rel(pr->pr_cpuset);
 > >                 osd_jail_exit(pr);
 > >  #ifdef RACCT
 > >-               prison_racct_detach(pr);
 > >+               if (pr->pr_prison_racct != NULL)
 > >+                       prison_racct_detach(pr);
 > >  #endif
 > >                 free(pr, M_PRISON);
 > >
 > 
 > this fixed the panic, but the jail can still not be started:
 > 
 > # /etc/rc.d/jail onestart 0
 > Configuring jails:.
 > Starting jails: cannot start jail "0":
 > .
 
 Forgot to add:
 '0' is explicitly forbidden. Underlying reason is that you already have
 jail 0 - your main system.
 
 The only problem here was that cleanup was incorrect. And possibly
 documentation should note that '0' is already taken.
 -- 
 Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212181110.qBIBA1nl009352>