Index: sys/kern/kern_sysctl.c =================================================================== --- sys/kern/kern_sysctl.c +++ sys/kern/kern_sysctl.c @@ -1023,12 +1023,16 @@ { int *name = (int *) arg1; u_int namelen = arg2; - int error = 0; + int error; struct sysctl_oid *oid; struct sysctl_oid_list *lsp = &sysctl__children, *lsp2; struct rm_priotracker tracker; char buf[10]; + error = sysctl_wire_old_buffer(req, 0); + if (error) + return (error); + SYSCTL_RLOCK(&tracker); while (namelen) { if (!lsp) { @@ -1265,6 +1269,10 @@ struct rm_priotracker tracker; int error; + error = sysctl_wire_old_buffer(req, 0); + if (error) + return (error); + SYSCTL_RLOCK(&tracker); error = sysctl_find_oid(arg1, arg2, &oid, NULL, req); if (error) @@ -1294,6 +1302,10 @@ struct rm_priotracker tracker; int error; + error = sysctl_wire_old_buffer(req, 0); + if (error) + return (error); + SYSCTL_RLOCK(&tracker); error = sysctl_find_oid(arg1, arg2, &oid, NULL, req); if (error) @@ -1319,6 +1331,10 @@ struct rm_priotracker tracker; int error; + error = sysctl_wire_old_buffer(req, 0); + if (error) + return (error); + SYSCTL_RLOCK(&tracker); error = sysctl_find_oid(arg1, arg2, &oid, NULL, req); if (error)