[Bug 196474] jls causes kernel panic
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Jan 8 22:41:53 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196474
Jamie Gritton <jamie at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|freebsd-bugs at FreeBSD.org |jamie at FreeBSD.org
Status|New |In Progress
--- Comment #10 from Jamie Gritton <jamie at FreeBSD.org> ---
Created attachment 151509
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=151509&action=edit
Don't set pr_ip4s to -1
I'm with Bjoern in that I see the problem on the jail_set end, and not the
jail_get end. But I wouldn't want to make the command fail. It seems a
reasonable analog to (the correct) "ip4=disable", and in fact ends up treating
it the same way in every respect except the jail_get panic.
It's never proper for pr_ip4 to have a negative value. It used to be, before
the PR_IP4_DISABLE flag, and I would test for it in the proper places. But I
was incorrect to keep that vestige when I added the flag. I must have
considered it proper at the time since I took pains to keep it, but a
years-later code review concludes differently.
My patch merely gets rid of the -1 that doesn't belong.
After that, the only difference between an ip4-disabled jail and one that is
set to no addresses is the PR_IP4_DISABLED flag. Both have no addresses, and
will not admit to supporting IPV4. In fact, PR_IP4_DISABLED, which is only
ever referenced in kern_jail.c, becomes write-only and useless. I plan to
issue a second patch which removes it entirely. But that isn't quite part of
this bug.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list