mirror of
https://github.com/opnsense/src.git
synced 2026-06-06 15:22:34 -04:00
sysctl: Panic on OID reuse
In CheriBSD we had a conflict in the KERN_PROC OID space and didn't notice for some time. Let's panic instead to make such conflicts easier to detect. Note that this doesn't affect conflicts arising from name collisions in OID_AUTO sysctls, which happen sometimes due to driver bugs. Reviewed by: brooks, kib, jhb MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D49351
This commit is contained in:
parent
ee9ce1078c
commit
d35c4cfad5
1 changed files with 1 additions and 1 deletions
|
|
@ -516,7 +516,7 @@ sysctl_register_oid(struct sysctl_oid *oidp)
|
|||
/* check for non-auto OID number collision */
|
||||
if (oidp->oid_number >= 0 && oidp->oid_number < CTL_AUTO_START &&
|
||||
oid_number >= CTL_AUTO_START) {
|
||||
printf("sysctl: OID number(%d) is already in use for '%s'\n",
|
||||
panic("sysctl: OID number(%d) is already in use for '%s'\n",
|
||||
oidp->oid_number, oidp->oid_name);
|
||||
}
|
||||
/* update the OID number, if any */
|
||||
|
|
|
|||
Loading…
Reference in a new issue