HomeFreeBSD

Define tunable instead of using CTLFLAG_RWTUN flag with kern.corefile.

Description

Define tunable instead of using CTLFLAG_RWTUN flag with kern.corefile.

The allproc_lock lock used in the sysctl_kern_corefile function is initialized
in the procinit function which is called after setting sysctl values at boot.
That means if we set kern.corefile at boot we will be trying to use
lock with is uninitialized and machine will crash.

If we define kern.corefile as tunable instead of using CTFLAG_RWTUN we will
not call the sysctl_kern_corefile function and we will not use an uninitialized
lock. When machine will boot then we will start using function depending on
the lock.

Reviewed by: pjd

Details

Provenance
oshogboAuthored on
Reviewer
pjd
Parents
rS301756: Tag 20160501-0289cde234a0
Branches
Unknown
Tags
Unknown