Page MenuHomeFreeBSD

sysctl(9): fix handling string tunables
ClosedPublic

Authored by kaktus on Apr 15 2020, 10:22 AM.
Tags
None
Referenced Files
F156653514: D24429.id.diff
Fri, May 15, 10:32 AM
F156612190: D24429.id70591.diff
Fri, May 15, 2:58 AM
F156578988: D24429.id70607.diff
Thu, May 14, 8:00 PM
Unknown Object (File)
Tue, May 12, 3:51 PM
Unknown Object (File)
Sat, May 9, 1:59 PM
Unknown Object (File)
Fri, May 8, 9:00 AM
Unknown Object (File)
Thu, May 7, 3:43 PM
Unknown Object (File)
Thu, May 7, 7:59 AM
Subscribers

Details

Summary

rS357614 changed internals of handling string sysctls, and inadvertently broke setting string tunables. Take them into account.

Reported by: jhb, np
PR: 245463

Test Plan

kenv hw.cxgbe.config_file="kern_tls"
kldload if_cxgbe

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Apr 15 2020, 2:24 PM
sys/kern/kern_sysctl.c
1657 ↗(On Diff #70591)

While there, fix style.

if ((oidp->oid_kind & CTLFLAG_WR) == 0 && (oidp->oid_kind & CTLFLAG_TUN) == 0

In fact I would write this as

if ((oidp->oid_kind & (CTLFLAG_WR | CTLFLAG_TUN)) == 0
This revision was automatically updated to reflect the committed changes.