[Bug 196474] jls causes kernel panic

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Jan 4 05:43:03 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196474

Mateusz Guzik <mjg at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamie at FreeBSD.org

--- Comment #7 from Mateusz Guzik <mjg at FreeBSD.org> ---
The following does the trick for me.

Adding the author to cc:.

diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index f8ae0e6..9ca0616 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -2028,13 +2028,13 @@ kern_jail_get(struct thread *td, struct uio *optuio,
int flags)
                goto done_deref;
 #ifdef INET
        error = vfs_setopt_part(opts, "ip4.addr", pr->pr_ip4,
-           pr->pr_ip4s * sizeof(*pr->pr_ip4));
+           pr->pr_ip4s == -1 ? 0 : pr->pr_ip4s * sizeof(*pr->pr_ip4));
        if (error != 0 && error != ENOENT)
                goto done_deref;
 #endif
 #ifdef INET6
        error = vfs_setopt_part(opts, "ip6.addr", pr->pr_ip6,
-           pr->pr_ip6s * sizeof(*pr->pr_ip6));
+           pr->pr_ip6s == -1 ? 0 : pr->pr_ip6s * sizeof(*pr->pr_ip6));
        if (error != 0 && error != ENOENT)
                goto done_deref;
 #endif

With this the outpus is:
   JID  IP Address      Hostname                      Path
     1  -                                             /

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list