FreeBSD Bugzilla – Attachment 17334 Details for
Bug 31492
Panic in sysctl_remove_oid.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.95 KB, created by
Maxim Katargin
on 2001-10-25 16:30:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Maxim Katargin
Created:
2001-10-25 16:30:02 UTC
Size:
1.95 KB
patch
obsolete
>Index: kern/kern_sysctl.c >=================================================================== >RCS file: /ext/vcvs/src/sys/kern/kern_sysctl.c,v >retrieving revision 1.92.2.5 >diff -u -r1.92.2.5 kern_sysctl.c >--- kern/kern_sysctl.c 2001/06/18 23:48:13 1.92.2.5 >+++ kern/kern_sysctl.c 2001/10/25 15:26:31 >@@ -281,15 +281,26 @@ > */ > if ((oidp->oid_kind & CTLTYPE) == CTLTYPE_NODE) { > if (oidp->oid_refcnt == 1) { >- SLIST_FOREACH(p, SYSCTL_CHILDREN(oidp), oid_link) { >- if (!recurse) >+ if (!SLIST_EMPTY(SYSCTL_CHILDREN(oidp)) && !recurse) > return (ENOTEMPTY); >- error = sysctl_remove_oid(p, del, recurse); >- if (error) >- return (error); >- } >- if (del) >+ >+ if (del) { >+ while (!SLIST_EMPTY(SYSCTL_CHILDREN(oidp))) { >+ p = SLIST_FIRST(SYSCTL_CHILDREN(oidp)); >+ error = sysctl_remove_oid(p, del, recurse); >+ if (error) >+ return (error); >+ } > free(SYSCTL_CHILDREN(oidp), M_SYSCTLOID); >+ } else { >+ SLIST_FOREACH(p, SYSCTL_CHILDREN(oidp), oid_link) { >+ if (!recurse) >+ return (ENOTEMPTY); >+ error = sysctl_remove_oid(p, del, recurse); >+ if (error) >+ return (error); >+ } >+ } > } > } > if (oidp->oid_refcnt > 1 ) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 31492
: 17334