diff -ur /home/refugee/freebsd/current/src/sys/alpha/alpha/machdep.c repl/alpha/alpha/machdep.c --- /home/refugee/freebsd/current/src/sys/alpha/alpha/machdep.c Wed Dec 8 20:39:47 2004 +++ repl/alpha/alpha/machdep.c Tue Dec 14 00:49:39 2004 @@ -163,10 +163,10 @@ vm_offset_t proc0kstack; char machine[] = "alpha"; -SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, ""); +SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "", &Giant); static char cpu_model[128]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, ""); +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, "", &Giant); #ifdef DDB extern vm_offset_t ksym_start, ksym_end; @@ -177,13 +177,13 @@ int alpha_unaligned_sigbus = 0; /* don't SIGBUS on fixed-up accesses */ SYSCTL_INT(_machdep, CPU_UNALIGNED_PRINT, unaligned_print, - CTLFLAG_RW, &alpha_unaligned_print, 0, ""); + CTLFLAG_RW, &alpha_unaligned_print, 0, "", &Giant); SYSCTL_INT(_machdep, CPU_UNALIGNED_FIX, unaligned_fix, - CTLFLAG_RW, &alpha_unaligned_fix, 0, ""); + CTLFLAG_RW, &alpha_unaligned_fix, 0, "", &Giant); SYSCTL_INT(_machdep, CPU_UNALIGNED_SIGBUS, unaligned_sigbus, - CTLFLAG_RW, &alpha_unaligned_sigbus, 0, ""); + CTLFLAG_RW, &alpha_unaligned_sigbus, 0, "", &Giant); static void cpu_startup(void *); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) @@ -2233,20 +2233,20 @@ { int error; error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, - req); + req, &Giant); if (!error && req->newptr) resettodr(); return (error); } SYSCTL_PROC(_machdep, CPU_ADJKERNTZ, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", ""); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "", &Giant); SYSCTL_INT(_machdep, CPU_DISRTCSET, disable_rtc_set, - CTLFLAG_RW, &disable_rtc_set, 0, ""); + CTLFLAG_RW, &disable_rtc_set, 0, "", &Giant); SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, - CTLFLAG_RW, &wall_cmos_clock, 0, ""); + CTLFLAG_RW, &wall_cmos_clock, 0, "", &Giant); void alpha_fpstate_check(struct thread *td) diff -ur /home/refugee/freebsd/current/src/sys/alpha/pci/pcibus.c repl/alpha/pci/pcibus.c --- /home/refugee/freebsd/current/src/sys/alpha/pci/pcibus.c Sun Oct 31 04:50:16 2004 +++ repl/alpha/pci/pcibus.c Tue Dec 14 00:49:39 2004 @@ -64,19 +64,19 @@ long chipset_dense = 0; long chipset_hae_mask = 0; -SYSCTL_NODE(_hw, OID_AUTO, chipset, CTLFLAG_RW, 0, "PCI chipset information"); +SYSCTL_NODE(_hw, OID_AUTO, chipset, CTLFLAG_RW, 0, "PCI chipset information", NULL); SYSCTL_STRING(_hw_chipset, OID_AUTO, type, CTLFLAG_RD, chipset_type, 0, - "PCI chipset type"); + "PCI chipset type", &Giant); SYSCTL_INT(_hw_chipset, OID_AUTO, bwx, CTLFLAG_RD, &chipset_bwx, 0, - "PCI chipset supports BWX access"); + "PCI chipset supports BWX access", &Giant); SYSCTL_LONG(_hw_chipset, OID_AUTO, ports, CTLFLAG_RD, &chipset_ports, 0, - "PCI chipset port address"); + "PCI chipset port address", &Giant); SYSCTL_LONG(_hw_chipset, OID_AUTO, memory, CTLFLAG_RD, &chipset_memory, 0, - "PCI chipset memory address"); + "PCI chipset memory address", &Giant); SYSCTL_LONG(_hw_chipset, OID_AUTO, dense, CTLFLAG_RD, &chipset_dense, 0, - "PCI chipset dense memory address"); + "PCI chipset dense memory address", &Giant); SYSCTL_LONG(_hw_chipset, OID_AUTO, hae_mask, CTLFLAG_RD, &chipset_hae_mask, 0, - "PCI chipset mask for HAE register"); + "PCI chipset mask for HAE register", &Giant); int alpha_pci_route_interrupt(device_t bus, device_t dev, int pin) diff -ur /home/refugee/freebsd/current/src/sys/amd64/acpica/OsdEnvironment.c repl/amd64/acpica/OsdEnvironment.c --- /home/refugee/freebsd/current/src/sys/amd64/acpica/OsdEnvironment.c Sun Oct 31 04:53:01 2004 +++ repl/amd64/acpica/OsdEnvironment.c Tue Dec 14 00:49:58 2004 @@ -40,7 +40,7 @@ static u_long amd64_acpi_root; SYSCTL_ULONG(_machdep, OID_AUTO, acpi_root, CTLFLAG_RD, &amd64_acpi_root, 0, - "The physical address of the RSDP"); + "The physical address of the RSDP", &Giant); ACPI_STATUS AcpiOsInitialize(void) diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/amd64_mem.c repl/amd64/amd64/amd64_mem.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/amd64_mem.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/amd64/amd64_mem.c Tue Dec 14 00:49:58 2004 @@ -65,7 +65,7 @@ static int mtrrs_disabled; TUNABLE_INT("machdep.disable_mtrrs", &mtrrs_disabled); SYSCTL_INT(_machdep, OID_AUTO, disable_mtrrs, CTLFLAG_RDTUN, - &mtrrs_disabled, 0, "Disable amd64 MTRRs."); + &mtrrs_disabled, 0, "Disable amd64 MTRRs.", &Giant); static void amd64_mrinit(struct mem_range_softc *sc); static int amd64_mrset(struct mem_range_softc *sc, diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/busdma_machdep.c repl/amd64/amd64/busdma_machdep.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/busdma_machdep.c Wed Dec 8 20:39:47 2004 +++ repl/amd64/amd64/busdma_machdep.c Tue Dec 14 00:49:58 2004 @@ -107,9 +107,9 @@ static STAILQ_HEAD(, bounce_zone) bounce_zone_list; static bus_addr_t bounce_lowaddr = BUS_SPACE_MAXADDR; -SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters"); +SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters", NULL); SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0, - "Total bounce pages"); + "Total bounce pages", &Giant); struct bus_dmamap { struct bp_list bpages; @@ -903,13 +903,13 @@ static struct sysctl_ctx_list * busdma_sysctl_tree(struct bounce_zone *bz) { - return (&bz->sysctl_tree); + return (&bz->sysctl_tree, &Giant); } static struct sysctl_oid * busdma_sysctl_tree_top(struct bounce_zone *bz) { - return (bz->sysctl_tree_top); + return (bz->sysctl_tree_top, &Giant); } static int @@ -944,48 +944,48 @@ STAILQ_INSERT_TAIL(&bounce_zone_list, bz, links); dmat->bounce_zone = bz; - sysctl_ctx_init(&bz->sysctl_tree); + sysctl_ctx_init(&bz->sysctl_tree, &Giant); bz->sysctl_tree_top = SYSCTL_ADD_NODE(&bz->sysctl_tree, SYSCTL_STATIC_CHILDREN(_hw_busdma), OID_AUTO, bz->zoneid, - CTLFLAG_RD, 0, ""); + CTLFLAG_RD, 0, "", &Giant); if (bz->sysctl_tree_top == NULL) { - sysctl_ctx_free(&bz->sysctl_tree); + sysctl_ctx_free(&bz->sysctl_tree, &Giant); return (0); /* XXX error code? */ } SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "total_bpages", CTLFLAG_RD, &bz->total_bpages, 0, - "Totoal bounce pages"); + "Totoal bounce pages", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "free_bpages", CTLFLAG_RD, &bz->free_bpages, 0, - "Free bounce pages"); + "Free bounce pages", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "reserved_bpages", CTLFLAG_RD, &bz->reserved_bpages, 0, - "Reserved bounce pages"); + "Reserved bounce pages", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "active_bpages", CTLFLAG_RD, &bz->active_bpages, 0, - "Active bounce pages"); + "Active bounce pages", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "total_bounced", CTLFLAG_RD, &bz->total_bounced, 0, - "Total bounce requests"); + "Total bounce requests", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "total_deferred", CTLFLAG_RD, &bz->total_deferred, 0, - "Total bounce requests that were deferred"); + "Total bounce requests that were deferred", &Giant); SYSCTL_ADD_STRING(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, ""); + "lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, "", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "alignment", CTLFLAG_RD, &bz->alignment, 0, ""); + "alignment", CTLFLAG_RD, &bz->alignment, 0, "", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "boundary", CTLFLAG_RD, &bz->boundary, 0, ""); + "boundary", CTLFLAG_RD, &bz->boundary, 0, "", &Giant); return (0); } diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/fpu.c repl/amd64/amd64/fpu.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/fpu.c Wed Dec 8 20:39:47 2004 +++ repl/amd64/amd64/fpu.c Tue Dec 14 00:49:58 2004 @@ -99,7 +99,7 @@ int hw_float = 1; SYSCTL_INT(_hw,HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, &hw_float, 0, - "Floatingpoint instructions executed in hardware"); + "Floatingpoint instructions executed in hardware", &Giant); static struct savefpu fpu_cleanstate; static bool_t fpu_cleanstate_ready; diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/identcpu.c repl/amd64/amd64/identcpu.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/identcpu.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/amd64/identcpu.c Tue Dec 14 00:49:58 2004 @@ -75,15 +75,15 @@ int cpu_class; char machine[] = "amd64"; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, - machine, 0, "Machine class"); + machine, 0, "Machine class", &Giant); static char cpu_model[128]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, - cpu_model, 0, "Machine model"); + cpu_model, 0, "Machine model", &Giant); static int hw_clockrate; SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, - &hw_clockrate, 0, "CPU instruction clock rate"); + &hw_clockrate, 0, "CPU instruction clock rate", &Giant); static char cpu_brand[48]; diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/initcpu.c repl/amd64/amd64/initcpu.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/initcpu.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/amd64/initcpu.c Tue Dec 14 00:49:58 2004 @@ -46,7 +46,7 @@ static int hw_instruction_sse; SYSCTL_INT(_hw, OID_AUTO, instruction_sse, CTLFLAG_RD, - &hw_instruction_sse, 0, "SIMD/MMX2 instructions available in CPU"); + &hw_instruction_sse, 0, "SIMD/MMX2 instructions available in CPU", &Giant); int cpu; /* Are we 386, 386sx, 486, etc? */ u_int cpu_feature; /* Feature flags */ diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/machdep.c repl/amd64/amd64/machdep.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/machdep.c Wed Dec 8 20:39:47 2004 +++ repl/amd64/amd64/machdep.c Tue Dec 14 00:49:58 2004 @@ -477,7 +477,7 @@ */ static int cpu_idle_hlt = 1; SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, - &cpu_idle_hlt, 0, "Idle loop HLT enable"); + &cpu_idle_hlt, 0, "Idle loop HLT enable", &Giant); static void cpu_idle_default(void) @@ -598,20 +598,20 @@ { int error; error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, - req); + req, &Giant); if (!error && req->newptr) resettodr(); return (error); } SYSCTL_PROC(_machdep, CPU_ADJKERNTZ, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", ""); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "", &Giant); SYSCTL_INT(_machdep, CPU_DISRTCSET, disable_rtc_set, - CTLFLAG_RW, &disable_rtc_set, 0, ""); + CTLFLAG_RW, &disable_rtc_set, 0, "", &Giant); SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, - CTLFLAG_RW, &wall_cmos_clock, 0, ""); + CTLFLAG_RW, &wall_cmos_clock, 0, "", &Giant); /* * Initialize 386 and configure to run kernel diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/mp_machdep.c repl/amd64/amd64/mp_machdep.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/mp_machdep.c Sun Nov 14 03:55:57 2004 +++ repl/amd64/amd64/mp_machdep.c Tue Dec 14 00:49:58 2004 @@ -1016,7 +1016,7 @@ int error; mask = hlt_cpus_mask; - error = sysctl_handle_int(oidp, &mask, 0, req); + error = sysctl_handle_int(oidp, &mask, 0, req, &Giant); if (error || !req->newptr) return (error); @@ -1033,7 +1033,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, hlt_cpus, CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_hlt_cpus, "IU", - "Bitmap of CPUs to halt. 101 (binary) will halt CPUs 0 and 2."); + "Bitmap of CPUs to halt. 101 (binary) will halt CPUs 0 and 2.", &Giant); static int sysctl_hlt_logical_cpus(SYSCTL_HANDLER_ARGS) @@ -1041,7 +1041,7 @@ int disable, error; disable = hlt_logical_cpus; - error = sysctl_handle_int(oidp, &disable, 0, req); + error = sysctl_handle_int(oidp, &disable, 0, req, &Giant); if (error || !req->newptr) return (error); @@ -1064,7 +1064,7 @@ if (logical_cpus_mask != 0) { TUNABLE_INT_FETCH("machdep.hlt_logical_cpus", &hlt_logical_cpus); - sysctl_ctx_init(&logical_cpu_clist); + sysctl_ctx_init(&logical_cpu_clist, &Giant); SYSCTL_ADD_PROC(&logical_cpu_clist, SYSCTL_STATIC_CHILDREN(_machdep), OID_AUTO, "hlt_logical_cpus", CTLTYPE_INT|CTLFLAG_RW, 0, 0, @@ -1072,7 +1072,7 @@ SYSCTL_ADD_UINT(&logical_cpu_clist, SYSCTL_STATIC_CHILDREN(_machdep), OID_AUTO, "logical_cpus_mask", CTLTYPE_INT|CTLFLAG_RD, - &logical_cpus_mask, 0, ""); + &logical_cpus_mask, 0, "", &Giant); if (hlt_logical_cpus) hlt_cpus_mask |= logical_cpus_mask; diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/mp_watchdog.c repl/amd64/amd64/mp_watchdog.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/mp_watchdog.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/amd64/mp_watchdog.c Tue Dec 14 00:49:58 2004 @@ -69,7 +69,7 @@ static int watchdog_nmi = 1; SYSCTL_INT(_debug, OID_AUTO, watchdog_nmi, CTLFLAG_RW, &watchdog_nmi, 0, - "IPI the boot processor with an NMI to enter the debugger"); + "IPI the boot processor with an NMI to enter the debugger", &Giant); static struct callout watchdog_callout; @@ -118,7 +118,7 @@ int error, temp; temp = watchdog_cpu; - error = sysctl_handle_int(oidp, &temp, 0, req); + error = sysctl_handle_int(oidp, &temp, 0, req, &Giant); if (error) return (error); @@ -142,7 +142,7 @@ return (0); } SYSCTL_PROC(_debug, OID_AUTO, watchdog, CTLTYPE_INT|CTLFLAG_RW, 0, 0, - sysctl_watchdog, "IU", ""); + sysctl_watchdog, "IU", "", &Giant); /* * A badly behaved sysctl that leaks the sched lock when written to. Then @@ -156,7 +156,7 @@ int error, temp; temp = 0; - error = sysctl_handle_int(oidp, &temp, 0, req); + error = sysctl_handle_int(oidp, &temp, 0, req, &Giant); if (error) return (error); @@ -170,7 +170,7 @@ return (0); } SYSCTL_PROC(_debug, OID_AUTO, leak_schedlock, CTLTYPE_INT|CTLFLAG_RW, 0, 0, - sysctl_leak_schedlock, "IU", ""); + sysctl_leak_schedlock, "IU", "", &Giant); /* * Drop into the debugger by sending an IPI NMI to the boot processor. diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/pmap.c repl/amd64/amd64/pmap.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/pmap.c Wed Dec 8 20:39:47 2004 +++ repl/amd64/amd64/pmap.c Tue Dec 14 00:49:58 2004 @@ -1321,20 +1321,20 @@ { unsigned long ksize = VM_MAX_KERNEL_ADDRESS - KERNBASE; - return sysctl_handle_long(oidp, &ksize, 0, req); + return sysctl_handle_long(oidp, &ksize, 0, req, &Giant); } SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG|CTLFLAG_RD, - 0, 0, kvm_size, "IU", "Size of KVM"); + 0, 0, kvm_size, "IU", "Size of KVM", &Giant); static int kvm_free(SYSCTL_HANDLER_ARGS) { unsigned long kfree = VM_MAX_KERNEL_ADDRESS - kernel_vm_end; - return sysctl_handle_long(oidp, &kfree, 0, req); + return sysctl_handle_long(oidp, &kfree, 0, req, &Giant); } SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD, - 0, 0, kvm_free, "IU", "Amount of KVM free"); + 0, 0, kvm_free, "IU", "Amount of KVM free", &Giant); /* * grow the number of kernel page table entries, if needed diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/prof_machdep.c repl/amd64/amd64/prof_machdep.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/prof_machdep.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/amd64/prof_machdep.c Tue Dec 14 00:49:58 2004 @@ -290,7 +290,7 @@ clock += pmc.pmc_event; } #endif - error = sysctl_handle_opaque(oidp, &clock, sizeof clock, req); + error = sysctl_handle_opaque(oidp, &clock, sizeof clock, req, &Giant); if (error == 0 && req->newptr != NULL) { #if defined(PERFMON) && defined(I586_PMC_GUPROF) if (clock >= CPUTIME_CLOCK_I586_PMC) { @@ -316,7 +316,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, cputime_clock, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_cputime_clock, "I", ""); + 0, sizeof(u_int), sysctl_machdep_cputime_clock, "I", "", &Giant); /* * The start and stop routines need not be here since we turn off profiling diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/trap.c repl/amd64/amd64/trap.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/trap.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/amd64/trap.c Tue Dec 14 00:49:58 2004 @@ -131,11 +131,11 @@ #ifdef KDB static int kdb_on_nmi = 1; SYSCTL_INT(_machdep, OID_AUTO, kdb_on_nmi, CTLFLAG_RW, - &kdb_on_nmi, 0, "Go to KDB on NMI"); + &kdb_on_nmi, 0, "Go to KDB on NMI", &Giant); #endif static int panic_on_nmi = 1; SYSCTL_INT(_machdep, OID_AUTO, panic_on_nmi, CTLFLAG_RW, - &panic_on_nmi, 0, "Panic on NMI"); + &panic_on_nmi, 0, "Panic on NMI", &Giant); #ifdef WITNESS extern char *syscallnames[]; diff -ur /home/refugee/freebsd/current/src/sys/amd64/amd64/tsc.c repl/amd64/amd64/tsc.c --- /home/refugee/freebsd/current/src/sys/amd64/amd64/tsc.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/amd64/tsc.c Tue Dec 14 00:49:58 2004 @@ -47,7 +47,7 @@ #ifdef SMP static int smp_tsc; SYSCTL_INT(_kern_timecounter, OID_AUTO, smp_tsc, CTLFLAG_RDTUN, &smp_tsc, 0, - "Indicates whether the TSC is safe to use in SMP mode"); + "Indicates whether the TSC is safe to use in SMP mode", &Giant); TUNABLE_INT("kern.timecounter.smp_tsc", &smp_tsc); #endif @@ -112,7 +112,7 @@ if (tsc_timecounter.tc_frequency == 0) return (EOPNOTSUPP); freq = tsc_freq; - error = sysctl_handle_int(oidp, &freq, sizeof(freq), req); + error = sysctl_handle_int(oidp, &freq, sizeof(freq), req, &Giant); if (error == 0 && req->newptr != NULL) { tsc_freq = freq; tsc_timecounter.tc_frequency = tsc_freq; @@ -121,7 +121,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_LONG | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_tsc_freq, "IU", ""); + 0, sizeof(u_int), sysctl_machdep_tsc_freq, "IU", "", &Giant); static unsigned tsc_get_timecount(struct timecounter *tc) diff -ur /home/refugee/freebsd/current/src/sys/amd64/isa/clock.c repl/amd64/isa/clock.c --- /home/refugee/freebsd/current/src/sys/amd64/isa/clock.c Sun Oct 31 04:53:05 2004 +++ repl/amd64/isa/clock.c Tue Dec 14 00:49:58 2004 @@ -798,7 +798,7 @@ * is is too generic. Should use it everywhere. */ freq = timer_freq; - error = sysctl_handle_int(oidp, &freq, sizeof(freq), req); + error = sysctl_handle_int(oidp, &freq, sizeof(freq), req, &Giant); if (error == 0 && req->newptr != NULL) { set_timer_freq(freq, hz); i8254_timecounter.tc_frequency = freq; @@ -807,7 +807,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, i8254_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_i8254_freq, "IU", ""); + 0, sizeof(u_int), sysctl_machdep_i8254_freq, "IU", "", &Giant); static unsigned i8254_get_timecount(struct timecounter *tc) diff -ur /home/refugee/freebsd/current/src/sys/amd64/linux32/linux32_sysvec.c repl/amd64/linux32/linux32_sysvec.c --- /home/refugee/freebsd/current/src/sys/amd64/linux32/linux32_sysvec.c Wed Dec 8 20:39:47 2004 +++ repl/amd64/linux32/linux32_sysvec.c Tue Dec 14 00:49:58 2004 @@ -928,13 +928,13 @@ static u_long linux32_maxdsiz = LINUX32_MAXDSIZ; SYSCTL_ULONG(_compat_linux32, OID_AUTO, maxdsiz, CTLFLAG_RW, - &linux32_maxdsiz, 0, ""); + &linux32_maxdsiz, 0, "", &Giant); static u_long linux32_maxssiz = LINUX32_MAXSSIZ; SYSCTL_ULONG(_compat_linux32, OID_AUTO, maxssiz, CTLFLAG_RW, - &linux32_maxssiz, 0, ""); + &linux32_maxssiz, 0, "", &Giant); static u_long linux32_maxvmem = LINUX32_MAXVMEM; SYSCTL_ULONG(_compat_linux32, OID_AUTO, maxvmem, CTLFLAG_RW, - &linux32_maxvmem, 0, ""); + &linux32_maxvmem, 0, "", &Giant); /* * XXX copied from ia32_sysvec.c. diff -ur /home/refugee/freebsd/current/src/sys/amd64/pci/pci_bus.c repl/amd64/pci/pci_bus.c --- /home/refugee/freebsd/current/src/sys/amd64/pci/pci_bus.c Sun Nov 14 03:55:57 2004 +++ repl/amd64/pci/pci_bus.c Tue Dec 14 00:49:58 2004 @@ -271,7 +271,7 @@ SYSCTL_ULONG(_hw_pci, OID_AUTO, host_mem_start, CTLFLAG_RDTUN, &legacy_host_mem_start, 0x80000000, "Limit the host bridge memory to being above this address. Must be\n\ -set at boot via a tunable."); +set at boot via a tunable.", &Giant); static struct resource * legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, diff -ur /home/refugee/freebsd/current/src/sys/arm/arm/identcpu.c repl/arm/arm/identcpu.c --- /home/refugee/freebsd/current/src/sys/arm/arm/identcpu.c Sun Nov 14 03:55:57 2004 +++ repl/arm/arm/identcpu.c Tue Dec 14 00:49:38 2004 @@ -58,7 +58,7 @@ char machine[] = "arm"; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, - machine, 0, "Machine class"); + machine, 0, "Machine class", &Giant); enum cpu_class { CPU_CLASS_NONE, CPU_CLASS_ARM2, diff -ur /home/refugee/freebsd/current/src/sys/cam/cam.c repl/cam/cam.c --- /home/refugee/freebsd/current/src/sys/cam/cam.c Sun Oct 31 04:50:27 2004 +++ repl/cam/cam.c Tue Dec 14 00:49:42 2004 @@ -100,7 +100,7 @@ sizeof(cam_status_table)/sizeof(*cam_status_table); #ifdef _KERNEL -SYSCTL_NODE(_kern, OID_AUTO, cam, CTLFLAG_RD, 0, "CAM Subsystem"); +SYSCTL_NODE(_kern, OID_AUTO, cam, CTLFLAG_RD, 0, "CAM Subsystem", NULL); #endif void diff -ur /home/refugee/freebsd/current/src/sys/cam/scsi/scsi_all.c repl/cam/scsi/scsi_all.c --- /home/refugee/freebsd/current/src/sys/cam/scsi/scsi_all.c Sun Oct 31 04:50:27 2004 +++ repl/cam/scsi/scsi_all.c Tue Dec 14 00:49:42 2004 @@ -97,7 +97,7 @@ const struct asc_table_entry **); #ifdef _KERNEL static void init_scsi_delay(void); -static int sysctl_scsi_delay(SYSCTL_HANDLER_ARGS); +static int sysctl_scsi_delay(SYSCTL_HANDLER_ARGS, &Giant); static int set_scsi_delay(int delay); #endif @@ -3014,14 +3014,14 @@ int error, delay; delay = scsi_delay; - error = sysctl_handle_int(oidp, &delay, sizeof(delay), req); + error = sysctl_handle_int(oidp, &delay, sizeof(delay), req, &Giant); if (error != 0 || req->newptr == NULL) return (error); return (set_scsi_delay(delay)); } SYSCTL_PROC(_kern_cam, OID_AUTO, scsi_delay, CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_scsi_delay, "I", - "Delay to allow devices to settle after a SCSI bus reset (ms)"); + "Delay to allow devices to settle after a SCSI bus reset (ms)", &Giant); static int set_scsi_delay(int delay) diff -ur /home/refugee/freebsd/current/src/sys/cam/scsi/scsi_cd.c repl/cam/scsi/scsi_cd.c --- /home/refugee/freebsd/current/src/sys/cam/scsi/scsi_cd.c Sun Oct 31 04:50:26 2004 +++ repl/cam/scsi/scsi_cd.c Tue Dec 14 00:49:42 2004 @@ -303,13 +303,13 @@ static int changer_min_busy_seconds = CHANGER_MIN_BUSY_SECONDS; static int changer_max_busy_seconds = CHANGER_MAX_BUSY_SECONDS; -SYSCTL_NODE(_kern_cam, OID_AUTO, cd, CTLFLAG_RD, 0, "CAM CDROM driver"); -SYSCTL_NODE(_kern_cam_cd, OID_AUTO, changer, CTLFLAG_RD, 0, "CD Changer"); +SYSCTL_NODE(_kern_cam, OID_AUTO, cd, CTLFLAG_RD, 0, "CAM CDROM driver", NULL); +SYSCTL_NODE(_kern_cam_cd, OID_AUTO, changer, CTLFLAG_RD, 0, "CD Changer", NULL); SYSCTL_INT(_kern_cam_cd_changer, OID_AUTO, min_busy_seconds, CTLFLAG_RW, - &changer_min_busy_seconds, 0, "Minimum changer scheduling quantum"); + &changer_min_busy_seconds, 0, "Minimum changer scheduling quantum", &Giant); TUNABLE_INT("kern.cam.cd.changer.min_busy_seconds", &changer_min_busy_seconds); SYSCTL_INT(_kern_cam_cd_changer, OID_AUTO, max_busy_seconds, CTLFLAG_RW, - &changer_max_busy_seconds, 0, "Maximum changer scheduling quantum"); + &changer_max_busy_seconds, 0, "Maximum changer scheduling quantum", &Giant); TUNABLE_INT("kern.cam.cd.changer.max_busy_seconds", &changer_max_busy_seconds); struct cdchanger { @@ -424,7 +424,7 @@ if ((softc->flags & CD_FLAG_SCTX_INIT) != 0 && sysctl_ctx_free(&softc->sysctl_ctx) != 0) { - xpt_print_path(periph->path); + xpt_print_path(periph->path, &Giant); printf("can't remove sysctl context\n"); } @@ -582,14 +582,14 @@ mtx_lock(&Giant); - sysctl_ctx_init(&softc->sysctl_ctx); + sysctl_ctx_init(&softc->sysctl_ctx, &Giant); softc->flags |= CD_FLAG_SCTX_INIT; softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_kern_cam_cd), OID_AUTO, - tmpstr2, CTLFLAG_RD, 0, tmpstr); + tmpstr2, CTLFLAG_RD, 0, tmpstr, &Giant); if (softc->sysctl_tree == NULL) { - printf("cdsysctlinit: unable to allocate sysctl tree\n"); + printf("cdsysctlinit: unable to allocate sysctl tree\n", &Giant); return; } @@ -616,7 +616,7 @@ value = *(int *)arg1; - error = sysctl_handle_int(oidp, &value, 0, req); + error = sysctl_handle_int(oidp, &value, 0, req, &Giant); if ((error != 0) || (req->newptr == NULL)) diff -ur /home/refugee/freebsd/current/src/sys/cam/scsi/scsi_da.c repl/cam/scsi/scsi_da.c --- /home/refugee/freebsd/current/src/sys/cam/scsi/scsi_da.c Sun Oct 31 04:50:26 2004 +++ repl/cam/scsi/scsi_da.c Tue Dec 14 00:49:42 2004 @@ -352,10 +352,10 @@ SYSCTL_NODE(_kern_cam, OID_AUTO, da, CTLFLAG_RD, 0, "CAM Direct Access Disk driver"); SYSCTL_INT(_kern_cam_da, OID_AUTO, retry_count, CTLFLAG_RW, - &da_retry_count, 0, "Normal I/O retry count"); + &da_retry_count, 0, "Normal I/O retry count", &Giant); TUNABLE_INT("kern.cam.da.retry_count", &da_retry_count); SYSCTL_INT(_kern_cam_da, OID_AUTO, default_timeout, CTLFLAG_RW, - &da_default_timeout, 0, "Normal I/O timeout (in seconds)"); + &da_default_timeout, 0, "Normal I/O timeout (in seconds)", &Giant); TUNABLE_INT("kern.cam.da.default_timeout", &da_default_timeout); /* @@ -779,7 +779,7 @@ */ if ((softc->flags & DA_FLAG_SCTX_INIT) != 0 && sysctl_ctx_free(&softc->sysctl_ctx) != 0) { - xpt_print_path(periph->path); + xpt_print_path(periph->path, &Giant); printf("can't remove sysctl context\n"); } disk_destroy(softc->disk); @@ -864,13 +864,13 @@ snprintf(tmpstr2, sizeof(tmpstr2), "%d", periph->unit_number); mtx_lock(&Giant); - sysctl_ctx_init(&softc->sysctl_ctx); + sysctl_ctx_init(&softc->sysctl_ctx, &Giant); softc->flags |= DA_FLAG_SCTX_INIT; softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_kern_cam_da), OID_AUTO, tmpstr2, - CTLFLAG_RD, 0, tmpstr); + CTLFLAG_RD, 0, tmpstr, &Giant); if (softc->sysctl_tree == NULL) { - printf("dasysctlinit: unable to allocate sysctl tree\n"); + printf("dasysctlinit: unable to allocate sysctl tree\n", &Giant); return; } @@ -893,7 +893,7 @@ value = *(int *)arg1; - error = sysctl_handle_int(oidp, &value, 0, req); + error = sysctl_handle_int(oidp, &value, 0, req, &Giant); if ((error != 0) || (req->newptr == NULL)) diff -ur /home/refugee/freebsd/current/src/sys/compat/ia32/ia32_sysvec.c repl/compat/ia32/ia32_sysvec.c --- /home/refugee/freebsd/current/src/sys/compat/ia32/ia32_sysvec.c Sun Oct 31 04:52:27 2004 +++ repl/compat/ia32/ia32_sysvec.c Tue Dec 14 00:49:53 2004 @@ -97,7 +97,7 @@ extern struct sysent freebsd32_sysent[]; -SYSCTL_NODE(_compat, OID_AUTO, ia32, CTLFLAG_RW, 0, "ia32 mode"); +SYSCTL_NODE(_compat, OID_AUTO, ia32, CTLFLAG_RW, 0, "ia32 mode", NULL); struct sysentvec ia32_freebsd_sysvec = { FREEBSD32_SYS_MAXSYSCALL, @@ -271,11 +271,11 @@ } static u_long ia32_maxdsiz = IA32_MAXDSIZ; -SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxdsiz, CTLFLAG_RW, &ia32_maxdsiz, 0, ""); +SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxdsiz, CTLFLAG_RW, &ia32_maxdsiz, 0, "", &Giant); static u_long ia32_maxssiz = IA32_MAXSSIZ; -SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxssiz, CTLFLAG_RW, &ia32_maxssiz, 0, ""); +SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxssiz, CTLFLAG_RW, &ia32_maxssiz, 0, "", &Giant); static u_long ia32_maxvmem = IA32_MAXVMEM; -SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxvmem, CTLFLAG_RW, &ia32_maxvmem, 0, ""); +SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxvmem, CTLFLAG_RW, &ia32_maxvmem, 0, "", &Giant); static void ia32_fixlimits(struct image_params *imgp) diff -ur /home/refugee/freebsd/current/src/sys/compat/linux/linux_mib.c repl/compat/linux/linux_mib.c --- /home/refugee/freebsd/current/src/sys/compat/linux/linux_mib.c Sun Oct 31 04:52:26 2004 +++ repl/compat/linux/linux_mib.c Tue Dec 14 00:49:52 2004 @@ -69,7 +69,7 @@ int error; linux_get_osname(req->td, osname); - error = sysctl_handle_string(oidp, osname, LINUX_MAX_UTSNAME, req); + error = sysctl_handle_string(oidp, osname, LINUX_MAX_UTSNAME, req, &Giant); if (error || req->newptr == NULL) return (error); error = linux_set_osname(req->td, osname); @@ -79,7 +79,7 @@ SYSCTL_PROC(_compat_linux, OID_AUTO, osname, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON, 0, 0, linux_sysctl_osname, "A", - "Linux kernel OS name"); + "Linux kernel OS name", &Giant); static char linux_osrelease[LINUX_MAX_UTSNAME] = "2.4.2"; @@ -90,7 +90,7 @@ int error; linux_get_osrelease(req->td, osrelease); - error = sysctl_handle_string(oidp, osrelease, LINUX_MAX_UTSNAME, req); + error = sysctl_handle_string(oidp, osrelease, LINUX_MAX_UTSNAME, req, &Giant); if (error || req->newptr == NULL) return (error); error = linux_set_osrelease(req->td, osrelease); @@ -100,7 +100,7 @@ SYSCTL_PROC(_compat_linux, OID_AUTO, osrelease, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON, 0, 0, linux_sysctl_osrelease, "A", - "Linux kernel OS release"); + "Linux kernel OS release", &Giant); static int linux_oss_version = 0x030600; @@ -111,7 +111,7 @@ int error; oss_version = linux_get_oss_version(req->td); - error = sysctl_handle_int(oidp, &oss_version, 0, req); + error = sysctl_handle_int(oidp, &oss_version, 0, req, &Giant); if (error || req->newptr == NULL) return (error); error = linux_set_oss_version(req->td, oss_version); @@ -121,7 +121,7 @@ SYSCTL_PROC(_compat_linux, OID_AUTO, oss_version, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_PRISON, 0, 0, linux_sysctl_oss_version, "I", - "Linux OSS version"); + "Linux OSS version", &Giant); /* * Returns holding the prison mutex if return non-NULL. @@ -339,7 +339,7 @@ int global = 0; value[0] = '\0'; - error = sysctl_handle_string(oidp, value, LINUX_MAX_DEBUGSTR, req); + error = sysctl_handle_string(oidp, value, LINUX_MAX_DEBUGSTR, req, &Giant); if (error || req->newptr == NULL) return (error); for (p = value; *p != '\0' && *p != '.'; p++); @@ -357,6 +357,6 @@ SYSCTL_PROC(_compat_linux, OID_AUTO, debug, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, linux_sysctl_debug, "A", - "Linux debugging control"); + "Linux debugging control", &Giant); #endif /* DEBUG */ diff -ur /home/refugee/freebsd/current/src/sys/compat/ndis/kern_ndis.c repl/compat/ndis/kern_ndis.c --- /home/refugee/freebsd/current/src/sys/compat/ndis/kern_ndis.c Sun Oct 31 04:52:27 2004 +++ repl/compat/ndis/kern_ndis.c Tue Dec 14 00:49:53 2004 @@ -622,7 +622,7 @@ sc->ndis_tree = SYSCTL_ADD_NODE(&sc->ndis_ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, device_get_nameunit(sc->ndis_dev), CTLFLAG_RD, 0, - device_get_desc(sc->ndis_dev)); + device_get_desc(sc->ndis_dev), &Giant); #endif /* Add the driver-specific registry keys. */ @@ -666,7 +666,7 @@ OID_AUTO, vals->nc_cfgkey, CTLFLAG_RW, vals->nc_val, sizeof(vals->nc_val), - vals->nc_cfgdesc); + vals->nc_cfgdesc, &Giant); vals++; } @@ -739,7 +739,7 @@ #endif OID_AUTO, cfg->ndis_cfg.nc_cfgkey, flag, cfg->ndis_cfg.nc_val, sizeof(cfg->ndis_cfg.nc_val), - cfg->ndis_cfg.nc_cfgdesc); + cfg->ndis_cfg.nc_cfgdesc, &Giant); return(0); } diff -ur /home/refugee/freebsd/current/src/sys/compat/ndis/subr_ndis.c repl/compat/ndis/subr_ndis.c --- /home/refugee/freebsd/current/src/sys/compat/ndis/subr_ndis.c Sun Oct 31 04:52:27 2004 +++ repl/compat/ndis/subr_ndis.c Tue Dec 14 00:49:53 2004 @@ -112,7 +112,7 @@ extern struct nd_head ndis_devhead; SYSCTL_STRING(_hw, OID_AUTO, ndis_filepath, CTLFLAG_RW, ndis_filepath, - MAXPATHLEN, "Path used by NdisOpenFile() to search for files"); + MAXPATHLEN, "Path used by NdisOpenFile() to search for files", &Giant); __stdcall static void ndis_initwrap(ndis_handle *, device_object *, void *, void *); diff -ur /home/refugee/freebsd/current/src/sys/contrib/dev/ath/freebsd/ah_osdep.c repl/contrib/dev/ath/freebsd/ah_osdep.c --- /home/refugee/freebsd/current/src/sys/contrib/dev/ath/freebsd/ah_osdep.c Wed Dec 8 20:39:58 2004 +++ repl/contrib/dev/ath/freebsd/ah_osdep.c Tue Dec 14 00:49:57 2004 @@ -69,31 +69,31 @@ #endif /* AH_DEBUG */ /* NB: put this here instead of the driver to avoid circular references */ -SYSCTL_NODE(_hw, OID_AUTO, ath, CTLFLAG_RD, 0, "Atheros driver parameters"); -SYSCTL_NODE(_hw_ath, OID_AUTO, hal, CTLFLAG_RD, 0, "Atheros HAL parameters"); +SYSCTL_NODE(_hw, OID_AUTO, ath, CTLFLAG_RD, 0, "Atheros driver parameters", NULL); +SYSCTL_NODE(_hw_ath, OID_AUTO, hal, CTLFLAG_RD, 0, "Atheros HAL parameters", NULL); #ifdef AH_DEBUG static int ath_hal_debug = 0; SYSCTL_INT(_hw_ath_hal, OID_AUTO, debug, CTLFLAG_RW, &ath_hal_debug, - 0, "Atheros HAL debugging printfs"); + 0, "Atheros HAL debugging printfs", &Giant); TUNABLE_INT("hw.ath.hal.debug", &ath_hal_debug); #endif /* AH_DEBUG */ SYSCTL_STRING(_hw_ath_hal, OID_AUTO, version, CTLFLAG_RD, ath_hal_version, 0, - "Atheros HAL version"); + "Atheros HAL version", &Giant); int ath_hal_dma_beacon_response_time = 2; /* in TU's */ SYSCTL_INT(_hw_ath_hal, OID_AUTO, dma_brt, CTLFLAG_RW, &ath_hal_dma_beacon_response_time, 0, - "Atheros HAL DMA beacon response time"); + "Atheros HAL DMA beacon response time", &Giant); int ath_hal_sw_beacon_response_time = 10; /* in TU's */ SYSCTL_INT(_hw_ath_hal, OID_AUTO, sw_brt, CTLFLAG_RW, &ath_hal_sw_beacon_response_time, 0, - "Atheros HAL software beacon response time"); + "Atheros HAL software beacon response time", &Giant); int ath_hal_additional_swba_backoff = 0; /* in TU's */ SYSCTL_INT(_hw_ath_hal, OID_AUTO, swba_backoff, CTLFLAG_RW, &ath_hal_additional_swba_backoff, 0, - "Atheros HAL additional SWBA backoff time"); + "Atheros HAL additional SWBA backoff time", &Giant); void* ath_hal_malloc(size_t size) @@ -208,18 +208,18 @@ int error, enable; enable = (ath_hal_alq != NULL); - error = sysctl_handle_int(oidp, &enable, 0, req); + error = sysctl_handle_int(oidp, &enable, 0, req, &Giant); if (error || !req->newptr) return (error); else return (ath_hal_setlogging(enable)); } SYSCTL_PROC(_hw_ath_hal, OID_AUTO, alq, CTLTYPE_INT|CTLFLAG_RW, - 0, 0, sysctl_hw_ath_hal_log, "I", "Enable HAL register logging"); + 0, 0, sysctl_hw_ath_hal_log, "I", "Enable HAL register logging", &Giant); SYSCTL_INT(_hw_ath_hal, OID_AUTO, alq_size, CTLFLAG_RW, - &ath_hal_alq_qsize, 0, "In-memory log size (#records)"); + &ath_hal_alq_qsize, 0, "In-memory log size (#records)", &Giant); SYSCTL_INT(_hw_ath_hal, OID_AUTO, alq_lost, CTLFLAG_RW, - &ath_hal_alq_lost, 0, "Register operations not logged"); + &ath_hal_alq_lost, 0, "Register operations not logged", &Giant); static struct ale * ath_hal_alq_get(struct ath_hal *ah) diff -ur /home/refugee/freebsd/current/src/sys/contrib/dev/hptmv/hptproc.c repl/contrib/dev/hptmv/hptproc.c --- /home/refugee/freebsd/current/src/sys/contrib/dev/hptmv/hptproc.c Sun Oct 31 04:52:56 2004 +++ repl/contrib/dev/hptmv/hptproc.c Tue Dec 14 00:49:57 2004 @@ -594,7 +594,7 @@ #define hptregister_node(name) \ SYSCTL_NODE(, OID_AUTO, name, CTLFLAG_RW, 0, "Get/Set " #name " state root node"); \ SYSCTL_OID(_ ## name, OID_AUTO, status, CTLTYPE_STRING|CTLFLAG_RW, \ - NULL, 0, hpt_status, "A", "Get/Set " #name " state"); + NULL, 0, hpt_status, "A", "Get/Set " #name " state", &Giant); #endif xhptregister_node(PROC_DIR_NAME); diff -ur /home/refugee/freebsd/current/src/sys/contrib/ipfilter/netinet/mlfk_ipl.c repl/contrib/ipfilter/netinet/mlfk_ipl.c --- /home/refugee/freebsd/current/src/sys/contrib/ipfilter/netinet/mlfk_ipl.c Sun Oct 31 04:52:57 2004 +++ repl/contrib/ipfilter/netinet/mlfk_ipl.c Tue Dec 14 00:49:58 2004 @@ -58,50 +58,50 @@ static struct cdev *ipf_devs[IPL_LOGMAX + 1]; SYSCTL_DECL(_net_inet); -SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF"); -SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &fr_flags, 0, ""); -SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_pass, CTLFLAG_RW, &fr_pass, 0, ""); -SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_active, CTLFLAG_RD, &fr_active, 0, ""); +SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF", NULL); +SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &fr_flags, 0, "", &Giant); +SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_pass, CTLFLAG_RW, &fr_pass, 0, "", &Giant); +SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_active, CTLFLAG_RD, &fr_active, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcpidletimeout, CTLFLAG_RW, - &fr_tcpidletimeout, 0, ""); + &fr_tcpidletimeout, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcpclosewait, CTLFLAG_RW, - &fr_tcpclosewait, 0, ""); + &fr_tcpclosewait, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcplastack, CTLFLAG_RW, - &fr_tcplastack, 0, ""); + &fr_tcplastack, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcptimeout, CTLFLAG_RW, - &fr_tcptimeout, 0, ""); + &fr_tcptimeout, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcpclosed, CTLFLAG_RW, - &fr_tcpclosed, 0, ""); + &fr_tcpclosed, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcphalfclosed, CTLFLAG_RW, - &fr_tcphalfclosed, 0, ""); + &fr_tcphalfclosed, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_udptimeout, CTLFLAG_RW, - &fr_udptimeout, 0, ""); + &fr_udptimeout, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_udpacktimeout, CTLFLAG_RW, - &fr_udpacktimeout, 0, ""); + &fr_udpacktimeout, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_icmptimeout, CTLFLAG_RW, - &fr_icmptimeout, 0, ""); + &fr_icmptimeout, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_icmpacktimeout, CTLFLAG_RW, - &fr_icmpacktimeout, 0, ""); + &fr_icmpacktimeout, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_defnatage, CTLFLAG_RW, - &fr_defnatage, 0, ""); + &fr_defnatage, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_ipfrttl, CTLFLAG_RW, - &fr_ipfrttl, 0, ""); + &fr_ipfrttl, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, ipl_unreach, CTLFLAG_RW, - &ipl_unreach, 0, ""); + &ipl_unreach, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD, - &fr_running, 0, ""); + &fr_running, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_authsize, CTLFLAG_RD, - &fr_authsize, 0, ""); + &fr_authsize, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_authused, CTLFLAG_RD, - &fr_authused, 0, ""); + &fr_authused, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_defaultauthage, CTLFLAG_RW, - &fr_defaultauthage, 0, ""); -SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &fr_chksrc, 0, ""); + &fr_defaultauthage, 0, "", &Giant); +SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &fr_chksrc, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, ippr_ftp_pasvonly, CTLFLAG_RW, - &ippr_ftp_pasvonly, 0, ""); -SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &fr_minttl, 0, ""); + &ippr_ftp_pasvonly, 0, "", &Giant); +SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &fr_minttl, 0, "", &Giant); SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_minttllog, CTLFLAG_RW, - &fr_minttllog, 0, ""); + &fr_minttllog, 0, "", &Giant); #define CDEV_MAJOR 79 static struct cdevsw ipl_cdevsw = { diff -ur /home/refugee/freebsd/current/src/sys/ddb/db_output.c repl/ddb/db_output.c --- /home/refugee/freebsd/current/src/sys/ddb/db_output.c Sun Nov 14 03:56:01 2004 +++ repl/ddb/db_output.c Tue Dec 14 00:49:55 2004 @@ -72,7 +72,7 @@ static void *db_page_callout_arg = NULL; static int ddb_use_printf = 0; SYSCTL_INT(_debug, OID_AUTO, ddb_use_printf, CTLFLAG_RW, &ddb_use_printf, 0, - "use printf for all ddb output"); + "use printf for all ddb output", &Giant); static void db_putchar(int c, void *arg); diff -ur /home/refugee/freebsd/current/src/sys/dev/aac/aac.c repl/dev/aac/aac.c --- /home/refugee/freebsd/current/src/sys/dev/aac/aac.c Sun Nov 21 00:02:53 2004 +++ repl/dev/aac/aac.c Tue Dec 14 00:49:49 2004 @@ -213,7 +213,7 @@ MALLOC_DEFINE(M_AACBUF, "aacbuf", "Buffers for the AAC driver"); /* sysctl node */ -SYSCTL_NODE(_hw, OID_AUTO, aac, CTLFLAG_RD, 0, "AAC driver parameters"); +SYSCTL_NODE(_hw, OID_AUTO, aac, CTLFLAG_RD, 0, "AAC driver parameters", NULL); /* * Device Interface diff -ur /home/refugee/freebsd/current/src/sys/dev/aac/aac_disk.c repl/dev/aac/aac_disk.c --- /home/refugee/freebsd/current/src/sys/dev/aac/aac_disk.c Sun Oct 31 04:52:02 2004 +++ repl/dev/aac/aac_disk.c Tue Dec 14 00:49:49 2004 @@ -93,7 +93,7 @@ SYSCTL_DECL(_hw_aac); SYSCTL_UINT(_hw_aac, OID_AUTO, iosize_max, CTLFLAG_RDTUN, &aac_iosize_max, 0, - "Max I/O size per transfer to an array"); + "Max I/O size per transfer to an array", &Giant); /* * Handle open from generic layer. diff -ur /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_asus.c repl/dev/acpi_support/acpi_asus.c --- /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_asus.c Sun Nov 21 00:02:53 2004 +++ repl/dev/acpi_support/acpi_asus.c Tue Dec 14 00:49:50 2004 @@ -227,9 +227,9 @@ static void acpi_asus_led(struct acpi_asus_led *led, int state); -static int acpi_asus_sysctl_brn(SYSCTL_HANDLER_ARGS); -static int acpi_asus_sysctl_lcd(SYSCTL_HANDLER_ARGS); -static int acpi_asus_sysctl_disp(SYSCTL_HANDLER_ARGS); +static int acpi_asus_sysctl_brn(SYSCTL_HANDLER_ARGS, &Giant); +static int acpi_asus_sysctl_lcd(SYSCTL_HANDLER_ARGS, &Giant); +static int acpi_asus_sysctl_disp(SYSCTL_HANDLER_ARGS, &Giant); static void acpi_asus_notify(ACPI_HANDLE h, UINT32 notify, void *context); @@ -351,10 +351,10 @@ acpi_sc = acpi_device_get_parent_softc(dev); /* Build sysctl tree */ - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), - OID_AUTO, "asus", CTLFLAG_RD, 0, ""); + OID_AUTO, "asus", CTLFLAG_RD, 0, "", &Giant); /* Attach leds */ if (sc->model->mled_set) { @@ -439,7 +439,7 @@ SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "lcd_backlight", CTLTYPE_INT | CTLFLAG_RW, sc, 0, acpi_asus_sysctl_lcd, "I", - "state of the lcd backlight"); + "state of the lcd backlight", &Giant); } } @@ -477,7 +477,7 @@ acpi_asus_notify); /* Free sysctl tree */ - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); return (0); } @@ -527,7 +527,7 @@ /* Sanity check */ brn = sc->s_brn; - err = sysctl_handle_int(oidp, &brn, 0, req); + err = sysctl_handle_int(oidp, &brn, 0, req, &Giant); if (err != 0 || req->newptr == NULL) goto out; @@ -571,7 +571,7 @@ /* Sanity check */ lcd = sc->s_lcd; - err = sysctl_handle_int(oidp, &lcd, 0, req); + err = sysctl_handle_int(oidp, &lcd, 0, req, &Giant); if (err != 0 || req->newptr == NULL) goto out; @@ -608,7 +608,7 @@ /* Sanity check */ ACPI_SERIAL_BEGIN(asus); disp = sc->s_disp; - err = sysctl_handle_int(oidp, &disp, 0, req); + err = sysctl_handle_int(oidp, &disp, 0, req, &Giant); if (err != 0 || req->newptr == NULL) goto out; diff -ur /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_panasonic.c repl/dev/acpi_support/acpi_panasonic.c --- /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_panasonic.c Sun Nov 21 00:02:53 2004 +++ repl/dev/acpi_support/acpi_panasonic.c Tue Dec 14 00:49:50 2004 @@ -156,16 +156,16 @@ acpi_sc = acpi_device_get_parent_softc(dev); /* Build sysctl tree */ - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, - "panasonic", CTLFLAG_RD, 0, ""); + "panasonic", CTLFLAG_RD, 0, "", &Giant); for (i = 0; sysctl_table[i].name != NULL; i++) { SYSCTL_ADD_PROC(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, sysctl_table[i].name, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY, - sc, i, acpi_panasonic_sysctl, "I", ""); + sc, i, acpi_panasonic_sysctl, "I", "", &Giant); } #if 0 @@ -173,7 +173,7 @@ status = AcpiEvaluateObject(sc->handle, "", NULL, NULL); if (ACPI_FAILURE(status)) { device_printf(dev, "enable FN keys failed\n"); - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); return (ENXIO); } #endif @@ -184,7 +184,7 @@ if (ACPI_FAILURE(status)) { device_printf(dev, "couldn't install notify handler - %s\n", AcpiFormatException(status)); - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); return (ENXIO); } @@ -210,7 +210,7 @@ acpi_panasonic_notify); /* Free sysctl tree */ - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); return (0); } @@ -234,7 +234,7 @@ goto out; /* Send the current value to the user and return if no new value. */ - error = sysctl_handle_int(oidp, &arg, 0, req); + error = sysctl_handle_int(oidp, &arg, 0, req, &Giant); if (error != 0 || req->newptr == NULL) goto out; diff -ur /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_sony.c repl/dev/acpi_support/acpi_sony.c --- /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_sony.c Wed Dec 8 20:40:49 2004 +++ repl/dev/acpi_support/acpi_sony.c Tue Dec 14 00:49:50 2004 @@ -68,7 +68,7 @@ static int acpi_sony_probe(device_t dev); static int acpi_sony_attach(device_t dev); static int acpi_sony_detach(device_t dev); -static int sysctl_acpi_sony_gen_handler(SYSCTL_HANDLER_ARGS); +static int sysctl_acpi_sony_gen_handler(SYSCTL_HANDLER_ARGS, &Giant); static device_method_t acpi_sony_methods[] = { /* Device interface */ @@ -122,7 +122,7 @@ i, acpi_sony_oids[i].nodename , CTLTYPE_INT | ((acpi_sony_oids[i].setmethod)? CTLFLAG_RW: CTLFLAG_RD), dev, i, sysctl_acpi_sony_gen_handler, "I", - acpi_sony_oids[i].comment); + acpi_sony_oids[i].comment, &Giant); } return (0); } @@ -157,7 +157,7 @@ acpi_GetInteger(acpi_get_handle(dev), acpi_sony_oids[function].getmethod, &val); - error = sysctl_handle_int(oidp, &val, 0, req); + error = sysctl_handle_int(oidp, &val, 0, req, &Giant); if (error || !req->newptr || !acpi_sony_oids[function].setmethod) return (error); acpi_SetInteger(acpi_get_handle(dev), diff -ur /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_toshiba.c repl/dev/acpi_support/acpi_toshiba.c --- /home/refugee/freebsd/current/src/sys/dev/acpi_support/acpi_toshiba.c Sun Nov 21 00:02:53 2004 +++ repl/dev/acpi_support/acpi_toshiba.c Tue Dec 14 00:49:50 2004 @@ -238,17 +238,17 @@ sc->handle = acpi_get_handle(dev); acpi_sc = acpi_device_get_parent_softc(dev); - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, - "toshiba", CTLFLAG_RD, 0, ""); + "toshiba", CTLFLAG_RD, 0, "", &Giant); for (i = 0; sysctl_table[i].name != NULL; i++) { SYSCTL_ADD_PROC(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, sysctl_table[i].name, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY, - sc, i, acpi_toshiba_sysctl, "I", ""); + sc, i, acpi_toshiba_sysctl, "I", "", &Giant); } if (enable_fn_keys != 0) { @@ -256,7 +256,7 @@ NULL, NULL); if (ACPI_FAILURE(status)) { device_printf(dev, "enable FN keys failed\n"); - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); return (ENXIO); } AcpiInstallNotifyHandler(sc->handle, ACPI_DEVICE_NOTIFY, @@ -276,7 +276,7 @@ AcpiRemoveNotifyHandler(sc->handle, ACPI_DEVICE_NOTIFY, acpi_toshiba_notify); } - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); return (0); } @@ -300,7 +300,7 @@ goto out; /* Send the current value to the user and return if no new value. */ - error = sysctl_handle_int(oidp, &arg, 0, req); + error = sysctl_handle_int(oidp, &arg, 0, req, &Giant); if (error != 0 || req->newptr == NULL) goto out; diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/Osd/OsdSynch.c repl/dev/acpica/Osd/OsdSynch.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/Osd/OsdSynch.c Sun Oct 31 04:51:42 2004 +++ repl/dev/acpica/Osd/OsdSynch.c Tue Dec 14 00:49:47 2004 @@ -69,7 +69,7 @@ TUNABLE_INT("debug.acpi_semaphore_debug", &acpi_semaphore_debug); SYSCTL_DECL(_debug_acpi); SYSCTL_INT(_debug_acpi, OID_AUTO, semaphore_debug, CTLFLAG_RW, - &acpi_semaphore_debug, 0, "Enable ACPI semaphore debug messages"); + &acpi_semaphore_debug, 0, "Enable ACPI semaphore debug messages", &Giant); #endif /* !ACPI_NO_SEMAPHORES */ ACPI_STATUS diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/acpi.c repl/dev/acpica/acpi.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/acpi.c Wed Dec 8 20:40:50 2004 +++ repl/dev/acpica/acpi.c Tue Dec 14 00:49:47 2004 @@ -138,7 +138,7 @@ static int acpi_wake_sleep_prep(ACPI_HANDLE handle, int sstate); static int acpi_wake_run_prep(ACPI_HANDLE handle, int sstate); static int acpi_wake_prep_walk(int sstate); -static int acpi_wake_sysctl_walk(device_t dev); +static int acpi_wake_sysctl_walk(device_t dev, &Giant); static int acpi_wake_set_sysctl(SYSCTL_HANDLER_ARGS); static void acpi_system_eventhandler_sleep(void *arg, int state); static void acpi_system_eventhandler_wakeup(void *arg, int state); @@ -214,10 +214,10 @@ static const char* sleep_state_names[] = { "S0", "S1", "S2", "S3", "S4", "S5", "NONE"}; -SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RW, NULL, "ACPI debugging"); +SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RW, NULL, "ACPI debugging", NULL); static char acpi_ca_version[12]; SYSCTL_STRING(_debug_acpi, OID_AUTO, acpi_ca_version, CTLFLAG_RD, - acpi_ca_version, 0, "Version of Intel ACPI-CA"); + acpi_ca_version, 0, "Version of Intel ACPI-CA", &Giant); /* * Allow override of whether methods execute in parallel or not. @@ -233,7 +233,7 @@ static int acpi_do_powerstate = 1; TUNABLE_INT("debug.acpi.do_powerstate", &acpi_do_powerstate); SYSCTL_INT(_debug_acpi, OID_AUTO, do_powerstate, CTLFLAG_RW, - &acpi_do_powerstate, 1, "Turn off devices when suspending."); + &acpi_do_powerstate, 1, "Turn off devices when suspending.", &Giant); /* * ACPI can only be loaded as a module by the loader; activating it after @@ -481,10 +481,10 @@ * * XXX: This doesn't check to make sure that none of these fail. */ - sysctl_ctx_init(&sc->acpi_sysctl_ctx); + sysctl_ctx_init(&sc->acpi_sysctl_ctx, &Giant); sc->acpi_sysctl_tree = SYSCTL_ADD_NODE(&sc->acpi_sysctl_ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, - device_get_name(dev), CTLFLAG_RD, 0, ""); + device_get_name(dev), CTLFLAG_RD, 0, "", &Giant); SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "supported_sleep_state", CTLTYPE_STRING | CTLFLAG_RD, 0, 0, acpi_supported_sleep_state_sysctl, "A", ""); @@ -505,13 +505,13 @@ &sc->acpi_suspend_sx, 0, acpi_sleep_state_sysctl, "A", ""); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "sleep_delay", CTLFLAG_RD | CTLFLAG_RW, - &sc->acpi_sleep_delay, 0, "sleep delay"); + &sc->acpi_sleep_delay, 0, "sleep delay", &Giant); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "s4bios", CTLFLAG_RD | CTLFLAG_RW, - &sc->acpi_s4bios, 0, "S4BIOS mode"); + &sc->acpi_s4bios, 0, "S4BIOS mode", &Giant); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "verbose", CTLFLAG_RD | CTLFLAG_RW, - &sc->acpi_verbose, 0, "verbose mode"); + &sc->acpi_verbose, 0, "verbose mode", &Giant); /* * Default to 1 second before sleeping to give some machines time to @@ -1444,7 +1444,7 @@ bus_generic_attach(bus); /* Attach wake sysctls. */ - acpi_wake_sysctl_walk(bus); + acpi_wake_sysctl_walk(bus, &Giant); ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "done attaching children\n")); return_VOID; @@ -2314,7 +2314,7 @@ return (error); for (i = 0; i < numdevs; i++) { child = devlist[i]; - acpi_wake_sysctl_walk(child); + acpi_wake_sysctl_walk(child, &Giant); if (!device_is_attached(child)) continue; status = AcpiEvaluateObject(acpi_get_handle(child), "_PRW", NULL, NULL); @@ -2340,7 +2340,7 @@ dev = (device_t)arg1; enable = (acpi_get_flags(dev) & ACPI_FLAG_WAKE_ENABLED) ? 1 : 0; - error = sysctl_handle_int(oidp, &enable, 0, req); + error = sysctl_handle_int(oidp, &enable, 0, req, &Giant); if (error != 0 || req->newptr == NULL) return (error); if (enable != 0 && enable != 1) @@ -2748,7 +2748,7 @@ sbuf_printf(&sb, "S%d ", state); sbuf_trim(&sb); sbuf_finish(&sb); - error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); + error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req, &Giant); sbuf_delete(&sb); return (error); } @@ -2765,7 +2765,7 @@ strlcpy(sleep_state, "unknown", sizeof(sleep_state)); else strlcpy(sleep_state, sleep_state_names[old_state], sizeof(sleep_state)); - error = sysctl_handle_string(oidp, sleep_state, sizeof(sleep_state), req); + error = sysctl_handle_string(oidp, sleep_state, sizeof(sleep_state), req, &Giant); if (error == 0 && req->newptr != NULL) { new_state = ACPI_STATE_S0; for (; new_state <= ACPI_S_STATES_MAX + 1; new_state++) @@ -3010,9 +3010,9 @@ } SYSCTL_PROC(_debug_acpi, OID_AUTO, layer, CTLFLAG_RW | CTLTYPE_STRING, - "debug.acpi.layer", 0, acpi_debug_sysctl, "A", ""); + "debug.acpi.layer", 0, acpi_debug_sysctl, "A", "", &Giant); SYSCTL_PROC(_debug_acpi, OID_AUTO, level, CTLFLAG_RW | CTLTYPE_STRING, - "debug.acpi.level", 0, acpi_debug_sysctl, "A", ""); + "debug.acpi.level", 0, acpi_debug_sysctl, "A", "", &Giant); #endif /* ACPI_DEBUG */ static int diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_acad.c repl/dev/acpica/acpi_acad.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_acad.c Wed Dec 8 20:40:50 2004 +++ repl/dev/acpica/acpi_acad.c Tue Dec 14 00:49:47 2004 @@ -218,7 +218,7 @@ return (ENXIO); val = *(u_int *)oidp->oid_arg1; - error = sysctl_handle_int(oidp, &val, 0, req); + error = sysctl_handle_int(oidp, &val, 0, req, &Giant); return (error); } diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_battery.c repl/dev/acpica/acpi_battery.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_battery.c Sun Oct 31 04:51:42 2004 +++ repl/dev/acpica/acpi_battery.c Tue Dec 14 00:49:47 2004 @@ -160,7 +160,7 @@ acpi_battery_get_battinfo(-1, &acpi_battery_battinfo); val = *(u_int *)oidp->oid_arg1; - error = sysctl_handle_int(oidp, &val, 0, req); + error = sysctl_handle_int(oidp, &val, 0, req, &Giant); return (error); } @@ -195,10 +195,10 @@ if (error != 0) goto out; - sysctl_ctx_init(&sc->acpi_battery_sysctl_ctx); + sysctl_ctx_init(&sc->acpi_battery_sysctl_ctx, &Giant); sc->acpi_battery_sysctl_tree = SYSCTL_ADD_NODE(&sc->acpi_battery_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "battery", CTLFLAG_RD, - 0, ""); + 0, "", &Giant); SYSCTL_ADD_PROC(&sc->acpi_battery_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_battery_sysctl_tree), OID_AUTO, "life", CTLTYPE_INT | CTLFLAG_RD, @@ -213,11 +213,11 @@ &acpi_battery_battinfo.state, 0, acpi_battery_sysctl, "I", ""); SYSCTL_ADD_INT(&sc->acpi_battery_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_battery_sysctl_tree), - OID_AUTO, "units", CTLFLAG_RD, &acpi_batteries_units, 0, ""); + OID_AUTO, "units", CTLFLAG_RD, &acpi_batteries_units, 0, "", &Giant); SYSCTL_ADD_INT(&sc->acpi_battery_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_battery_sysctl_tree), OID_AUTO, "info_expire", CTLFLAG_RD | CTLFLAG_RW, - &acpi_battery_info_expire, 0, ""); + &acpi_battery_info_expire, 0, "", &Giant); acpi_batteries_initted = TRUE; diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_cpu.c repl/dev/acpica/acpi_cpu.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_cpu.c Sun Nov 21 00:02:53 2004 +++ repl/dev/acpica/acpi_cpu.c Tue Dec 14 00:49:47 2004 @@ -294,10 +294,10 @@ device_get_unit(dev), sc->cpu_p_blk, sc->cpu_p_blk_len)); acpi_sc = acpi_device_get_parent_softc(dev); - sysctl_ctx_init(&acpi_cpu_sysctl_ctx); + sysctl_ctx_init(&acpi_cpu_sysctl_ctx, &Giant); acpi_cpu_sysctl_tree = SYSCTL_ADD_NODE(&acpi_cpu_sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), - OID_AUTO, "cpu", CTLFLAG_RD, 0, ""); + OID_AUTO, "cpu", CTLFLAG_RD, 0, "", &Giant); /* * Probe for throttling and Cx state support. @@ -311,7 +311,7 @@ if (device_get_unit(dev) == 0) AcpiOsQueueForExecution(OSD_PRIORITY_LO, acpi_cpu_startup, NULL); } else { - sysctl_ctx_free(&acpi_cpu_sysctl_ctx); + sysctl_ctx_free(&acpi_cpu_sysctl_ctx, &Giant); } return_VALUE (0); @@ -713,7 +713,7 @@ SYSCTL_ADD_INT(&acpi_cpu_sysctl_ctx, SYSCTL_CHILDREN(acpi_cpu_sysctl_tree), OID_AUTO, "throttle_max", CTLFLAG_RD, - &cpu_throttle_max, 0, "maximum CPU speed"); + &cpu_throttle_max, 0, "maximum CPU speed", &Giant); SYSCTL_ADD_PROC(&acpi_cpu_sysctl_ctx, SYSCTL_CHILDREN(acpi_cpu_sysctl_tree), OID_AUTO, "throttle_state", @@ -762,7 +762,7 @@ SYSCTL_ADD_STRING(&acpi_cpu_sysctl_ctx, SYSCTL_CHILDREN(acpi_cpu_sysctl_tree), OID_AUTO, "cx_supported", CTLFLAG_RD, cpu_cx_supported, - 0, "Cx/microsecond values for supported Cx states"); + 0, "Cx/microsecond values for supported Cx states", &Giant); SYSCTL_ADD_PROC(&acpi_cpu_sysctl_ctx, SYSCTL_CHILDREN(acpi_cpu_sysctl_tree), OID_AUTO, "cx_lowest", CTLTYPE_STRING | CTLFLAG_RW, @@ -1038,7 +1038,7 @@ argp = (uint32_t *)oidp->oid_arg1; arg = *argp; - error = sysctl_handle_int(oidp, &arg, 0, req); + error = sysctl_handle_int(oidp, &arg, 0, req, &Giant); /* Error or no new value */ if (error != 0 || req->newptr == NULL) @@ -1080,7 +1080,7 @@ } sbuf_trim(&sb); sbuf_finish(&sb); - sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); + sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req, &Giant); sbuf_delete(&sb); return (0); @@ -1095,7 +1095,7 @@ sc = device_get_softc(cpu_devices[0]); snprintf(state, sizeof(state), "C%d", cpu_cx_lowest + 1); - error = sysctl_handle_string(oidp, state, sizeof(state), req); + error = sysctl_handle_string(oidp, state, sizeof(state), req, &Giant); if (error != 0 || req->newptr == NULL) return (error); if (strlen(state) < 2 || toupper(state[0]) != 'C') diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_thermal.c repl/dev/acpica/acpi_thermal.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_thermal.c Sun Oct 31 04:51:42 2004 +++ repl/dev/acpica/acpi_thermal.c Tue Dec 14 00:49:47 2004 @@ -205,48 +205,48 @@ */ if (device_get_unit(dev) == 0) { acpi_sc = acpi_device_get_parent_softc(dev); - sysctl_ctx_init(&acpi_tz_sysctl_ctx); + sysctl_ctx_init(&acpi_tz_sysctl_ctx, &Giant); acpi_tz_sysctl_tree = SYSCTL_ADD_NODE(&acpi_tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), - OID_AUTO, "thermal", CTLFLAG_RD, 0, ""); + OID_AUTO, "thermal", CTLFLAG_RD, 0, "", &Giant); SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, "min_runtime", CTLFLAG_RD | CTLFLAG_RW, &acpi_tz_min_runtime, 0, - "minimum cooling run time in sec"); + "minimum cooling run time in sec", &Giant); SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, "polling_rate", CTLFLAG_RD | CTLFLAG_RW, - &acpi_tz_polling_rate, 0, "monitor polling rate"); + &acpi_tz_polling_rate, 0, "monitor polling rate", &Giant); } - sysctl_ctx_init(&sc->tz_sysctl_ctx); + sysctl_ctx_init(&sc->tz_sysctl_ctx, &Giant); sprintf(oidname, "tz%d", device_get_unit(dev)); sc->tz_sysctl_tree = SYSCTL_ADD_NODE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), - OID_AUTO, oidname, CTLFLAG_RD, 0, ""); + OID_AUTO, oidname, CTLFLAG_RD, 0, "", &Giant); SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "temperature", CTLFLAG_RD, &sc->tz_temperature, sizeof(sc->tz_temperature), "IK", - "current thermal zone temperature"); + "current thermal zone temperature", &Giant); SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "active", CTLTYPE_INT | CTLFLAG_RW, sc, 0, acpi_tz_active_sysctl, "I", ""); SYSCTL_ADD_INT(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "thermal_flags", CTLFLAG_RD, - &sc->tz_thflags, 0, "thermal zone flags"); + &sc->tz_thflags, 0, "thermal zone flags", &Giant); SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_PSV", CTLFLAG_RD, &sc->tz_zone.psv, - sizeof(sc->tz_zone.psv), "IK", ""); + sizeof(sc->tz_zone.psv), "IK", "", &Giant); SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_HOT", CTLFLAG_RD, &sc->tz_zone.hot, - sizeof(sc->tz_zone.hot), "IK", ""); + sizeof(sc->tz_zone.hot), "IK", "", &Giant); SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_CRT", CTLFLAG_RD, &sc->tz_zone.crt, - sizeof(sc->tz_zone.crt), "IK", ""); + sizeof(sc->tz_zone.crt), "IK", "", &Giant); SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_ACx", CTLFLAG_RD, &sc->tz_zone.ac, - sizeof(sc->tz_zone.ac), "IK", ""); + sizeof(sc->tz_zone.ac), "IK", "", &Giant); /* * Create our thread; we only need one, it will service all of the @@ -276,7 +276,7 @@ EVENTHANDLER_DEREGISTER(power_profile_change, sc->tz_event); AcpiRemoveNotifyHandler(sc->tz_handle, ACPI_DEVICE_NOTIFY, acpi_tz_notify_handler); - sysctl_ctx_free(&sc->tz_sysctl_ctx); + sysctl_ctx_free(&sc->tz_sysctl_ctx, &Giant); } return_VALUE (error); } @@ -588,7 +588,7 @@ sc = (struct acpi_tz_softc *)oidp->oid_arg1; active = sc->tz_active; - error = sysctl_handle_int(oidp, &active, 0, req); + error = sysctl_handle_int(oidp, &active, 0, req, &Giant); /* Error or no new value */ if (error != 0 || req->newptr == NULL) diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_timer.c repl/dev/acpica/acpi_timer.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_timer.c Sun Nov 14 03:56:04 2004 +++ repl/dev/acpica/acpi_timer.c Tue Dec 14 00:49:47 2004 @@ -64,7 +64,7 @@ static int acpi_timer_attach(device_t dev); static u_int acpi_timer_get_timecount(struct timecounter *tc); static u_int acpi_timer_get_timecount_safe(struct timecounter *tc); -static int acpi_timer_sysctl_freq(SYSCTL_HANDLER_ARGS); +static int acpi_timer_sysctl_freq(SYSCTL_HANDLER_ARGS, &Giant); static void acpi_timer_boot_test(void); static u_int acpi_timer_read(void); @@ -260,7 +260,7 @@ if (acpi_timer_timecounter.tc_frequency == 0) return (EOPNOTSUPP); freq = acpi_timer_frequency; - error = sysctl_handle_int(oidp, &freq, sizeof(freq), req); + error = sysctl_handle_int(oidp, &freq, sizeof(freq), req, &Giant); if (error == 0 && req->newptr != NULL) { acpi_timer_frequency = freq; acpi_timer_timecounter.tc_frequency = acpi_timer_frequency; @@ -270,7 +270,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, acpi_timer_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), acpi_timer_sysctl_freq, "I", ""); + 0, sizeof(u_int), acpi_timer_sysctl_freq, "I", "", &Giant); /* * Some ACPI timers are known or believed to suffer from implementation diff -ur /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_video.c repl/dev/acpica/acpi_video.c --- /home/refugee/freebsd/current/src/sys/dev/acpica/acpi_video.c Sun Nov 14 03:56:04 2004 +++ repl/dev/acpica/acpi_video.c Tue Dec 14 00:49:47 2004 @@ -170,14 +170,14 @@ err = 0; switch (evt) { case MOD_LOAD: - sysctl_ctx_init(&acpi_video_sysctl_ctx); + sysctl_ctx_init(&acpi_video_sysctl_ctx, &Giant); STAILQ_INIT(&lcd_units); STAILQ_INIT(&crt_units); STAILQ_INIT(&tv_units); STAILQ_INIT(&other_units); break; case MOD_UNLOAD: - sysctl_ctx_free(&acpi_video_sysctl_ctx); + sysctl_ctx_free(&acpi_video_sysctl_ctx, &Giant); acpi_video_sysctl_tree = NULL; break; default: @@ -220,7 +220,7 @@ acpi_video_sysctl_tree = SYSCTL_ADD_NODE(&acpi_video_sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, "video", CTLFLAG_RD, 0, - "video extension control"); + "video extension control", &Giant); } sc->device = dev; @@ -447,7 +447,7 @@ if (getenv_int(env, &x)) vo->vo_economy = x; - sysctl_ctx_init(&vo->vo_sysctl_ctx); + sysctl_ctx_init(&vo->vo_sysctl_ctx, &Giant); if (vp != NULL) STAILQ_INSERT_AFTER(voqh, vp, vo, vo_unit.next); else @@ -456,14 +456,14 @@ vo->vo_sysctl_tree = SYSCTL_ADD_NODE(&vo->vo_sysctl_ctx, SYSCTL_CHILDREN(acpi_video_sysctl_tree), - OID_AUTO, name, CTLFLAG_RD, 0, desc); + OID_AUTO, name, CTLFLAG_RD, 0, desc, &Giant); if (vo->vo_sysctl_tree != NULL) { SYSCTL_ADD_PROC(&vo->vo_sysctl_ctx, SYSCTL_CHILDREN(vo->vo_sysctl_tree), OID_AUTO, "active", CTLTYPE_INT|CTLFLAG_RW, vo, 0, acpi_video_vo_active_sysctl, "I", - "current activity of this device"); + "current activity of this device", &Giant); SYSCTL_ADD_PROC(&vo->vo_sysctl_ctx, SYSCTL_CHILDREN(vo->vo_sysctl_tree), OID_AUTO, "brightness", @@ -536,7 +536,7 @@ ACPI_SERIAL_ASSERT(video); if (vo->vo_sysctl_tree != NULL) { vo->vo_sysctl_tree = NULL; - sysctl_ctx_free(&vo->vo_sysctl_ctx); + sysctl_ctx_free(&vo->vo_sysctl_ctx, &Giant); } if (vo->vo_levels != NULL) AcpiOsFree(vo->vo_levels); @@ -584,7 +584,7 @@ return (ENXIO); ACPI_SERIAL_BEGIN(video); state = (vo_get_device_status(vo->handle) & DCS_ACTIVE) ? 1 : 0; - err = sysctl_handle_int(oidp, &state, 0, req); + err = sysctl_handle_int(oidp, &state, 0, req, &Giant); if (err != 0 || req->newptr == NULL) goto out; vo_set_device_state(vo->handle, @@ -618,7 +618,7 @@ if (level == -1) level = preset; - err = sysctl_handle_int(oidp, &level, 0, req); + err = sysctl_handle_int(oidp, &level, 0, req, &Giant); if (err != 0 || req->newptr == NULL) goto out; if (level < -1 || level > 100) { @@ -656,7 +656,7 @@ preset = (arg2 == POWER_PROFILE_ECONOMY) ? &vo->vo_economy : &vo->vo_fullpower; level = *preset; - err = sysctl_handle_int(oidp, &level, 0, req); + err = sysctl_handle_int(oidp, &level, 0, req, &Giant); if (err != 0 || req->newptr == NULL) goto out; if (level < -1 || level > 100) { @@ -697,7 +697,7 @@ goto out; } err = sysctl_handle_opaque(oidp, vo->vo_levels, - vo->vo_numlevels * sizeof(*vo->vo_levels), req); + vo->vo_numlevels * sizeof(*vo->vo_levels), req, &Giant); out: ACPI_SERIAL_END(video); diff -ur /home/refugee/freebsd/current/src/sys/dev/an/if_an.c repl/dev/an/if_an.c --- /home/refugee/freebsd/current/src/sys/dev/an/if_an.c Sun Oct 31 04:52:20 2004 +++ repl/dev/an/if_an.c Tue Dec 14 00:49:52 2004 @@ -201,7 +201,7 @@ /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, an, CTLFLAG_RD, 0, "Wireless driver parameters"); +SYSCTL_NODE(_hw, OID_AUTO, an, CTLFLAG_RD, 0, "Wireless driver parameters", NULL); /* XXX violate ethernet/netgraph callback hooks */ extern void (*ng_ether_attach_p)(struct ifnet *ifp); @@ -230,7 +230,7 @@ break; } - error = sysctl_handle_string(oidp, an_conf, sizeof(an_conf), req); + error = sysctl_handle_string(oidp, an_conf, sizeof(an_conf), req, &Giant); if (strncmp(an_conf,"off", 3) == 0) { an_dump = 0; @@ -261,7 +261,7 @@ } SYSCTL_PROC(_hw_an, OID_AUTO, an_dump, CTLTYPE_STRING | CTLFLAG_RW, - 0, sizeof(an_conf), sysctl_an_dump, "A", ""); + 0, sizeof(an_conf), sysctl_an_dump, "A", "", &Giant); static int sysctl_an_cache_mode(SYSCTL_HANDLER_ARGS) @@ -283,7 +283,7 @@ } error = sysctl_handle_string(oidp, an_conf_cache, - sizeof(an_conf_cache), req); + sizeof(an_conf_cache), req, &Giant); if (strncmp(an_conf_cache,"dbm", 3) == 0) { an_cache_mode = 0; @@ -299,7 +299,7 @@ } SYSCTL_PROC(_hw_an, OID_AUTO, an_cache_mode, CTLTYPE_STRING | CTLFLAG_RW, - 0, sizeof(an_conf_cache), sysctl_an_cache_mode, "A", ""); + 0, sizeof(an_conf_cache), sysctl_an_cache_mode, "A", "", &Giant); /* * We probe for an Aironet 4500/4800 card by attempting to @@ -2975,13 +2975,13 @@ */ static int an_cache_mcastonly = 0; SYSCTL_INT(_hw_an, OID_AUTO, an_cache_mcastonly, CTLFLAG_RW, - &an_cache_mcastonly, 0, ""); + &an_cache_mcastonly, 0, "", &Giant); /* set true if you want to limit cache items to IP packets only */ static int an_cache_iponly = 1; SYSCTL_INT(_hw_an, OID_AUTO, an_cache_iponly, CTLFLAG_RW, - &an_cache_iponly, 0, ""); + &an_cache_iponly, 0, "", &Giant); /* * an_cache_store, per rx packet store signal diff -ur /home/refugee/freebsd/current/src/sys/dev/ata/ata-all.c repl/dev/ata/ata-all.c --- /home/refugee/freebsd/current/src/sys/dev/ata/ata-all.c Wed Dec 8 20:40:50 2004 +++ repl/dev/ata/ata-all.c Tue Dec 14 00:49:52 2004 @@ -88,16 +88,16 @@ static int atapi_dma = 1; /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters"); +SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters", NULL); TUNABLE_INT("hw.ata.ata_dma", &ata_dma); SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma, CTLFLAG_RDTUN, &ata_dma, 0, - "ATA disk DMA mode control"); + "ATA disk DMA mode control", &Giant); TUNABLE_INT("hw.ata.wc", &ata_wc); SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLAG_RDTUN, &ata_wc, 0, - "ATA disk write caching"); + "ATA disk write caching", &Giant); TUNABLE_INT("hw.ata.atapi_dma", &atapi_dma); SYSCTL_INT(_hw_ata, OID_AUTO, atapi_dma, CTLFLAG_RDTUN, &atapi_dma, 0, - "ATAPI device DMA mode control"); + "ATAPI device DMA mode control", &Giant); /* * newbus device interface related functions diff -ur /home/refugee/freebsd/current/src/sys/dev/ath/ath_rate/amrr/amrr.c repl/dev/ath/ath_rate/amrr/amrr.c --- /home/refugee/freebsd/current/src/sys/dev/ath/ath_rate/amrr/amrr.c Wed Dec 8 12:32:01 2004 +++ repl/dev/ath/ath_rate/amrr/amrr.c Tue Dec 14 00:49:52 2004 @@ -480,19 +480,19 @@ static void ath_rate_sysctlattach(struct ath_softc *sc) { - struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev); - struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev, &Giant); + struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev, &Giant); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "rate_interval", CTLFLAG_RW, &ath_rateinterval, 0, - "rate control: operation interval (ms)"); + "rate control: operation interval (ms)", &Giant); /* XXX bounds check values */ SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "max_sucess_threshold", CTLFLAG_RW, - &ath_rate_max_success_threshold, 0, ""); + &ath_rate_max_success_threshold, 0, "", &Giant); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "min_sucess_threshold", CTLFLAG_RW, - &ath_rate_min_success_threshold, 0, ""); + &ath_rate_min_success_threshold, 0, "", &Giant); } struct ath_ratectrl * diff -ur /home/refugee/freebsd/current/src/sys/dev/ath/ath_rate/onoe/onoe.c repl/dev/ath/ath_rate/onoe/onoe.c --- /home/refugee/freebsd/current/src/sys/dev/ath/ath_rate/onoe/onoe.c Wed Dec 8 12:32:02 2004 +++ repl/dev/ath/ath_rate/onoe/onoe.c Tue Dec 14 00:49:52 2004 @@ -461,19 +461,19 @@ static void ath_rate_sysctlattach(struct ath_softc *sc) { - struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev); - struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev, &Giant); + struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev, &Giant); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "rate_interval", CTLFLAG_RW, &ath_rateinterval, 0, - "rate control: operation interval (ms)"); + "rate control: operation interval (ms)", &Giant); /* XXX bounds check values */ SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "rate_raise", CTLFLAG_RW, &ath_rate_raise, 0, - "rate control: retry threshold to credit rate raise (%%)"); + "rate control: retry threshold to credit rate raise (%%)", &Giant); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "rate_raise_threshold", CTLFLAG_RW, &ath_rate_raise_threshold,0, - "rate control: # good periods before raising rate"); + "rate control: # good periods before raising rate", &Giant); } struct ath_ratectrl * diff -ur /home/refugee/freebsd/current/src/sys/dev/ath/if_ath.c repl/dev/ath/if_ath.c --- /home/refugee/freebsd/current/src/sys/dev/ath/if_ath.c Wed Dec 8 20:40:51 2004 +++ repl/dev/ath/if_ath.c Tue Dec 14 00:49:52 2004 @@ -172,30 +172,30 @@ /* XXX validate sysctl values */ static int ath_dwelltime = 200; /* 5 channels/second */ SYSCTL_INT(_hw_ath, OID_AUTO, dwell, CTLFLAG_RW, &ath_dwelltime, - 0, "channel dwell time (ms) for AP/station scanning"); + 0, "channel dwell time (ms) for AP/station scanning", &Giant); static int ath_calinterval = 30; /* calibrate every 30 secs */ SYSCTL_INT(_hw_ath, OID_AUTO, calibrate, CTLFLAG_RW, &ath_calinterval, - 0, "chip calibration interval (secs)"); + 0, "chip calibration interval (secs)", &Giant); static int ath_outdoor = AH_TRUE; /* outdoor operation */ SYSCTL_INT(_hw_ath, OID_AUTO, outdoor, CTLFLAG_RD, &ath_outdoor, - 0, "outdoor operation"); + 0, "outdoor operation", &Giant); TUNABLE_INT("hw.ath.outdoor", &ath_outdoor); static int ath_xchanmode = AH_TRUE; /* extended channel use */ SYSCTL_INT(_hw_ath, OID_AUTO, xchanmode, CTLFLAG_RD, &ath_xchanmode, - 0, "extended channel mode"); + 0, "extended channel mode", &Giant); TUNABLE_INT("hw.ath.xchanmode", &ath_xchanmode); static int ath_countrycode = CTRY_DEFAULT; /* country code */ SYSCTL_INT(_hw_ath, OID_AUTO, countrycode, CTLFLAG_RD, &ath_countrycode, - 0, "country code"); + 0, "country code", &Giant); TUNABLE_INT("hw.ath.countrycode", &ath_countrycode); static int ath_regdomain = 0; /* regulatory domain */ SYSCTL_INT(_hw_ath, OID_AUTO, regdomain, CTLFLAG_RD, &ath_regdomain, - 0, "regulatory domain"); + 0, "regulatory domain", &Giant); #ifdef AR_DEBUG static int ath_debug = 0; SYSCTL_INT(_hw_ath, OID_AUTO, debug, CTLFLAG_RW, &ath_debug, - 0, "control debugging printfs"); + 0, "control debugging printfs", &Giant); TUNABLE_INT("hw.ath.debug", &ath_debug); enum { ATH_DEBUG_XMIT = 0x00000001, /* basic xmit operation */ @@ -4314,7 +4314,7 @@ u_int slottime = ath_hal_getslottime(sc->sc_ah); int error; - error = sysctl_handle_int(oidp, &slottime, 0, req); + error = sysctl_handle_int(oidp, &slottime, 0, req, &Giant); if (error || !req->newptr) return error; return !ath_hal_setslottime(sc->sc_ah, slottime) ? EINVAL : 0; @@ -4327,7 +4327,7 @@ u_int acktimeout = ath_hal_getacktimeout(sc->sc_ah); int error; - error = sysctl_handle_int(oidp, &acktimeout, 0, req); + error = sysctl_handle_int(oidp, &acktimeout, 0, req, &Giant); if (error || !req->newptr) return error; return !ath_hal_setacktimeout(sc->sc_ah, acktimeout) ? EINVAL : 0; @@ -4340,7 +4340,7 @@ u_int ctstimeout = ath_hal_getctstimeout(sc->sc_ah); int error; - error = sysctl_handle_int(oidp, &ctstimeout, 0, req); + error = sysctl_handle_int(oidp, &ctstimeout, 0, req, &Giant); if (error || !req->newptr) return error; return !ath_hal_setctstimeout(sc->sc_ah, ctstimeout) ? EINVAL : 0; @@ -4353,7 +4353,7 @@ int softled = sc->sc_softled; int error; - error = sysctl_handle_int(oidp, &softled, 0, req); + error = sysctl_handle_int(oidp, &softled, 0, req, &Giant); if (error || !req->newptr) return error; if (softled > 1) @@ -4374,7 +4374,7 @@ u_int defantenna = ath_hal_getdefantenna(sc->sc_ah); int error; - error = sysctl_handle_int(oidp, &defantenna, 0, req); + error = sysctl_handle_int(oidp, &defantenna, 0, req, &Giant); if (!error && req->newptr) ath_hal_setdefantenna(sc->sc_ah, defantenna); return error; @@ -4387,7 +4387,7 @@ u_int diversity = sc->sc_diversity; int error; - error = sysctl_handle_int(oidp, &diversity, 0, req); + error = sysctl_handle_int(oidp, &diversity, 0, req, &Giant); if (error || !req->newptr) return error; sc->sc_diversity = diversity; @@ -4403,7 +4403,7 @@ if (!ath_hal_getdiag(sc->sc_ah, &diag)) return EINVAL; - error = sysctl_handle_int(oidp, &diag, 0, req); + error = sysctl_handle_int(oidp, &diag, 0, req, &Giant); if (error || !req->newptr) return error; return !ath_hal_setdiag(sc->sc_ah, diag) ? EINVAL : 0; @@ -4418,7 +4418,7 @@ int error; ath_hal_gettpscale(sc->sc_ah, &scale); - error = sysctl_handle_int(oidp, &scale, 0, req); + error = sysctl_handle_int(oidp, &scale, 0, req, &Giant); if (error || !req->newptr) return error; return !ath_hal_settpscale(sc->sc_ah, scale) ? EINVAL : ath_reset(ifp); @@ -4431,7 +4431,7 @@ u_int tpc = ath_hal_gettpc(sc->sc_ah); int error; - error = sysctl_handle_int(oidp, &tpc, 0, req); + error = sysctl_handle_int(oidp, &tpc, 0, req, &Giant); if (error || !req->newptr) return error; return !ath_hal_settpc(sc->sc_ah, tpc) ? EINVAL : 0; @@ -4440,21 +4440,21 @@ static void ath_sysctlattach(struct ath_softc *sc) { - struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev); - struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev, &Giant); + struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev, &Giant); ath_hal_getcountrycode(sc->sc_ah, &sc->sc_countrycode); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "countrycode", CTLFLAG_RD, &sc->sc_countrycode, 0, - "EEPROM country code"); + "EEPROM country code", &Giant); ath_hal_getregdomain(sc->sc_ah, &sc->sc_regdomain); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "regdomain", CTLFLAG_RD, &sc->sc_regdomain, 0, - "EEPROM regdomain code"); + "EEPROM regdomain code", &Giant); sc->sc_debug = ath_debug; SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "debug", CTLFLAG_RW, &sc->sc_debug, 0, - "control debugging printfs"); + "control debugging printfs", &Giant); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "slottime", CTLTYPE_INT | CTLFLAG_RW, sc, 0, @@ -4470,10 +4470,10 @@ ath_sysctl_softled, "I", "enable/disable software LED support"); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "ledpin", CTLFLAG_RW, &sc->sc_ledpin, 0, - "GPIO pin connected to LED"); + "GPIO pin connected to LED", &Giant); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "txantenna", CTLFLAG_RW, &sc->sc_txantenna, 0, - "tx antenna (0=auto)"); + "tx antenna (0=auto)", &Giant); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "rxantenna", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ath_sysctl_rxantenna, "I", "default/rx antenna"); @@ -4484,7 +4484,7 @@ sc->sc_txintrperiod = ATH_TXINTR_PERIOD; SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "txintrperiod", CTLFLAG_RW, &sc->sc_txintrperiod, 0, - "tx descriptor batching"); + "tx descriptor batching", &Giant); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "diag", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ath_sysctl_diag, "I", "h/w diagnostic control"); diff -ur /home/refugee/freebsd/current/src/sys/dev/bktr/bktr_os.c repl/dev/bktr/bktr_os.c --- /home/refugee/freebsd/current/src/sys/dev/bktr/bktr_os.c Sun Oct 31 04:52:11 2004 +++ repl/dev/bktr/bktr_os.c Tue Dec 14 00:49:50 2004 @@ -116,16 +116,16 @@ int bt848_dolby = 0; #endif -SYSCTL_NODE(_hw, OID_AUTO, bt848, CTLFLAG_RW, 0, "Bt848 Driver mgmt"); -SYSCTL_INT(_hw_bt848, OID_AUTO, card, CTLFLAG_RW, &bt848_card, -1, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, tuner, CTLFLAG_RW, &bt848_tuner, -1, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, reverse_mute, CTLFLAG_RW, &bt848_reverse_mute, -1, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, format, CTLFLAG_RW, &bt848_format, -1, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, slow_msp_audio, CTLFLAG_RW, &bt848_slow_msp_audio, -1, ""); +SYSCTL_NODE(_hw, OID_AUTO, bt848, CTLFLAG_RW, 0, "Bt848 Driver mgmt", NULL); +SYSCTL_INT(_hw_bt848, OID_AUTO, card, CTLFLAG_RW, &bt848_card, -1, "", &Giant); +SYSCTL_INT(_hw_bt848, OID_AUTO, tuner, CTLFLAG_RW, &bt848_tuner, -1, "", &Giant); +SYSCTL_INT(_hw_bt848, OID_AUTO, reverse_mute, CTLFLAG_RW, &bt848_reverse_mute, -1, "", &Giant); +SYSCTL_INT(_hw_bt848, OID_AUTO, format, CTLFLAG_RW, &bt848_format, -1, "", &Giant); +SYSCTL_INT(_hw_bt848, OID_AUTO, slow_msp_audio, CTLFLAG_RW, &bt848_slow_msp_audio, -1, "", &Giant); #ifdef BKTR_NEW_MSP34XX_DRIVER -SYSCTL_INT(_hw_bt848, OID_AUTO, stereo_once, CTLFLAG_RW, &bt848_stereo_once, 0, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, amsound, CTLFLAG_RW, &bt848_amsound, 0, ""); -SYSCTL_INT(_hw_bt848, OID_AUTO, dolby, CTLFLAG_RW, &bt848_dolby, 0, ""); +SYSCTL_INT(_hw_bt848, OID_AUTO, stereo_once, CTLFLAG_RW, &bt848_stereo_once, 0, "", &Giant); +SYSCTL_INT(_hw_bt848, OID_AUTO, amsound, CTLFLAG_RW, &bt848_amsound, 0, "", &Giant); +SYSCTL_INT(_hw_bt848, OID_AUTO, dolby, CTLFLAG_RW, &bt848_dolby, 0, "", &Giant); #endif #endif /* end freebsd section */ diff -ur /home/refugee/freebsd/current/src/sys/dev/cardbus/cardbus.c repl/dev/cardbus/cardbus.c --- /home/refugee/freebsd/current/src/sys/dev/cardbus/cardbus.c Sun Oct 31 04:51:57 2004 +++ repl/dev/cardbus/cardbus.c Tue Dec 14 00:49:49 2004 @@ -56,19 +56,19 @@ #include "pcib_if.h" /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, cardbus, CTLFLAG_RD, 0, "CardBus parameters"); +SYSCTL_NODE(_hw, OID_AUTO, cardbus, CTLFLAG_RD, 0, "CardBus parameters", NULL); int cardbus_debug = 0; TUNABLE_INT("hw.cardbus.debug", &cardbus_debug); SYSCTL_INT(_hw_cardbus, OID_AUTO, debug, CTLFLAG_RW, &cardbus_debug, 0, - "CardBus debug"); + "CardBus debug", &Giant); int cardbus_cis_debug = 0; TUNABLE_INT("hw.cardbus.cis_debug", &cardbus_cis_debug); SYSCTL_INT(_hw_cardbus, OID_AUTO, cis_debug, CTLFLAG_RW, &cardbus_cis_debug, 0, - "CardBus CIS debug"); + "CardBus CIS debug", &Giant); #define DPRINTF(a) if (cardbus_debug) printf a #define DEVPRINTF(x) if (cardbus_debug) device_printf x diff -ur /home/refugee/freebsd/current/src/sys/dev/cs/if_cs.c repl/dev/cs/if_cs.c --- /home/refugee/freebsd/current/src/sys/dev/cs/if_cs.c Sun Oct 31 04:51:45 2004 +++ repl/dev/cs/if_cs.c Tue Dec 14 00:49:48 2004 @@ -99,23 +99,23 @@ devclass_t cs_devclass; /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, cs, CTLFLAG_RD, 0, "cs device parameters"); +SYSCTL_NODE(_hw, OID_AUTO, cs, CTLFLAG_RD, 0, "cs device parameters", NULL); int cs_debug = 0; TUNABLE_INT("hw.cs.debug", &cs_debug); SYSCTL_INT(_hw_cs, OID_AUTO, debug, CTLFLAG_RW, &cs_debug, 0, - "cs debug"); + "cs debug", &Giant); int cs_ignore_cksum_failure = 0; TUNABLE_INT("hw.cs.ignore_checksum_failure", &cs_ignore_cksum_failure); SYSCTL_INT(_hw_cs, OID_AUTO, ignore_checksum_failure, CTLFLAG_RW, &cs_ignore_cksum_failure, 0, - "ignore checksum errors in cs card EEPROM"); + "ignore checksum errors in cs card EEPROM", &Giant); static int cs_recv_delay = 570; TUNABLE_INT("hw.cs.recv_delay", &cs_ignore_cksum_failure); -SYSCTL_INT(_hw_cs, OID_AUTO, recv_delay, CTLFLAG_RW, &cs_recv_delay, 570, ""); +SYSCTL_INT(_hw_cs, OID_AUTO, recv_delay, CTLFLAG_RW, &cs_recv_delay, 570, "", &Giant); static int get_eeprom_data(struct cs_softc *sc, int off, int len, uint16_t *buffer) diff -ur /home/refugee/freebsd/current/src/sys/dev/dcons/dcons_os.c repl/dev/dcons/dcons_os.c --- /home/refugee/freebsd/current/src/sys/dev/dcons/dcons_os.c Sun Oct 31 05:07:37 2004 +++ repl/dev/dcons/dcons_os.c Tue Dec 14 00:49:50 2004 @@ -144,9 +144,9 @@ static struct dcons_softc sc[DCONS_NPORT]; -SYSCTL_NODE(_kern, OID_AUTO, dcons, CTLFLAG_RD, 0, "Dumb Console"); +SYSCTL_NODE(_kern, OID_AUTO, dcons, CTLFLAG_RD, 0, "Dumb Console", NULL); SYSCTL_INT(_kern_dcons, OID_AUTO, poll_hz, CTLFLAG_RW, &poll_hz, 0, - "dcons polling rate"); + "dcons polling rate", &Giant); static int drv_init = 0; static struct callout dcons_callout; diff -ur /home/refugee/freebsd/current/src/sys/dev/em/if_em.c repl/dev/em/if_em.c --- /home/refugee/freebsd/current/src/sys/dev/em/if_em.c Sun Nov 21 00:02:53 2004 +++ repl/dev/em/if_em.c Tue Dec 14 00:49:49 2004 @@ -173,12 +173,12 @@ static void em_dma_free(struct adapter *, struct em_dma_alloc *); static void em_print_debug_info(struct adapter *); static int em_is_valid_ether_addr(u_int8_t *); -static int em_sysctl_stats(SYSCTL_HANDLER_ARGS); -static int em_sysctl_debug_info(SYSCTL_HANDLER_ARGS); +static int em_sysctl_stats(SYSCTL_HANDLER_ARGS, &Giant); +static int em_sysctl_debug_info(SYSCTL_HANDLER_ARGS, &Giant); static u_int32_t em_fill_descriptors (u_int64_t address, u_int32_t length, PDESC_ARRAY desc_array); -static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS); +static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS, &Giant); static void em_add_int_delay_sysctl(struct adapter *, const char *, const char *, struct em_int_delay_info *, int, int); @@ -3337,7 +3337,7 @@ struct adapter *adapter; result = -1; - error = sysctl_handle_int(oidp, &result, 0, req); + error = sysctl_handle_int(oidp, &result, 0, req, &Giant); if (error || !req->newptr) return (error); @@ -3359,7 +3359,7 @@ struct adapter *adapter; result = -1; - error = sysctl_handle_int(oidp, &result, 0, req); + error = sysctl_handle_int(oidp, &result, 0, req, &Giant); if (error || !req->newptr) return (error); @@ -3386,7 +3386,7 @@ info = (struct em_int_delay_info *)arg1; adapter = info->adapter; usecs = info->value; - error = sysctl_handle_int(oidp, &usecs, 0, req); + error = sysctl_handle_int(oidp, &usecs, 0, req, &Giant); if (error != 0 || req->newptr == NULL) return error; if (usecs < 0 || usecs > E1000_TICKS_TO_USECS(65535)) diff -ur /home/refugee/freebsd/current/src/sys/dev/en/midway.c repl/dev/en/midway.c --- /home/refugee/freebsd/current/src/sys/dev/en/midway.c Sun Oct 31 04:52:00 2004 +++ repl/dev/en/midway.c Tue Dec 14 00:49:49 2004 @@ -2908,7 +2908,7 @@ /* * Make the sysctl tree */ - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); if ((sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_hw_atm), OID_AUTO, @@ -3082,7 +3082,7 @@ if (sc->txtag != NULL) bus_dma_tag_destroy(sc->txtag); - (void)sysctl_ctx_free(&sc->sysctl_ctx); + (void)sysctl_ctx_free(&sc->sysctl_ctx, &Giant); cv_destroy(&sc->cv_close); mtx_destroy(&sc->en_mtx); diff -ur /home/refugee/freebsd/current/src/sys/dev/fatm/if_fatm.c repl/dev/fatm/if_fatm.c --- /home/refugee/freebsd/current/src/sys/dev/fatm/if_fatm.c Sun Oct 31 04:52:09 2004 +++ repl/dev/fatm/if_fatm.c Tue Dec 14 00:49:50 2004 @@ -2613,7 +2613,7 @@ bus_release_resource(dev, SYS_RES_MEMORY, sc->memid, sc->memres); - (void)sysctl_ctx_free(&sc->sysctl_ctx); + (void)sysctl_ctx_free(&sc->sysctl_ctx, &Giant); cv_destroy(&sc->cv_stat); cv_destroy(&sc->cv_regs); @@ -2767,7 +2767,7 @@ cv_init(&sc->cv_stat, "fatm_stat"); cv_init(&sc->cv_regs, "fatm_regs"); - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); /* * Make the sysctl tree diff -ur /home/refugee/freebsd/current/src/sys/dev/fdc/fdc.c repl/dev/fdc/fdc.c --- /home/refugee/freebsd/current/src/sys/dev/fdc/fdc.c Wed Dec 8 20:40:55 2004 +++ repl/dev/fdc/fdc.c Tue Dec 14 00:49:47 2004 @@ -256,31 +256,31 @@ static driver_intr_t fdc_intr; static void fdc_reset(struct fdc_data *); -SYSCTL_NODE(_debug, OID_AUTO, fdc, CTLFLAG_RW, 0, "fdc driver"); +SYSCTL_NODE(_debug, OID_AUTO, fdc, CTLFLAG_RW, 0, "fdc driver", NULL); static int fifo_threshold = 8; SYSCTL_INT(_debug_fdc, OID_AUTO, fifo, CTLFLAG_RW, &fifo_threshold, 0, - "FIFO threshold setting"); + "FIFO threshold setting", &Giant); static int debugflags = 0; SYSCTL_INT(_debug_fdc, OID_AUTO, debugflags, CTLFLAG_RW, &debugflags, 0, - "Debug flags"); + "Debug flags", &Giant); static int retries = 10; SYSCTL_INT(_debug_fdc, OID_AUTO, retries, CTLFLAG_RW, &retries, 0, - "Number of retries to attempt"); + "Number of retries to attempt", &Giant); static int spec1 = 0xaf; SYSCTL_INT(_debug_fdc, OID_AUTO, spec1, CTLFLAG_RW, &spec1, 0, - "Specification byte one (step-rate + head unload)"); + "Specification byte one (step-rate + head unload)", &Giant); static int spec2 = 0x10; SYSCTL_INT(_debug_fdc, OID_AUTO, spec2, CTLFLAG_RW, &spec2, 0, - "Specification byte two (head load time + no-dma)"); + "Specification byte two (head load time + no-dma)", &Giant); static int settle; SYSCTL_INT(_debug_fdc, OID_AUTO, settle, CTLFLAG_RW, &settle, 0, - "Head settling time in sec/hz"); + "Head settling time in sec/hz", &Giant); static void fdprinttype(struct fd_type *ft) diff -ur /home/refugee/freebsd/current/src/sys/dev/firewire/firewire.c repl/dev/firewire/firewire.c --- /home/refugee/freebsd/current/src/sys/dev/firewire/firewire.c Sun Oct 31 04:51:51 2004 +++ repl/dev/firewire/firewire.c Tue Dec 14 00:49:48 2004 @@ -75,12 +75,12 @@ int firewire_debug=0, try_bmr=1, hold_count=3; SYSCTL_INT(_debug, OID_AUTO, firewire_debug, CTLFLAG_RW, &firewire_debug, 0, - "FireWire driver debug flag"); -SYSCTL_NODE(_hw, OID_AUTO, firewire, CTLFLAG_RD, 0, "FireWire Subsystem"); + "FireWire driver debug flag", &Giant); +SYSCTL_NODE(_hw, OID_AUTO, firewire, CTLFLAG_RD, 0, "FireWire Subsystem", NULL); SYSCTL_INT(_hw_firewire, OID_AUTO, try_bmr, CTLFLAG_RW, &try_bmr, 0, - "Try to be a bus manager"); + "Try to be a bus manager", &Giant); SYSCTL_INT(_hw_firewire, OID_AUTO, hold_count, CTLFLAG_RW, &hold_count, 0, - "Number of count of bus resets for removing lost device information"); + "Number of count of bus resets for removing lost device information", &Giant); MALLOC_DEFINE(M_FW, "firewire", "FireWire"); MALLOC_DEFINE(M_FWXFER, "fw_xfer", "XFER/FireWire"); diff -ur /home/refugee/freebsd/current/src/sys/dev/firewire/fwmem.c repl/dev/firewire/fwmem.c --- /home/refugee/freebsd/current/src/sys/dev/firewire/fwmem.c Sun Nov 14 03:56:04 2004 +++ repl/dev/firewire/fwmem.c Tue Dec 14 00:49:48 2004 @@ -76,13 +76,13 @@ SYSCTL_NODE(_hw_firewire, OID_AUTO, fwmem, CTLFLAG_RD, 0, "FireWire Memory Access"); SYSCTL_UINT(_hw_firewire_fwmem, OID_AUTO, eui64_hi, CTLFLAG_RW, - &fwmem_eui64.hi, 0, "Fwmem target EUI64 high"); + &fwmem_eui64.hi, 0, "Fwmem target EUI64 high", &Giant); SYSCTL_UINT(_hw_firewire_fwmem, OID_AUTO, eui64_lo, CTLFLAG_RW, - &fwmem_eui64.lo, 0, "Fwmem target EUI64 low"); + &fwmem_eui64.lo, 0, "Fwmem target EUI64 low", &Giant); SYSCTL_INT(_hw_firewire_fwmem, OID_AUTO, speed, CTLFLAG_RW, &fwmem_speed, 0, - "Fwmem link speed"); + "Fwmem link speed", &Giant); SYSCTL_INT(_debug, OID_AUTO, fwmem_debug, CTLFLAG_RW, &fwmem_debug, 0, - "Fwmem driver debug flag"); + "Fwmem driver debug flag", &Giant); MALLOC_DEFINE(M_FWMEM, "fwmem", "fwmem/FireWire"); diff -ur /home/refugee/freebsd/current/src/sys/dev/firewire/if_fwe.c repl/dev/firewire/if_fwe.c --- /home/refugee/freebsd/current/src/sys/dev/firewire/if_fwe.c Sun Oct 31 04:51:51 2004 +++ repl/dev/firewire/if_fwe.c Tue Dec 14 00:49:48 2004 @@ -83,16 +83,16 @@ static int rx_queue_len = FWMAXQUEUE; MALLOC_DEFINE(M_FWE, "if_fwe", "Ethernet over FireWire interface"); -SYSCTL_INT(_debug, OID_AUTO, if_fwe_debug, CTLFLAG_RW, &fwedebug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, if_fwe_debug, CTLFLAG_RW, &fwedebug, 0, "", &Giant); SYSCTL_DECL(_hw_firewire); SYSCTL_NODE(_hw_firewire, OID_AUTO, fwe, CTLFLAG_RD, 0, "Ethernet emulation subsystem"); SYSCTL_INT(_hw_firewire_fwe, OID_AUTO, stream_ch, CTLFLAG_RW, &stream_ch, 0, - "Stream channel to use"); + "Stream channel to use", &Giant); SYSCTL_INT(_hw_firewire_fwe, OID_AUTO, tx_speed, CTLFLAG_RW, &tx_speed, 0, - "Transmission speed"); + "Transmission speed", &Giant); SYSCTL_INT(_hw_firewire_fwe, OID_AUTO, rx_queue_len, CTLFLAG_RW, &rx_queue_len, - 0, "Length of the receive queue"); + 0, "Length of the receive queue", &Giant); TUNABLE_INT("hw.firewire.fwe.stream_ch", &stream_ch); TUNABLE_INT("hw.firewire.fwe.tx_speed", &tx_speed); diff -ur /home/refugee/freebsd/current/src/sys/dev/firewire/if_fwip.c repl/dev/firewire/if_fwip.c --- /home/refugee/freebsd/current/src/sys/dev/firewire/if_fwip.c Sun Oct 31 04:51:51 2004 +++ repl/dev/firewire/if_fwip.c Tue Dec 14 00:49:48 2004 @@ -96,12 +96,12 @@ static int rx_queue_len = FWMAXQUEUE; MALLOC_DEFINE(M_FWIP, "if_fwip", "IP over FireWire interface"); -SYSCTL_INT(_debug, OID_AUTO, if_fwip_debug, CTLFLAG_RW, &fwipdebug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, if_fwip_debug, CTLFLAG_RW, &fwipdebug, 0, "", &Giant); SYSCTL_DECL(_hw_firewire); SYSCTL_NODE(_hw_firewire, OID_AUTO, fwip, CTLFLAG_RD, 0, "Firewire ip subsystem"); SYSCTL_INT(_hw_firewire_fwip, OID_AUTO, rx_queue_len, CTLFLAG_RW, &rx_queue_len, - 0, "Length of the receive queue"); + 0, "Length of the receive queue", &Giant); TUNABLE_INT("hw.firewire.fwip.rx_queue_len", &rx_queue_len); diff -ur /home/refugee/freebsd/current/src/sys/dev/firewire/sbp.c repl/dev/firewire/sbp.c --- /home/refugee/freebsd/current/src/sys/dev/firewire/sbp.c Sun Oct 31 04:51:51 2004 +++ repl/dev/firewire/sbp.c Tue Dec 14 00:49:48 2004 @@ -131,23 +131,23 @@ static int sbp_tags = 0; SYSCTL_DECL(_hw_firewire); -SYSCTL_NODE(_hw_firewire, OID_AUTO, sbp, CTLFLAG_RD, 0, "SBP-II Subsystem"); +SYSCTL_NODE(_hw_firewire, OID_AUTO, sbp, CTLFLAG_RD, 0, "SBP-II Subsystem", NULL); SYSCTL_INT(_debug, OID_AUTO, sbp_debug, CTLFLAG_RW, &debug, 0, - "SBP debug flag"); + "SBP debug flag", &Giant); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, auto_login, CTLFLAG_RW, &auto_login, 0, - "SBP perform login automatically"); + "SBP perform login automatically", &Giant); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, max_speed, CTLFLAG_RW, &max_speed, 0, - "SBP transfer max speed"); + "SBP transfer max speed", &Giant); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, exclusive_login, CTLFLAG_RW, - &ex_login, 0, "SBP enable exclusive login"); + &ex_login, 0, "SBP enable exclusive login", &Giant); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, login_delay, CTLFLAG_RW, - &login_delay, 0, "SBP login delay in msec"); + &login_delay, 0, "SBP login delay in msec", &Giant); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, scan_delay, CTLFLAG_RW, - &scan_delay, 0, "SBP scan delay in msec"); + &scan_delay, 0, "SBP scan delay in msec", &Giant); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, use_doorbell, CTLFLAG_RW, - &use_doorbell, 0, "SBP use doorbell request"); + &use_doorbell, 0, "SBP use doorbell request", &Giant); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, tags, CTLFLAG_RW, &sbp_tags, 0, - "SBP tagged queuing support"); + "SBP tagged queuing support", &Giant); TUNABLE_INT("hw.firewire.sbp.auto_login", &auto_login); TUNABLE_INT("hw.firewire.sbp.max_speed", &max_speed); diff -ur /home/refugee/freebsd/current/src/sys/dev/firewire/sbp_targ.c repl/dev/firewire/sbp_targ.c --- /home/refugee/freebsd/current/src/sys/dev/firewire/sbp_targ.c Sun Oct 31 04:51:51 2004 +++ repl/dev/firewire/sbp_targ.c Tue Dec 14 00:49:48 2004 @@ -99,7 +99,7 @@ static int debug = 0; SYSCTL_INT(_debug, OID_AUTO, sbp_targ_debug, CTLFLAG_RW, &debug, 0, - "SBP target mode debug flag"); + "SBP target mode debug flag", &Giant); struct sbp_targ_login { struct sbp_targ_lstate *lstate; diff -ur /home/refugee/freebsd/current/src/sys/dev/fxp/if_fxp.c repl/dev/fxp/if_fxp.c --- /home/refugee/freebsd/current/src/sys/dev/fxp/if_fxp.c Sun Nov 21 00:02:53 2004 +++ repl/dev/fxp/if_fxp.c Tue Dec 14 00:49:51 2004 @@ -242,9 +242,9 @@ int value); static void fxp_load_ucode(struct fxp_softc *sc); static int sysctl_int_range(SYSCTL_HANDLER_ARGS, - int low, int high); -static int sysctl_hw_fxp_bundle_max(SYSCTL_HANDLER_ARGS); -static int sysctl_hw_fxp_int_delay(SYSCTL_HANDLER_ARGS); + int low, int high, &Giant); +static int sysctl_hw_fxp_bundle_max(SYSCTL_HANDLER_ARGS, &Giant); +static int sysctl_hw_fxp_int_delay(SYSCTL_HANDLER_ARGS, &Giant); static void fxp_scb_wait(struct fxp_softc *sc); static void fxp_scb_cmd(struct fxp_softc *sc, int cmd); static void fxp_dma_wait(struct fxp_softc *sc, @@ -460,20 +460,20 @@ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "int_delay", CTLTYPE_INT | CTLFLAG_RW, &sc->tunable_int_delay, 0, sysctl_hw_fxp_int_delay, "I", - "FXP driver receive interrupt microcode bundling delay"); + "FXP driver receive interrupt microcode bundling delay", &Giant); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "bundle_max", CTLTYPE_INT | CTLFLAG_RW, &sc->tunable_bundle_max, 0, sysctl_hw_fxp_bundle_max, "I", - "FXP driver receive interrupt microcode bundle size limit"); + "FXP driver receive interrupt microcode bundle size limit", &Giant); SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "rnr", CTLFLAG_RD, &sc->rnr, 0, - "FXP RNR events"); + "FXP RNR events", &Giant); SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "noflow", CTLFLAG_RW, &sc->tunable_noflow, 0, - "FXP flow control disabled"); + "FXP flow control disabled", &Giant); /* * Pull in device tunables. @@ -2693,7 +2693,7 @@ int error, value; value = *(int *)arg1; - error = sysctl_handle_int(oidp, &value, 0, req); + error = sysctl_handle_int(oidp, &value, 0, req, &Giant); if (error || !req->newptr) return (error); if (value < low || value > high) @@ -2709,11 +2709,11 @@ static int sysctl_hw_fxp_int_delay(SYSCTL_HANDLER_ARGS) { - return (sysctl_int_range(oidp, arg1, arg2, req, 300, 3000)); + return (sysctl_int_range(oidp, arg1, arg2, req, 300, 3000), &Giant); } static int sysctl_hw_fxp_bundle_max(SYSCTL_HANDLER_ARGS) { - return (sysctl_int_range(oidp, arg1, arg2, req, 1, 0xffff)); + return (sysctl_int_range(oidp, arg1, arg2, req, 1, 0xffff), &Giant); } diff -ur /home/refugee/freebsd/current/src/sys/dev/hatm/if_hatm.c repl/dev/hatm/if_hatm.c --- /home/refugee/freebsd/current/src/sys/dev/hatm/if_hatm.c Sun Oct 31 04:51:58 2004 +++ repl/dev/hatm/if_hatm.c Tue Dec 14 00:49:49 2004 @@ -491,7 +491,7 @@ bus_release_resource(sc->dev, SYS_RES_MEMORY, sc->memid, sc->memres); - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); cv_destroy(&sc->cv_rcclose); cv_destroy(&sc->vcc_cv); @@ -1309,7 +1309,7 @@ if (SYSCTL_ADD_UINT(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, var, rw ? CTLFLAG_RW : CTLFLAG_RD, ptr, 0, "") == NULL) - return (ENOMEM); + return (ENOMEM, &Giant); snprintf(full, sizeof(full), "hw.%s.%s", device_get_nameunit(sc->dev), var); @@ -1669,7 +1669,7 @@ cv_init(&sc->vcc_cv, "HEVCCcv"); cv_init(&sc->cv_rcclose, "RCClose"); - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); /* * 4.2 BIOS Configuration diff -ur /home/refugee/freebsd/current/src/sys/dev/hatm/if_hatm_ioctl.c repl/dev/hatm/if_hatm_ioctl.c --- /home/refugee/freebsd/current/src/sys/dev/hatm/if_hatm_ioctl.c Sun Oct 31 04:51:58 2004 +++ repl/dev/hatm/if_hatm_ioctl.c Tue Dec 14 00:49:49 2004 @@ -78,15 +78,15 @@ static u_int hatm_natm_traffic = ATMIO_TRAFFIC_UBR; static u_int hatm_natm_pcr = 0; -static int hatm_sysctl_natm_traffic(SYSCTL_HANDLER_ARGS); +static int hatm_sysctl_natm_traffic(SYSCTL_HANDLER_ARGS, &Giant); SYSCTL_DECL(_hw_atm); SYSCTL_PROC(_hw_atm, OID_AUTO, natm_traffic, CTLTYPE_UINT | CTLFLAG_RW, &hatm_natm_traffic, sizeof(hatm_natm_traffic), hatm_sysctl_natm_traffic, - "IU", "traffic type for NATM connections"); + "IU", "traffic type for NATM connections", &Giant); SYSCTL_UINT(_hw_atm, OID_AUTO, natm_pcr, CTLFLAG_RW, - &hatm_natm_pcr, 0, "PCR for NATM connections"); + &hatm_natm_pcr, 0, "PCR for NATM connections", &Giant); /* * Try to open the given VCC. @@ -372,7 +372,7 @@ int tmp; tmp = hatm_natm_traffic; - error = sysctl_handle_int(oidp, &tmp, 0, req); + error = sysctl_handle_int(oidp, &tmp, 0, req, &Giant); if (error != 0 || req->newptr == NULL) return (error); diff -ur /home/refugee/freebsd/current/src/sys/dev/idt/idt.c repl/dev/idt/idt.c --- /home/refugee/freebsd/current/src/sys/dev/idt/idt.c Sun Oct 31 04:51:37 2004 +++ repl/dev/idt/idt.c Tue Dec 14 00:49:46 2004 @@ -165,25 +165,25 @@ static int idt_sysctl_qptrhold = 1; /* hold TX queue pointer back */ int idt_sysctl_vbriscbr = 0; /* use CBR slots for VBR VC's */ -SYSCTL_NODE(_hw, OID_AUTO, idt, CTLFLAG_RW, 0, "IDT Nicstar"); +SYSCTL_NODE(_hw, OID_AUTO, idt, CTLFLAG_RW, 0, "IDT Nicstar", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, log_bufstat, CTLFLAG_RW, - &idt_sysctl_logbufs, 0, "Log buffer status"); + &idt_sysctl_logbufs, 0, "Log buffer status", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, log_vcs, CTLFLAG_RW, - &idt_sysctl_logvcs, 0, "Log VC open/close"); + &idt_sysctl_logvcs, 0, "Log VC open/close", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, bufs_large, CTLFLAG_RW, - &idt_sysctl_buflarge, IDT_LBUFS, "Large buffer queue"); + &idt_sysctl_buflarge, IDT_LBUFS, "Large buffer queue", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, bufs_small, CTLFLAG_RW, - &idt_sysctl_bufsmall, IDT_SBUFS, "Small buffer queue"); + &idt_sysctl_bufsmall, IDT_SBUFS, "Small buffer queue", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, cur_large, CTLFLAG_RD, - &idt_sysctl_curlarge, 0, "Current large queue"); + &idt_sysctl_curlarge, 0, "Current large queue", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, cur_small, CTLFLAG_RD, - &idt_sysctl_cursmall, 0, "Current small queue"); + &idt_sysctl_cursmall, 0, "Current small queue", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, qptr_hold, CTLFLAG_RW, - &idt_sysctl_qptrhold, 1, "Optimize TX queue ptr"); + &idt_sysctl_qptrhold, 1, "Optimize TX queue ptr", &Giant); SYSCTL_INT(_hw_idt, OID_AUTO, vbr_is_cbr, CTLFLAG_RW, - &idt_sysctl_vbriscbr, 0, "Use CBR for VBR VC's"); + &idt_sysctl_vbriscbr, 0, "Use CBR for VBR VC's", &Giant); /****************************************************************************** * @@ -1178,7 +1178,7 @@ idt_sysctl_buflarge = 10; while (card_small < idt_sysctl_bufsmall) { /* 05/25/2001 from fixed */ - MGETHDR(m1, M_DONTWAIT, MT_DATA); + MGETHDR(m1, M_DONTWAIT, MT_DATA, &Giant); if (m1 == NULL) break; MGETHDR(m2, M_DONTWAIT, MT_DATA); @@ -1201,7 +1201,7 @@ } while (card_large < idt_sysctl_buflarge) { /* 05/25/2001 from fixed */ - m1 = idt_mbufcl_get(); + m1 = idt_mbufcl_get(, &Giant); if (m1 == NULL) break; m2 = idt_mbufcl_get(); @@ -1281,7 +1281,7 @@ device_printf(idt->dev, "BUFFER STATUS: small=%d/%d, large=%d/%d.\n", card_small, idt_sysctl_bufsmall, - card_large, idt_sysctl_buflarge); + card_large, idt_sysctl_buflarge, &Giant); } /* Since this is called when the card timer wraps, we should only see @@ -1633,13 +1633,13 @@ if (pcr == 171) { if (idt_sysctl_logvcs) device_printf(idt->dev, - "idt_slots_cbr: CBR channel=64000, 1 slot\n"); + "idt_slots_cbr: CBR channel=64000, 1 slot\n", &Giant); return (1); } if (pcr < 171) { if (idt_sysctl_logvcs) device_printf(idt->dev, - "idt_slots_cbr: CBR pcr %d rounded up to 1 slot\n", pcr); + "idt_slots_cbr: CBR pcr %d rounded up to 1 slot\n", pcr, &Giant); return (1); } bitrate = pcr * 47 * 8; @@ -1652,7 +1652,7 @@ if (idt_sysctl_logvcs) device_printf(idt->dev, - "idt_slots_cbr: CBR pcr=%d, slots=%d.\n", pcr, slots); + "idt_slots_cbr: CBR pcr=%d, slots=%d.\n", pcr, slots, &Giant); return (slots); } @@ -1813,14 +1813,14 @@ connection->queue = &idt->queue_ubr; if (idt_sysctl_logvcs) printf("idt_connect_txopen: UBR connection for %d/%d\n", - connection->vpi, connection->vci); + connection->vpi, connection->vci, &Giant); return (0); } if (connection->class == T_ATM_ABR) { /* ABR treated as UBR-plus */ connection->queue = &idt->queue_abr; if (idt_sysctl_logvcs) printf("idt_connect_txopen: UBR+ connection for %d/%d\n", - connection->vpi, connection->vci); + connection->vpi, connection->vci, &Giant); return (0); } if (connection->class == T_ATM_CBR) { @@ -1848,7 +1848,7 @@ splx(s); if (idt_sysctl_logvcs) printf("idt_connect_txopen: CBR connection for %d/%d\n", - connection->vpi, connection->vci); + connection->vpi, connection->vci, &Giant); connection->queue = txqueue; } if (connection->class == T_ATM_VBR) { @@ -1858,7 +1858,7 @@ * 12/17/2000 */ if (idt_sysctl_logvcs) printf("idt_connect_txopen: VBR connection for %d/%d\n", - connection->vpi, connection->vci); + connection->vpi, connection->vci, &Giant); } idt_connect_newvbr(idt);/* recalculate VBR divisor values */ @@ -1890,7 +1890,7 @@ txqueue = connection->queue; if (idt_sysctl_logvcs) printf("idt_connect_txclose: closing connection for %d/%d\n", - connection->vpi, connection->vci); + connection->vpi, connection->vci, &Giant); idt_queue_flush(connection); /* flush all connection mbufs */ @@ -1963,11 +1963,11 @@ divisor /= rate_noncbr; /* always < 1000, since newvbr < noncbr */ if (idt_sysctl_logvcs) - printf("idt_connect_newvbr: divisor=%d\n", divisor); + printf("idt_connect_newvbr: divisor=%d\n", divisor, &Giant); txqueue->vbr_m = vbr_div_m[divisor]; txqueue->vbr_n = vbr_div_n[divisor]; if (idt_sysctl_logvcs) - printf("idt_connect_newvbr: m=%d, n=%d\n", txqueue->vbr_m, txqueue->vbr_n); + printf("idt_connect_newvbr: m=%d, n=%d\n", txqueue->vbr_m, txqueue->vbr_n, &Giant); } /* For VBR, we track the sum of all the VBR peak cellrates, and divide @@ -2514,7 +2514,7 @@ * alignment problem is at 'malign' */ if (idt_sysctl_logvcs) - device_printf(idt->dev, "Bad TX buf alignment, len=%d.\n", tot_size); + device_printf(idt->dev, "Bad TX buf alignment, len=%d.\n", tot_size, &Giant); if (idt_mbuf_align(mfirst, NULL)) { printf("idt_transmit: cannot align first mbuf.\n"); @@ -3282,7 +3282,7 @@ * status */ } if (stat_val & STAT_REG_PHY) { /* physical interrupt */ - nicstar_phys(idt); + nicstar_phys(idt, &Giant); *idt->reg_stat = STAT_REG_PHY; /* clear the int flag */ } if (stat_val & STAT_REG_RSQAF) { /* RSQ almost full */ diff -ur /home/refugee/freebsd/current/src/sys/dev/idt/idt_harp.c repl/dev/idt/idt_harp.c --- /home/refugee/freebsd/current/src/sys/dev/idt/idt_harp.c Sun Oct 31 04:51:37 2004 +++ repl/dev/idt/idt_harp.c Tue Dec 14 00:49:46 2004 @@ -271,7 +271,7 @@ if (idt_sysctl_vbriscbr) return (NICCBR); /* use CBR slots for VBR VC's */ else - return (NICVBR); + return (NICVBR, &Giant); case T_ATM_CLASS_X: if (bearer->v.traffic_type == T_ATM_CBR) return (NICCBR); @@ -520,7 +520,7 @@ } if (idt_sysctl_logvcs) printf("idt_openvcc: %d/%d, PCR=%d, SCR=%d\n", vpi, vci, - connection->traf_pcr, connection->traf_scr); + connection->traf_pcr, connection->traf_scr, &Giant); idt_connect_opencls(idt, connection, 1); /* open entry in rcv * connect table */ @@ -577,7 +577,7 @@ connection->traf_scr = 0; if (idt_sysctl_logvcs) - printf("idt_closevcc: vpi=%d vci=%d\n", vpi, vci); + printf("idt_closevcc: vpi=%d vci=%d\n", vpi, vci, &Giant); return (0); } @@ -643,7 +643,7 @@ if (idt_sysctl_logvcs) device_printf(idt->dev, "Insufficient bandwidth (vc=%d cur=%d max=%d)\n", - slots_vc, slots_cur, slots_max); + slots_vc, slots_cur, slots_max, &Giant); return (EINVAL); } } diff -ur /home/refugee/freebsd/current/src/sys/dev/if_ndis/if_ndis.c repl/dev/if_ndis/if_ndis.c --- /home/refugee/freebsd/current/src/sys/dev/if_ndis/if_ndis.c Wed Dec 8 20:40:55 2004 +++ repl/dev/if_ndis/if_ndis.c Tue Dec 14 00:49:48 2004 @@ -401,7 +401,7 @@ sc->ndis_regvals = ndis_regvals; #if __FreeBSD_version < 502113 - sysctl_ctx_init(&sc->ndis_ctx); + sysctl_ctx_init(&sc->ndis_ctx, &Giant); #endif /* Create sysctl registry nodes */ @@ -771,7 +771,7 @@ bus_dma_tag_destroy(sc->ndis_parent_tag); #if __FreeBSD_version < 502113 - sysctl_ctx_free(&sc->ndis_ctx); + sysctl_ctx_free(&sc->ndis_ctx, &Giant); #endif mtx_destroy(&sc->ndis_mtx); diff -ur /home/refugee/freebsd/current/src/sys/dev/ixgb/if_ixgb.c repl/dev/ixgb/if_ixgb.c --- /home/refugee/freebsd/current/src/sys/dev/ixgb/if_ixgb.c Sun Oct 31 04:52:16 2004 +++ repl/dev/ixgb/if_ixgb.c Tue Dec 14 00:49:51 2004 @@ -134,7 +134,7 @@ struct mbuf *); static void ixgb_enable_vlans(struct adapter * adapter); static int ixgb_encap(struct adapter * adapter, struct mbuf * m_head); -static int ixgb_sysctl_stats(SYSCTL_HANDLER_ARGS); +static int ixgb_sysctl_stats(SYSCTL_HANDLER_ARGS, &Giant); static int ixgb_dma_malloc(struct adapter *, bus_size_t, struct ixgb_dma_alloc *, int); @@ -259,13 +259,13 @@ ixgb_adapter_list = adapter; /* SYSCTL APIs */ - sysctl_ctx_init(&adapter->sysctl_ctx); + sysctl_ctx_init(&adapter->sysctl_ctx, &Giant); adapter->sysctl_tree = SYSCTL_ADD_NODE(&adapter->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, device_get_nameunit(dev), CTLFLAG_RD, - 0, ""); + 0, "", &Giant); if (adapter->sysctl_tree == NULL) { error = EIO; goto err_sysctl; @@ -354,7 +354,7 @@ err_tx_desc: err_pci: ixgb_free_pci_resources(adapter); - sysctl_ctx_free(&adapter->sysctl_ctx); + sysctl_ctx_free(&adapter->sysctl_ctx, &Giant); err_sysctl: splx(s); return (error); @@ -415,7 +415,7 @@ ifp->if_timer = 0; adapter->sysctl_tree = NULL; - sysctl_ctx_free(&adapter->sysctl_ctx); + sysctl_ctx_free(&adapter->sysctl_ctx, &Giant); splx(s); return (0); @@ -2472,7 +2472,7 @@ struct adapter *adapter; result = -1; - error = sysctl_handle_int(oidp, &result, 0, req); + error = sysctl_handle_int(oidp, &result, 0, req, &Giant); if (error || !req->newptr) return (error); diff -ur /home/refugee/freebsd/current/src/sys/dev/kbd/kbd.c repl/dev/kbd/kbd.c --- /home/refugee/freebsd/current/src/sys/dev/kbd/kbd.c Sun Oct 31 04:51:44 2004 +++ repl/dev/kbd/kbd.c Tue Dec 14 00:49:47 2004 @@ -75,9 +75,9 @@ keyboard_switch_t **kbdsw = &kbdsw_ini; static int keymap_restrict_change; -SYSCTL_NODE(_hw, OID_AUTO, kbd, CTLFLAG_RD, 0, "kbd"); +SYSCTL_NODE(_hw, OID_AUTO, kbd, CTLFLAG_RD, 0, "kbd", NULL); SYSCTL_INT(_hw_kbd, OID_AUTO, keymap_restrict_change, CTLFLAG_RW, - &keymap_restrict_change, 0, "restrict ability to change keymap"); + &keymap_restrict_change, 0, "restrict ability to change keymap", &Giant); #define ARRAY_DELTA 4 diff -ur /home/refugee/freebsd/current/src/sys/dev/md/md.c repl/dev/md/md.c --- /home/refugee/freebsd/current/src/sys/dev/md/md.c Sun Nov 14 03:56:04 2004 +++ repl/dev/md/md.c Tue Dec 14 00:49:49 2004 @@ -96,7 +96,7 @@ static MALLOC_DEFINE(M_MDSECT, "MD sectors", "Memory Disk Sectors"); static int md_debug; -SYSCTL_INT(_debug, OID_AUTO, mddebug, CTLFLAG_RW, &md_debug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, mddebug, CTLFLAG_RW, &md_debug, 0, "", &Giant); #if defined(MD_ROOT) && defined(MD_ROOT_SIZE) /* Image gets put here: */ diff -ur /home/refugee/freebsd/current/src/sys/dev/musycc/musycc.c repl/dev/musycc/musycc.c --- /home/refugee/freebsd/current/src/sys/dev/musycc/musycc.c Sun Oct 31 04:52:20 2004 +++ repl/dev/musycc/musycc.c Tue Dec 14 00:49:52 2004 @@ -72,7 +72,7 @@ ); static int debug = 0; -SYSCTL_INT(_debug, OID_AUTO, musycc_debug, CTLFLAG_RW, &debug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, musycc_debug, CTLFLAG_RW, &debug, 0, "", &Giant); struct softc; static void init_8370(struct softc *sc); diff -ur /home/refugee/freebsd/current/src/sys/dev/owi/if_owi.c repl/dev/owi/if_owi.c --- /home/refugee/freebsd/current/src/sys/dev/owi/if_owi.c Sun Oct 31 04:52:19 2004 +++ repl/dev/owi/if_owi.c Tue Dec 14 00:49:51 2004 @@ -2074,13 +2074,13 @@ */ static int wi_cache_mcastonly = 0; SYSCTL_INT(_machdep, OID_AUTO, wi_cache_mcastonly, CTLFLAG_RW, - &wi_cache_mcastonly, 0, ""); + &wi_cache_mcastonly, 0, "", &Giant); /* set true if you want to limit cache items to IP packets only */ static int wi_cache_iponly = 1; SYSCTL_INT(_machdep, OID_AUTO, wi_cache_iponly, CTLFLAG_RW, - &wi_cache_iponly, 0, ""); + &wi_cache_iponly, 0, "", &Giant); /* * Original comments: diff -ur /home/refugee/freebsd/current/src/sys/dev/patm/if_patm_attach.c repl/dev/patm/if_patm_attach.c --- /home/refugee/freebsd/current/src/sys/dev/patm/if_patm_attach.c Sun Oct 31 04:51:59 2004 +++ repl/dev/patm/if_patm_attach.c Tue Dec 14 00:49:49 2004 @@ -121,8 +121,8 @@ static void patm_destroy(struct patm_softc *sc); -static int patm_sysctl_istats(SYSCTL_HANDLER_ARGS); -static int patm_sysctl_eeprom(SYSCTL_HANDLER_ARGS); +static int patm_sysctl_istats(SYSCTL_HANDLER_ARGS, &Giant); +static int patm_sysctl_eeprom(SYSCTL_HANDLER_ARGS, &Giant); static void patm_read_eeprom(struct patm_softc *sc); static int patm_sq_init(struct patm_softc *sc); @@ -132,8 +132,8 @@ static void patm_env_getuint(struct patm_softc *, u_int *, const char *); #ifdef PATM_DEBUG -static int patm_sysctl_regs(SYSCTL_HANDLER_ARGS); -static int patm_sysctl_tsq(SYSCTL_HANDLER_ARGS); +static int patm_sysctl_regs(SYSCTL_HANDLER_ARGS, &Giant); +static int patm_sysctl_tsq(SYSCTL_HANDLER_ARGS, &Giant); int patm_dump_vc(u_int unit, u_int vc) __unused; int patm_dump_regs(u_int unit) __unused; int patm_dump_sram(u_int unit, u_int from, u_int words) __unused; @@ -206,7 +206,7 @@ callout_init(&sc->tst_callout, CALLOUT_MPSAFE); - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); /* * Get revision @@ -551,7 +551,7 @@ IDT_PCI_REG_MEMBASE, sc->memres); /* this was initialize unconditionally */ - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); cv_destroy(&sc->vcc_cv); mtx_destroy(&sc->tst_lock); mtx_destroy(&sc->mtx); diff -ur /home/refugee/freebsd/current/src/sys/dev/pccard/pccard.c repl/dev/pccard/pccard.c --- /home/refugee/freebsd/current/src/sys/dev/pccard/pccard.c Sun Oct 31 04:52:05 2004 +++ repl/dev/pccard/pccard.c Tue Dec 14 00:49:50 2004 @@ -57,18 +57,18 @@ #define PCCARDDEBUG /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, pccard, CTLFLAG_RD, 0, "PCCARD parameters"); +SYSCTL_NODE(_hw, OID_AUTO, pccard, CTLFLAG_RD, 0, "PCCARD parameters", NULL); int pccard_debug = 0; TUNABLE_INT("hw.pccard.debug", &pccard_debug); SYSCTL_INT(_hw_pccard, OID_AUTO, debug, CTLFLAG_RW, &pccard_debug, 0, - "pccard debug"); + "pccard debug", &Giant); int pccard_cis_debug = 0; TUNABLE_INT("hw.pccard.cis_debug", &pccard_cis_debug); SYSCTL_INT(_hw_pccard, OID_AUTO, cis_debug, CTLFLAG_RW, - &pccard_cis_debug, 0, "pccard CIS debug"); + &pccard_cis_debug, 0, "pccard CIS debug", &Giant); #ifdef PCCARDDEBUG #define DPRINTF(arg) if (pccard_debug) printf arg diff -ur /home/refugee/freebsd/current/src/sys/dev/pccbb/pccbb.c repl/dev/pccbb/pccbb.c --- /home/refugee/freebsd/current/src/sys/dev/pccbb/pccbb.c Sun Oct 31 04:51:40 2004 +++ repl/dev/pccbb/pccbb.c Tue Dec 14 00:49:47 2004 @@ -130,31 +130,31 @@ devclass_t cbb_devclass; /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, cbb, CTLFLAG_RD, 0, "CBB parameters"); +SYSCTL_NODE(_hw, OID_AUTO, cbb, CTLFLAG_RD, 0, "CBB parameters", NULL); /* There's no way to say TUNEABLE_LONG to get the right types */ u_long cbb_start_mem = CBB_START_MEM; TUNABLE_INT("hw.cbb.start_memory", (int *)&cbb_start_mem); SYSCTL_ULONG(_hw_cbb, OID_AUTO, start_memory, CTLFLAG_RW, &cbb_start_mem, CBB_START_MEM, - "Starting address for memory allocations"); + "Starting address for memory allocations", &Giant); u_long cbb_start_16_io = CBB_START_16_IO; TUNABLE_INT("hw.cbb.start_16_io", (int *)&cbb_start_16_io); SYSCTL_ULONG(_hw_cbb, OID_AUTO, start_16_io, CTLFLAG_RW, &cbb_start_16_io, CBB_START_16_IO, - "Starting ioport for 16-bit cards"); + "Starting ioport for 16-bit cards", &Giant); u_long cbb_start_32_io = CBB_START_32_IO; TUNABLE_INT("hw.cbb.start_32_io", (int *)&cbb_start_32_io); SYSCTL_ULONG(_hw_cbb, OID_AUTO, start_32_io, CTLFLAG_RW, &cbb_start_32_io, CBB_START_32_IO, - "Starting ioport for 32-bit cards"); + "Starting ioport for 32-bit cards", &Giant); int cbb_debug = 0; TUNABLE_INT("hw.cbb.debug", &cbb_debug); SYSCTL_ULONG(_hw_cbb, OID_AUTO, debug, CTLFLAG_RW, &cbb_debug, 0, - "Verbose cardbus bridge debugging"); + "Verbose cardbus bridge debugging", &Giant); static void cbb_insert(struct cbb_softc *sc); static void cbb_removal(struct cbb_softc *sc); diff -ur /home/refugee/freebsd/current/src/sys/dev/pccbb/pccbb_isa.c repl/dev/pccbb/pccbb_isa.c --- /home/refugee/freebsd/current/src/sys/dev/pccbb/pccbb_isa.c Sun Oct 31 04:51:40 2004 +++ repl/dev/pccbb/pccbb_isa.c Tue Dec 14 00:49:47 2004 @@ -70,7 +70,7 @@ *****************************************************************************/ /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, pcic, CTLFLAG_RD, 0, "PCIC parameters"); +SYSCTL_NODE(_hw, OID_AUTO, pcic, CTLFLAG_RD, 0, "PCIC parameters", NULL); static int isa_intr_mask = EXCA_INT_MASK_ALLOWED; TUNABLE_INT("hw.cbb.intr_mask", &isa_intr_mask); @@ -79,7 +79,7 @@ correct, but some laptops do not route all the IRQ pins to the bridge to\n\ save wires. Sometimes you need a more restrictive mask because some of the\n\ hardware in your laptop may not have a driver so its IRQ might not be\n\ -allocated."); +allocated.", &Giant); /***************************************************************************** * End of configurable parameters. diff -ur /home/refugee/freebsd/current/src/sys/dev/pci/pci.c repl/dev/pci/pci.c --- /home/refugee/freebsd/current/src/sys/dev/pci/pci.c Wed Dec 8 20:40:55 2004 +++ repl/dev/pci/pci.c Tue Dec 14 00:49:50 2004 @@ -175,7 +175,7 @@ uint32_t pci_numdevs = 0; /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, pci, CTLFLAG_RD, 0, "PCI bus tuning parameters"); +SYSCTL_NODE(_hw, OID_AUTO, pci, CTLFLAG_RD, 0, "PCI bus tuning parameters", NULL); static int pci_enable_io_modes = 1; TUNABLE_INT("hw.pci.enable_io_modes", &pci_enable_io_modes); @@ -183,14 +183,14 @@ &pci_enable_io_modes, 1, "Enable I/O and memory bits in the config register. Some BIOSes do not\n\ enable these bits correctly. We'd like to do this all the time, but there\n\ -are some peripherals that this causes problems with."); +are some peripherals that this causes problems with.", &Giant); static int pci_do_powerstate = 1; TUNABLE_INT("hw.pci.do_powerstate", &pci_do_powerstate); SYSCTL_INT(_hw_pci, OID_AUTO, do_powerstate, CTLFLAG_RW, &pci_do_powerstate, 1, "Power down devices into D3 state when no driver attaches to them.\n\ -Otherwise, leave the device in D0 state when no driver attaches."); +Otherwise, leave the device in D0 state when no driver attaches.", &Giant); /* Find a device_t by bus/slot/function */ diff -ur /home/refugee/freebsd/current/src/sys/dev/random/randomdev_soft.c repl/dev/random/randomdev_soft.c --- /home/refugee/freebsd/current/src/sys/dev/random/randomdev_soft.c Sun Nov 14 03:56:06 2004 +++ repl/dev/random/randomdev_soft.c Tue Dec 14 00:49:49 2004 @@ -107,7 +107,7 @@ { if (oidp->oid_arg1 != NULL && *(u_int *)(oidp->oid_arg1) != 0) *(u_int *)(oidp->oid_arg1) = 1; - return sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); + return sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req, &Giant); } /* ARGSUSED */ @@ -122,7 +122,7 @@ o = SYSCTL_ADD_NODE(&random_clist, SYSCTL_STATIC_CHILDREN(_kern), OID_AUTO, "random", CTLFLAG_RW, 0, - "Software Random Number Generator"); + "Software Random Number Generator", &Giant); random_o = o; @@ -131,7 +131,7 @@ o = SYSCTL_ADD_NODE(&random_clist, SYSCTL_CHILDREN(random_o), OID_AUTO, "sys", CTLFLAG_RW, 0, - "Entropy Device Parameters"); + "Entropy Device Parameters", &Giant); random_sys_o = o; @@ -144,7 +144,7 @@ o = SYSCTL_ADD_NODE(&random_clist, SYSCTL_CHILDREN(random_sys_o), OID_AUTO, "harvest", CTLFLAG_RW, 0, - "Entropy Sources"); + "Entropy Sources", &Giant); random_sys_harvest_o = o; @@ -229,7 +229,7 @@ mtx_destroy(&harvest_mtx); - sysctl_ctx_free(&random_clist); + sysctl_ctx_free(&random_clist, &Giant); } /* ARGSUSED */ diff -ur /home/refugee/freebsd/current/src/sys/dev/random/yarrow.c repl/dev/random/yarrow.c --- /home/refugee/freebsd/current/src/sys/dev/random/yarrow.c Sun Oct 31 04:51:57 2004 +++ repl/dev/random/yarrow.c Tue Dec 14 00:49:49 2004 @@ -112,7 +112,7 @@ o = SYSCTL_ADD_NODE(clist, SYSCTL_CHILDREN(in_o), OID_AUTO, "yarrow", CTLFLAG_RW, 0, - "Yarrow Parameters"); + "Yarrow Parameters", &Giant); random_yarrow_o = o; diff -ur /home/refugee/freebsd/current/src/sys/dev/rndtest/rndtest.c repl/dev/rndtest/rndtest.c --- /home/refugee/freebsd/current/src/sys/dev/rndtest/rndtest.c Sun Oct 31 04:51:57 2004 +++ repl/dev/rndtest/rndtest.c Tue Dec 14 00:49:49 2004 @@ -70,17 +70,17 @@ #define RNDTEST_NTESTS (sizeof(rndtest_funcs)/sizeof(rndtest_funcs[0])) -SYSCTL_NODE(_kern, OID_AUTO, rndtest, CTLFLAG_RD, 0, "RNG test parameters"); +SYSCTL_NODE(_kern, OID_AUTO, rndtest, CTLFLAG_RD, 0, "RNG test parameters", NULL); static int rndtest_retest = 120; /* interval in seconds */ SYSCTL_INT(_kern_rndtest, OID_AUTO, retest, CTLFLAG_RW, &rndtest_retest, - 0, "retest interval (seconds)"); + 0, "retest interval (seconds)", &Giant); static struct rndtest_stats rndstats; SYSCTL_STRUCT(_kern_rndtest, OID_AUTO, stats, CTLFLAG_RD, &rndstats, - rndtest_stats, "RNG test statistics"); + rndtest_stats, "RNG test statistics", &Giant); static int rndtest_verbose = 1; /* report only failures */ SYSCTL_INT(_kern_rndtest, OID_AUTO, verbose, CTLFLAG_RW, &rndtest_verbose, - 0, "display results on console"); + 0, "display results on console", &Giant); struct rndtest_state * rndtest_attach(device_t dev) diff -ur /home/refugee/freebsd/current/src/sys/dev/safe/safe.c repl/dev/safe/safe.c --- /home/refugee/freebsd/current/src/sys/dev/safe/safe.c Sun Oct 31 04:52:12 2004 +++ repl/dev/safe/safe.c Tue Dec 14 00:49:50 2004 @@ -139,7 +139,7 @@ static int safe_free_entry(struct safe_softc *, struct safe_ringentry *); -SYSCTL_NODE(_hw, OID_AUTO, safe, CTLFLAG_RD, 0, "SafeNet driver parameters"); +SYSCTL_NODE(_hw, OID_AUTO, safe, CTLFLAG_RD, 0, "SafeNet driver parameters", NULL); #ifdef SAFE_DEBUG static void safe_dump_dmastatus(struct safe_softc *, const char *); @@ -152,7 +152,7 @@ static int safe_debug = 0; SYSCTL_INT(_hw_safe, OID_AUTO, debug, CTLFLAG_RW, &safe_debug, - 0, "control debugging msgs"); + 0, "control debugging msgs", &Giant); #define DPRINTF(_x) if (safe_debug) printf _x #else #define DPRINTF(_x) @@ -166,17 +166,17 @@ struct safe_stats safestats; SYSCTL_STRUCT(_hw_safe, OID_AUTO, stats, CTLFLAG_RD, &safestats, - safe_stats, "driver statistics"); + safe_stats, "driver statistics", &Giant); #ifndef SAFE_NO_RNG static int safe_rnginterval = 1; /* poll once a second */ SYSCTL_INT(_hw_safe, OID_AUTO, rnginterval, CTLFLAG_RW, &safe_rnginterval, - 0, "RNG polling interval (secs)"); + 0, "RNG polling interval (secs)", &Giant); static int safe_rngbufsize = 16; /* 64 bytes each poll */ SYSCTL_INT(_hw_safe, OID_AUTO, rngbufsize, CTLFLAG_RW, &safe_rngbufsize, - 0, "RNG polling buffer size (32-bit words)"); + 0, "RNG polling buffer size (32-bit words)", &Giant); static int safe_rngmaxalarm = 8; /* max alarms before reset */ SYSCTL_INT(_hw_safe, OID_AUTO, rngmaxalarm, CTLFLAG_RW, &safe_rngmaxalarm, - 0, "RNG max alarms before reset"); + 0, "RNG max alarms before reset", &Giant); #endif /* SAFE_NO_RNG */ static int @@ -2225,7 +2225,7 @@ strncpy(dmode, "", sizeof(dmode) - 1); dmode[sizeof(dmode) - 1] = '\0'; - error = sysctl_handle_string(oidp, &dmode[0], sizeof(dmode), req); + error = sysctl_handle_string(oidp, &dmode[0], sizeof(dmode), req, &Giant); if (error == 0 && req->newptr != NULL) { struct safe_softc *sc = safec; @@ -2244,5 +2244,5 @@ return error; } SYSCTL_PROC(_hw_safe, OID_AUTO, dump, CTLTYPE_STRING | CTLFLAG_RW, - 0, 0, sysctl_hw_safe_dump, "A", "Dump driver state"); + 0, 0, sysctl_hw_safe_dump, "A", "Dump driver state", &Giant); #endif /* SAFE_DEBUG */ diff -ur /home/refugee/freebsd/current/src/sys/dev/si/si.c repl/dev/si/si.c --- /home/refugee/freebsd/current/src/sys/dev/si/si.c Sun Oct 31 04:51:46 2004 +++ repl/dev/si/si.c Tue Dec 14 00:49:48 2004 @@ -115,7 +115,7 @@ static int si_Nmodules; static int si_debug = 0; /* data, not bss, so it's patchable */ -SYSCTL_INT(_machdep, OID_AUTO, si_debug, CTLFLAG_RW, &si_debug, 0, ""); +SYSCTL_INT(_machdep, OID_AUTO, si_debug, CTLFLAG_RW, &si_debug, 0, "", &Giant); TUNABLE_INT("machdep.si_debug", &si_debug); static int si_numunits; @@ -170,8 +170,8 @@ static int si_pollrate; /* in addition to irq */ static int si_realpoll = 0; /* poll HW on timer */ -SYSCTL_INT(_machdep, OID_AUTO, si_pollrate, CTLFLAG_RW, &si_pollrate, 0, ""); -SYSCTL_INT(_machdep, OID_AUTO, si_realpoll, CTLFLAG_RW, &si_realpoll, 0, ""); +SYSCTL_INT(_machdep, OID_AUTO, si_pollrate, CTLFLAG_RW, &si_pollrate, 0, "", &Giant); +SYSCTL_INT(_machdep, OID_AUTO, si_realpoll, CTLFLAG_RW, &si_realpoll, 0, "", &Giant); static int init_finished = 0; static void si_poll(void *); diff -ur /home/refugee/freebsd/current/src/sys/dev/sio/sio.c repl/dev/sio/sio.c --- /home/refugee/freebsd/current/src/sys/dev/sio/sio.c Sun Oct 31 04:51:42 2004 +++ repl/dev/sio/sio.c Tue Dec 14 00:49:47 2004 @@ -286,10 +286,10 @@ int comconsole = -1; static volatile speed_t comdefaultrate = CONSPEED; static u_long comdefaultrclk = DEFAULT_RCLK; -SYSCTL_ULONG(_machdep, OID_AUTO, conrclk, CTLFLAG_RW, &comdefaultrclk, 0, ""); +SYSCTL_ULONG(_machdep, OID_AUTO, conrclk, CTLFLAG_RW, &comdefaultrclk, 0, "", &Giant); static speed_t gdbdefaultrate = GDBSPEED; SYSCTL_UINT(_machdep, OID_AUTO, gdbspeed, CTLFLAG_RW, - &gdbdefaultrate, GDBSPEED, ""); + &gdbdefaultrate, GDBSPEED, "", &Giant); static u_int com_events; /* input chars + weighted output completions */ static Port_t siocniobase; static int siocnunit = -1; @@ -332,7 +332,7 @@ newspeed = comdefaultrate; - error = sysctl_handle_opaque(oidp, &newspeed, sizeof newspeed, req); + error = sysctl_handle_opaque(oidp, &newspeed, sizeof newspeed, req, &Giant); if (error || !req->newptr) return (error); @@ -370,7 +370,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, conspeed, CTLTYPE_INT | CTLFLAG_RW, - 0, 0, sysctl_machdep_comdefaultrate, "I", ""); + 0, 0, sysctl_machdep_comdefaultrate, "I", "", &Giant); /* TUNABLE_INT("machdep.conspeed", &comdefaultrate); */ #define SET_FLAG(dev, bit) device_set_flags(dev, device_get_flags(dev) | (bit)) @@ -1456,7 +1456,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, siots, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, sysctl_siots, "A", "sio timestamps"); + 0, 0, sysctl_siots, "A", "sio timestamps", &Giant); static void siointr1(com) diff -ur /home/refugee/freebsd/current/src/sys/dev/sound/pci/cmi.c repl/dev/sound/pci/cmi.c --- /home/refugee/freebsd/current/src/sys/dev/sound/pci/cmi.c Sun Oct 31 04:51:53 2004 +++ repl/dev/sound/pci/cmi.c Tue Dec 14 00:49:48 2004 @@ -733,7 +733,7 @@ SYSCTL_CHILDREN(snd_sysctl_tree_top(sc->dev)), OID_AUTO, "spdif_enabled", CTLFLAG_RW, &sc->spdif_enabled, 0, - "enable SPDIF output at 44.1 kHz and above"); + "enable SPDIF output at 44.1 kHz and above", &Giant); #endif /* SND_DYNSYSCTL */ return 0; } diff -ur /home/refugee/freebsd/current/src/sys/dev/sound/pci/es137x.c repl/dev/sound/pci/es137x.c --- /home/refugee/freebsd/current/src/sys/dev/sound/pci/es137x.c Sun Oct 31 04:51:53 2004 +++ repl/dev/sound/pci/es137x.c Tue Dec 14 00:49:48 2004 @@ -62,7 +62,7 @@ SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/es137x.c,v 1.52 2004/10/13 05:45:16 yongari Exp $"); static int debug = 0; -SYSCTL_INT(_debug, OID_AUTO, es_debug, CTLFLAG_RW, &debug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, es_debug, CTLFLAG_RW, &debug, 0, "", &Giant); #define MEM_MAP_REG 0x14 diff -ur /home/refugee/freebsd/current/src/sys/dev/sound/pci/ich.c repl/dev/sound/pci/ich.c --- /home/refugee/freebsd/current/src/sys/dev/sound/pci/ich.c Sun Oct 31 04:51:53 2004 +++ repl/dev/sound/pci/ich.c Tue Dec 14 00:49:48 2004 @@ -457,7 +457,7 @@ SYSCTL_CHILDREN(snd_sysctl_tree_top(sc->dev)), OID_AUTO, "ac97rate", CTLFLAG_RW, &sc->ac97rate, 48000, - "AC97 link rate (default = 48000)"); + "AC97 link rate (default = 48000)", &Giant); #endif /* SND_DYNSYSCTL */ return 0; } diff -ur /home/refugee/freebsd/current/src/sys/dev/sound/pci/maestro.c repl/dev/sound/pci/maestro.c --- /home/refugee/freebsd/current/src/sys/dev/sound/pci/maestro.c Sun Nov 14 03:56:06 2004 +++ repl/dev/sound/pci/maestro.c Tue Dec 14 00:49:48 2004 @@ -189,13 +189,13 @@ #endif static unsigned int powerstate_init = PCI_POWERSTATE_D2; -SYSCTL_NODE(_debug, OID_AUTO, maestro, CTLFLAG_RD, 0, ""); +SYSCTL_NODE(_debug, OID_AUTO, maestro, CTLFLAG_RD, 0, "", NULL); SYSCTL_UINT(_debug_maestro, OID_AUTO, powerstate_active, CTLFLAG_RW, - &powerstate_active, 0, "The Dx power state when active (0-1)"); + &powerstate_active, 0, "The Dx power state when active (0-1)", &Giant); SYSCTL_UINT(_debug_maestro, OID_AUTO, powerstate_idle, CTLFLAG_RW, - &powerstate_idle, 0, "The Dx power state when idle (0-2)"); + &powerstate_idle, 0, "The Dx power state when idle (0-2)", &Giant); SYSCTL_UINT(_debug_maestro, OID_AUTO, powerstate_init, CTLFLAG_RW, - &powerstate_init, 0, "The Dx power state prior to the first use (0-2)"); + &powerstate_init, 0, "The Dx power state prior to the first use (0-2)", &Giant); /* ----------------------------- diff -ur /home/refugee/freebsd/current/src/sys/dev/sound/pcm/channel.c repl/dev/sound/pcm/channel.c --- /home/refugee/freebsd/current/src/sys/dev/sound/pcm/channel.c Sun Oct 31 04:51:52 2004 +++ repl/dev/sound/pcm/channel.c Tue Dec 14 00:49:48 2004 @@ -50,7 +50,7 @@ int err, val; val = chn_targetirqrate; - err = sysctl_handle_int(oidp, &val, sizeof(val), req); + err = sysctl_handle_int(oidp, &val, sizeof(val), req, &Giant); if (val < 16 || val > 512) err = EINVAL; else @@ -59,10 +59,10 @@ return err; } SYSCTL_PROC(_hw_snd, OID_AUTO, targetirqrate, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(int), sysctl_hw_snd_targetirqrate, "I", ""); + 0, sizeof(int), sysctl_hw_snd_targetirqrate, "I", "", &Giant); static int report_soft_formats = 1; SYSCTL_INT(_hw_snd, OID_AUTO, report_soft_formats, CTLFLAG_RW, - &report_soft_formats, 1, "report software-emulated formats"); + &report_soft_formats, 1, "report software-emulated formats", &Giant); static int chn_buildfeeder(struct pcm_channel *c); diff -ur /home/refugee/freebsd/current/src/sys/dev/sound/pcm/mixer.c repl/dev/sound/pcm/mixer.c --- /home/refugee/freebsd/current/src/sys/dev/sound/pcm/mixer.c Sun Oct 31 04:51:52 2004 +++ repl/dev/sound/pcm/mixer.c Tue Dec 14 00:49:48 2004 @@ -304,7 +304,7 @@ snd_mtxlock(m->lock); strncpy(devname, snd_mixernames[m->hwvol_mixer], sizeof(devname)); snd_mtxunlock(m->lock); - error = sysctl_handle_string(oidp, &devname[0], sizeof(devname), req); + error = sysctl_handle_string(oidp, &devname[0], sizeof(devname), req, &Giant); snd_mtxlock(m->lock); if (error == 0 && req->newptr != NULL) { dev = mixer_lookup(devname); @@ -335,7 +335,7 @@ m->hwvol_step = 5; #ifdef SND_DYNSYSCTL SYSCTL_ADD_INT(snd_sysctl_tree(dev), SYSCTL_CHILDREN(snd_sysctl_tree_top(dev)), - OID_AUTO, "hwvol_step", CTLFLAG_RW, &m->hwvol_step, 0, ""); + OID_AUTO, "hwvol_step", CTLFLAG_RW, &m->hwvol_step, 0, "", &Giant); SYSCTL_ADD_PROC(snd_sysctl_tree(dev), SYSCTL_CHILDREN(snd_sysctl_tree_top(dev)), OID_AUTO, "hwvol_mixer", CTLTYPE_STRING | CTLFLAG_RW, m, 0, sysctl_hw_snd_hwvol_mixer, "A", ""); diff -ur /home/refugee/freebsd/current/src/sys/dev/sound/pcm/sndstat.c repl/dev/sound/pcm/sndstat.c --- /home/refugee/freebsd/current/src/sys/dev/sound/pcm/sndstat.c Sun Oct 31 04:51:52 2004 +++ repl/dev/sound/pcm/sndstat.c Tue Dec 14 00:49:48 2004 @@ -89,7 +89,7 @@ int error, verbose; verbose = sndstat_verbose; - error = sysctl_handle_int(oidp, &verbose, sizeof(verbose), req); + error = sysctl_handle_int(oidp, &verbose, sizeof(verbose), req, &Giant); if (error == 0 && req->newptr != NULL) { s = spltty(); sx_xlock(&sndstat_lock); @@ -103,7 +103,7 @@ return error; } SYSCTL_PROC(_hw_snd, OID_AUTO, verbose, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(int), sysctl_hw_sndverbose, "I", ""); + 0, sizeof(int), sysctl_hw_sndverbose, "I", "", &Giant); static int sndstat_open(struct cdev *i_dev, int flags, int mode, struct thread *td) diff -ur /home/refugee/freebsd/current/src/sys/dev/sound/pcm/sound.c repl/dev/sound/pcm/sound.c --- /home/refugee/freebsd/current/src/sys/dev/sound/pcm/sound.c Sun Oct 31 04:51:52 2004 +++ repl/dev/sound/pcm/sound.c Tue Dec 14 00:49:48 2004 @@ -46,14 +46,14 @@ int snd_maxautovchans = 0; TUNABLE_INT("hw.snd.maxautovchans", &snd_maxautovchans); -SYSCTL_NODE(_hw, OID_AUTO, snd, CTLFLAG_RD, 0, "Sound driver"); +SYSCTL_NODE(_hw, OID_AUTO, snd, CTLFLAG_RD, 0, "Sound driver", NULL); static int sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose); struct sysctl_ctx_list * snd_sysctl_tree(device_t dev) { - struct snddev_info *d = device_get_softc(dev); + struct snddev_info *d = device_get_softc(dev, &Giant); return &d->sysctl_tree; } @@ -61,7 +61,7 @@ struct sysctl_oid * snd_sysctl_tree_top(device_t dev) { - struct snddev_info *d = device_get_softc(dev); + struct snddev_info *d = device_get_softc(dev, &Giant); return d->sysctl_tree_top; } @@ -296,7 +296,7 @@ int error, unit; unit = snd_unit; - error = sysctl_handle_int(oidp, &unit, sizeof(unit), req); + error = sysctl_handle_int(oidp, &unit, sizeof(unit), req, &Giant); if (error == 0 && req->newptr != NULL) { if (unit < 0 || unit >= devclass_get_maxunit(pcm_devclass)) return EINVAL; @@ -308,7 +308,7 @@ return (error); } SYSCTL_PROC(_hw_snd, OID_AUTO, unit, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(int), sysctl_hw_snd_unit, "I", ""); + 0, sizeof(int), sysctl_hw_snd_unit, "I", "", &Giant); #endif static int @@ -318,7 +318,7 @@ int i, v, error; v = snd_maxautovchans; - error = sysctl_handle_int(oidp, &v, sizeof(v), req); + error = sysctl_handle_int(oidp, &v, sizeof(v), req, &Giant); if (error == 0 && req->newptr != NULL) { if (v < 0 || v >= SND_MAXVCHANS || pcm_devclass == NULL) return EINVAL; @@ -335,7 +335,7 @@ return (error); } SYSCTL_PROC(_hw_snd, OID_AUTO, maxautovchans, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(int), sysctl_hw_snd_maxautovchans, "I", ""); + 0, sizeof(int), sysctl_hw_snd_maxautovchans, "I", "", &Giant); struct pcm_channel * pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, int dir, void *devinfo) @@ -673,16 +673,16 @@ chn_init(d->fakechan, NULL, 0, 0); #ifdef SND_DYNSYSCTL - sysctl_ctx_init(&d->sysctl_tree); + sysctl_ctx_init(&d->sysctl_tree, &Giant); d->sysctl_tree_top = SYSCTL_ADD_NODE(&d->sysctl_tree, SYSCTL_STATIC_CHILDREN(_hw_snd), OID_AUTO, - device_get_nameunit(dev), CTLFLAG_RD, 0, ""); + device_get_nameunit(dev), CTLFLAG_RD, 0, "", &Giant); if (d->sysctl_tree_top == NULL) { - sysctl_ctx_free(&d->sysctl_tree); + sysctl_ctx_free(&d->sysctl_tree, &Giant); goto no; } SYSCTL_ADD_INT(snd_sysctl_tree(dev), SYSCTL_CHILDREN(snd_sysctl_tree_top(dev)), - OID_AUTO, "buffersize", CTLFLAG_RD, &d->bufsz, 0, ""); + OID_AUTO, "buffersize", CTLFLAG_RD, &d->bufsz, 0, "", &Giant); #endif if (numplay > 0) vchan_initsys(dev); @@ -741,7 +741,7 @@ #ifdef SND_DYNSYSCTL d->sysctl_tree_top = NULL; - sysctl_ctx_free(&d->sysctl_tree); + sysctl_ctx_free(&d->sysctl_tree, &Giant); #endif while (!SLIST_EMPTY(&d->channels)) pcm_killchan(dev); @@ -888,7 +888,7 @@ newcnt = cnt; - err = sysctl_handle_int(oidp, &newcnt, sizeof(newcnt), req); + err = sysctl_handle_int(oidp, &newcnt, sizeof(newcnt), req, &Giant); if (err == 0 && req->newptr != NULL) { diff -ur /home/refugee/freebsd/current/src/sys/dev/sound/usb/uaudio.c repl/dev/sound/usb/uaudio.c --- /home/refugee/freebsd/current/src/sys/dev/sound/usb/uaudio.c Sun Oct 31 04:51:52 2004 +++ repl/dev/sound/usb/uaudio.c Tue Dec 14 00:49:48 2004 @@ -90,9 +90,9 @@ #define DPRINTF(x) if (uaudiodebug) logprintf x #define DPRINTFN(n,x) if (uaudiodebug>(n)) logprintf x int uaudiodebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, uaudio, CTLFLAG_RW, 0, "USB uaudio"); +SYSCTL_NODE(_hw_usb, OID_AUTO, uaudio, CTLFLAG_RW, 0, "USB uaudio", NULL); SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, debug, CTLFLAG_RW, - &uaudiodebug, 0, "uaudio debug level"); + &uaudiodebug, 0, "uaudio debug level", &Giant); #else #define DPRINTF(x) #define DPRINTFN(n,x) diff -ur /home/refugee/freebsd/current/src/sys/dev/sx/sx.c repl/dev/sx/sx.c --- /home/refugee/freebsd/current/src/sys/dev/sx/sx.c Sun Oct 31 04:51:54 2004 +++ repl/dev/sx/sx.c Tue Dec 14 00:49:48 2004 @@ -75,7 +75,7 @@ static void sx_modem_state(struct sx_softc *sc, struct sx_port *pp, int card); static int sx_debug = 0; /* DBG_ALL|DBG_PRINTF|DBG_MODEM|DBG_IOCTL|DBG_PARAM;e */ -SYSCTL_INT(_machdep, OID_AUTO, sx_debug, CTLFLAG_RW, &sx_debug, 0, ""); +SYSCTL_INT(_machdep, OID_AUTO, sx_debug, CTLFLAG_RW, &sx_debug, 0, "", &Giant); static int sx_numunits; @@ -126,14 +126,14 @@ static volatile int in_interrupt = 0; /* Inside interrupt handler? */ static int sx_flags; /* The flags we were configured with. */ -SYSCTL_INT(_machdep, OID_AUTO, sx_flags, CTLFLAG_RW, &sx_flags, 0, ""); +SYSCTL_INT(_machdep, OID_AUTO, sx_flags, CTLFLAG_RW, &sx_flags, 0, "", &Giant); #ifdef POLL static int sx_pollrate; /* in addition to irq */ static int sx_realpoll = 0; /* poll HW on timer */ -SYSCTL_INT(_machdep, OID_AUTO, sx_pollrate, CTLFLAG_RW, &sx_pollrate, 0, ""); -SYSCTL_INT(_machdep, OID_AUTO, sx_realpoll, CTLFLAG_RW, &sx_realpoll, 0, ""); +SYSCTL_INT(_machdep, OID_AUTO, sx_pollrate, CTLFLAG_RW, &sx_pollrate, 0, "", &Giant); +SYSCTL_INT(_machdep, OID_AUTO, sx_realpoll, CTLFLAG_RW, &sx_realpoll, 0, "", &Giant); static int init_finished = 0; static void sx_poll(void *); diff -ur /home/refugee/freebsd/current/src/sys/dev/syscons/syscons.c repl/dev/syscons/syscons.c --- /home/refugee/freebsd/current/src/sys/dev/syscons/syscons.c Wed Dec 8 20:40:56 2004 +++ repl/dev/syscons/syscons.c Tue Dec 14 00:49:47 2004 @@ -118,12 +118,12 @@ static void (*current_saver)(sc_softc_t *, int) = none_saver; #endif -SYSCTL_NODE(_hw, OID_AUTO, syscons, CTLFLAG_RD, 0, "syscons"); -SYSCTL_NODE(_hw_syscons, OID_AUTO, saver, CTLFLAG_RD, 0, "saver"); +SYSCTL_NODE(_hw, OID_AUTO, syscons, CTLFLAG_RD, 0, "syscons", NULL); +SYSCTL_NODE(_hw_syscons, OID_AUTO, saver, CTLFLAG_RD, 0, "saver", NULL); SYSCTL_INT(_hw_syscons_saver, OID_AUTO, keybonly, CTLFLAG_RW, - &sc_saver_keyb_only, 0, "screen saver interrupted by input only"); + &sc_saver_keyb_only, 0, "screen saver interrupted by input only", &Giant); SYSCTL_INT(_hw_syscons, OID_AUTO, bell, CTLFLAG_RW, &enable_bell, - 0, "enable bell"); + 0, "enable bell", &Giant); #if !defined(SC_NO_FONT_LOADING) && defined(SC_DFLT_FONT) #include "font.h" #endif @@ -134,7 +134,7 @@ static int enable_panic_key; SYSCTL_INT(_machdep, OID_AUTO, enable_panic_key, CTLFLAG_RW, &enable_panic_key, - 0, "Enable panic via keypress specified in kbdmap(5)"); + 0, "Enable panic via keypress specified in kbdmap(5)", &Giant); #define SC_CONSOLECTL 255 diff -ur /home/refugee/freebsd/current/src/sys/dev/twa/twa_freebsd.c repl/dev/twa/twa_freebsd.c --- /home/refugee/freebsd/current/src/sys/dev/twa/twa_freebsd.c Sun Oct 31 04:51:43 2004 +++ repl/dev/twa/twa_freebsd.c Tue Dec 14 00:49:47 2004 @@ -228,17 +228,17 @@ /* Initialize the softc structure. */ sc->twa_bus_dev = dev; - sysctl_ctx_init(&sc->twa_sysctl_ctx); + sysctl_ctx_init(&sc->twa_sysctl_ctx, &Giant); sc->twa_sysctl_tree = SYSCTL_ADD_NODE(&sc->twa_sysctl_ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, - device_get_nameunit(dev), CTLFLAG_RD, 0, ""); + device_get_nameunit(dev), CTLFLAG_RD, 0, "", &Giant); if (sc->twa_sysctl_tree == NULL) { - twa_printf(sc, "Cannot add sysctl tree node.\n"); + twa_printf(sc, "Cannot add sysctl tree node.\n", &Giant); return(ENXIO); } SYSCTL_ADD_STRING(&sc->twa_sysctl_ctx, SYSCTL_CHILDREN(sc->twa_sysctl_tree), OID_AUTO, "driver_version", CTLFLAG_RD, - TWA_DRIVER_VERSION_STRING, 0, "TWA driver version"); + TWA_DRIVER_VERSION_STRING, 0, "TWA driver version", &Giant); /* Make sure we are going to be able to talk to this board. */ command = pci_read_config(dev, PCIR_COMMAND, 2); @@ -370,7 +370,7 @@ if (sc->twa_ctrl_dev != (struct cdev *)NULL) destroy_dev(sc->twa_ctrl_dev); - sysctl_ctx_free(&sc->twa_sysctl_ctx); + sysctl_ctx_free(&sc->twa_sysctl_ctx, &Giant); } diff -ur /home/refugee/freebsd/current/src/sys/dev/twe/twe_freebsd.c repl/dev/twe/twe_freebsd.c --- /home/refugee/freebsd/current/src/sys/dev/twe/twe_freebsd.c Sun Oct 31 04:51:44 2004 +++ repl/dev/twe/twe_freebsd.c Tue Dec 14 00:49:47 2004 @@ -186,17 +186,17 @@ sc = device_get_softc(dev); sc->twe_dev = dev; - sysctl_ctx_init(&sc->sysctl_ctx); + sysctl_ctx_init(&sc->sysctl_ctx, &Giant); sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, - device_get_nameunit(dev), CTLFLAG_RD, 0, ""); + device_get_nameunit(dev), CTLFLAG_RD, 0, "", &Giant); if (sc->sysctl_tree == NULL) { - twe_printf(sc, "cannot add sysctl tree node\n"); + twe_printf(sc, "cannot add sysctl tree node\n", &Giant); return (ENXIO); } SYSCTL_ADD_STRING(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "driver_version", CTLFLAG_RD, TWE_DRIVER_VERSION_STRING, 0, - "TWE driver version"); + "TWE driver version", &Giant); /* * Make sure we are going to be able to talk to this board. @@ -426,7 +426,7 @@ if (sc->twe_dev_t != (struct cdev *)NULL) destroy_dev(sc->twe_dev_t); - sysctl_ctx_free(&sc->sysctl_ctx); + sysctl_ctx_free(&sc->sysctl_ctx, &Giant); } /******************************************************************************** diff -ur /home/refugee/freebsd/current/src/sys/dev/ubsec/ubsec.c repl/dev/ubsec/ubsec.c --- /home/refugee/freebsd/current/src/sys/dev/ubsec/ubsec.c Sun Oct 31 04:52:11 2004 +++ repl/dev/ubsec/ubsec.c Tue Dec 14 00:49:50 2004 @@ -168,7 +168,7 @@ static void ubsec_kshift_r(u_int, u_int8_t *, u_int, u_int8_t *, u_int); static void ubsec_kshift_l(u_int, u_int8_t *, u_int, u_int8_t *, u_int); -SYSCTL_NODE(_hw, OID_AUTO, ubsec, CTLFLAG_RD, 0, "Broadcom driver parameters"); +SYSCTL_NODE(_hw, OID_AUTO, ubsec, CTLFLAG_RD, 0, "Broadcom driver parameters", NULL); #ifdef UBSEC_DEBUG static void ubsec_dump_pb(volatile struct ubsec_pktbuf *); @@ -177,7 +177,7 @@ static int ubsec_debug = 0; SYSCTL_INT(_hw_ubsec, OID_AUTO, debug, CTLFLAG_RW, &ubsec_debug, - 0, "control debugging msgs"); + 0, "control debugging msgs", &Giant); #endif #define READ_REG(sc,r) \ @@ -191,7 +191,7 @@ struct ubsec_stats ubsecstats; SYSCTL_STRUCT(_hw_ubsec, OID_AUTO, stats, CTLFLAG_RD, &ubsecstats, - ubsec_stats, "driver statistics"); + ubsec_stats, "driver statistics", &Giant); static int ubsec_probe(device_t dev) diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/ehci.c repl/dev/usb/ehci.c --- /home/refugee/freebsd/current/src/sys/dev/usb/ehci.c Sun Nov 21 00:03:06 2004 +++ repl/dev/usb/ehci.c Tue Dec 14 00:49:51 2004 @@ -117,9 +117,9 @@ #define DPRINTF(x) do { if (ehcidebug) logprintf x; } while (0) #define DPRINTFN(n,x) do { if (ehcidebug>(n)) logprintf x; } while (0) int ehcidebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, ehci, CTLFLAG_RW, 0, "USB ehci"); +SYSCTL_NODE(_hw_usb, OID_AUTO, ehci, CTLFLAG_RW, 0, "USB ehci", NULL); SYSCTL_INT(_hw_usb_ehci, OID_AUTO, debug, CTLFLAG_RW, - &ehcidebug, 0, "ehci debug level"); + &ehcidebug, 0, "ehci debug level", &Giant); #ifndef __NetBSD__ #define bitmask_snprintf(q,f,b,l) snprintf((b), (l), "%b", (q), (f)) #endif diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/if_rue.c repl/dev/usb/if_rue.c --- /home/refugee/freebsd/current/src/sys/dev/usb/if_rue.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/if_rue.c Tue Dec 14 00:49:51 2004 @@ -105,9 +105,9 @@ #ifdef USB_DEBUG Static int ruedebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, rue, CTLFLAG_RW, 0, "USB rue"); +SYSCTL_NODE(_hw_usb, OID_AUTO, rue, CTLFLAG_RW, 0, "USB rue", NULL); SYSCTL_INT(_hw_usb_rue, OID_AUTO, debug, CTLFLAG_RW, - &ruedebug, 0, "rue debug level"); + &ruedebug, 0, "rue debug level", &Giant); #define DPRINTFN(n, x) do { \ if (ruedebug > (n)) \ diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/ohci.c repl/dev/usb/ohci.c --- /home/refugee/freebsd/current/src/sys/dev/usb/ohci.c Sun Nov 21 00:03:06 2004 +++ repl/dev/usb/ohci.c Tue Dec 14 00:49:51 2004 @@ -108,9 +108,9 @@ #define DPRINTF(x) if (ohcidebug) logprintf x #define DPRINTFN(n,x) if (ohcidebug>(n)) logprintf x int ohcidebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, ohci, CTLFLAG_RW, 0, "USB ohci"); +SYSCTL_NODE(_hw_usb, OID_AUTO, ohci, CTLFLAG_RW, 0, "USB ohci", NULL); SYSCTL_INT(_hw_usb_ohci, OID_AUTO, debug, CTLFLAG_RW, - &ohcidebug, 0, "ohci debug level"); + &ohcidebug, 0, "ohci debug level", &Giant); #ifndef __NetBSD__ #define bitmask_snprintf(q,f,b,l) snprintf((b), (l), "%b", (q), (f)) #endif diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/ubsa.c repl/dev/usb/ubsa.c --- /home/refugee/freebsd/current/src/sys/dev/usb/ubsa.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/ubsa.c Tue Dec 14 00:49:51 2004 @@ -95,9 +95,9 @@ #ifdef USB_DEBUG Static int ubsadebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, ubsa, CTLFLAG_RW, 0, "USB ubsa"); +SYSCTL_NODE(_hw_usb, OID_AUTO, ubsa, CTLFLAG_RW, 0, "USB ubsa", NULL); SYSCTL_INT(_hw_usb_ubsa, OID_AUTO, debug, CTLFLAG_RW, - &ubsadebug, 0, "ubsa debug level"); + &ubsadebug, 0, "ubsa debug level", &Giant); #define DPRINTFN(n, x) do { \ if (ubsadebug > (n)) \ diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/ubser.c repl/dev/usb/ubser.c --- /home/refugee/freebsd/current/src/sys/dev/usb/ubser.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/ubser.c Tue Dec 14 00:49:51 2004 @@ -107,9 +107,9 @@ #ifdef USB_DEBUG static int ubserdebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, ubser, CTLFLAG_RW, 0, "USB ubser"); +SYSCTL_NODE(_hw_usb, OID_AUTO, ubser, CTLFLAG_RW, 0, "USB ubser", NULL); SYSCTL_INT(_hw_usb_ubser, OID_AUTO, debug, CTLFLAG_RW, - &ubserdebug, 0, "ubser debug level"); + &ubserdebug, 0, "ubser debug level", &Giant); #define DPRINTF(x) do { \ if (ubserdebug) \ logprintf x; \ diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/ucom.c repl/dev/usb/ucom.c --- /home/refugee/freebsd/current/src/sys/dev/usb/ucom.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/ucom.c Tue Dec 14 00:49:51 2004 @@ -100,9 +100,9 @@ #ifdef USB_DEBUG static int ucomdebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, ucom, CTLFLAG_RW, 0, "USB ucom"); +SYSCTL_NODE(_hw_usb, OID_AUTO, ucom, CTLFLAG_RW, 0, "USB ucom", NULL); SYSCTL_INT(_hw_usb_ucom, OID_AUTO, debug, CTLFLAG_RW, - &ucomdebug, 0, "ucom debug level"); + &ucomdebug, 0, "ucom debug level", &Giant); #define DPRINTF(x) do { \ if (ucomdebug) \ logprintf x; \ diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/ucycom.c repl/dev/usb/ucycom.c --- /home/refugee/freebsd/current/src/sys/dev/usb/ucycom.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/ucycom.c Tue Dec 14 00:49:51 2004 @@ -269,19 +269,19 @@ SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "intr", CTLFLAG_RD, &sc->sc_cintr, 0, - "interrupt count"); + "interrupt count", &Giant); SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "in", CTLFLAG_RD, &sc->sc_cin, 0, - "input bytes read"); + "input bytes read", &Giant); SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "lost", CTLFLAG_RD, &sc->sc_clost, 0, - "input bytes lost"); + "input bytes lost", &Giant); SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "out", CTLFLAG_RD, &sc->sc_cout, 0, - "output bytes"); + "output bytes", &Giant); /* create character device node */ ttycreate(sc->sc_tty, NULL, 0, 0, "y%r", device_get_unit(sc->sc_dev)); diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/udbp.c repl/dev/usb/udbp.c --- /home/refugee/freebsd/current/src/sys/dev/usb/udbp.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/udbp.c Tue Dec 14 00:49:51 2004 @@ -111,9 +111,9 @@ #define DPRINTF(x) if (udbpdebug) logprintf x #define DPRINTFN(n,x) if (udbpdebug>(n)) logprintf x int udbpdebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, udbp, CTLFLAG_RW, 0, "USB udbp"); +SYSCTL_NODE(_hw_usb, OID_AUTO, udbp, CTLFLAG_RW, 0, "USB udbp", NULL); SYSCTL_INT(_hw_usb_udbp, OID_AUTO, debug, CTLFLAG_RW, - &udbpdebug, 0, "udbp debug level"); + &udbpdebug, 0, "udbp debug level", &Giant); #else #define DPRINTF(x) #define DPRINTFN(n,x) diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/ufm.c repl/dev/usb/ufm.c --- /home/refugee/freebsd/current/src/sys/dev/usb/ufm.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/ufm.c Tue Dec 14 00:49:51 2004 @@ -69,9 +69,9 @@ #define DPRINTF(x) if (ufmdebug) logprintf x #define DPRINTFN(n,x) if (ufmdebug>(n)) logprintf x int ufmdebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, ufm, CTLFLAG_RW, 0, "USB ufm"); +SYSCTL_NODE(_hw_usb, OID_AUTO, ufm, CTLFLAG_RW, 0, "USB ufm", NULL); SYSCTL_INT(_hw_usb_ufm, OID_AUTO, debug, CTLFLAG_RW, - &ufmdebug, 0, "ufm debug level"); + &ufmdebug, 0, "ufm debug level", &Giant); #else #define DPRINTF(x) #define DPRINTFN(n,x) diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/uftdi.c repl/dev/usb/uftdi.c --- /home/refugee/freebsd/current/src/sys/dev/usb/uftdi.c Sun Oct 31 05:08:01 2004 +++ repl/dev/usb/uftdi.c Tue Dec 14 00:49:51 2004 @@ -78,9 +78,9 @@ #ifdef USB_DEBUG static int uftdidebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, uftdi, CTLFLAG_RW, 0, "USB uftdi"); +SYSCTL_NODE(_hw_usb, OID_AUTO, uftdi, CTLFLAG_RW, 0, "USB uftdi", NULL); SYSCTL_INT(_hw_usb_uftdi, OID_AUTO, debug, CTLFLAG_RW, - &uftdidebug, 0, "uftdi debug level"); + &uftdidebug, 0, "uftdi debug level", &Giant); #define DPRINTF(x) do { \ if (uftdidebug) \ logprintf x; \ diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/ugen.c repl/dev/usb/ugen.c --- /home/refugee/freebsd/current/src/sys/dev/usb/ugen.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/ugen.c Tue Dec 14 00:49:51 2004 @@ -82,9 +82,9 @@ #define DPRINTF(x) if (ugendebug) logprintf x #define DPRINTFN(n,x) if (ugendebug>(n)) logprintf x int ugendebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, ugen, CTLFLAG_RW, 0, "USB ugen"); +SYSCTL_NODE(_hw_usb, OID_AUTO, ugen, CTLFLAG_RW, 0, "USB ugen", NULL); SYSCTL_INT(_hw_usb_ugen, OID_AUTO, debug, CTLFLAG_RW, - &ugendebug, 0, "ugen debug level"); + &ugendebug, 0, "ugen debug level", &Giant); #else #define DPRINTF(x) #define DPRINTFN(n,x) diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/uhci.c repl/dev/usb/uhci.c --- /home/refugee/freebsd/current/src/sys/dev/usb/uhci.c Sun Nov 21 00:03:06 2004 +++ repl/dev/usb/uhci.c Tue Dec 14 00:49:51 2004 @@ -116,11 +116,11 @@ #define DPRINTFN(n,x) if (uhcidebug>(n)) printf x int uhcidebug = 0; int uhcinoloop = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, uhci, CTLFLAG_RW, 0, "USB uhci"); +SYSCTL_NODE(_hw_usb, OID_AUTO, uhci, CTLFLAG_RW, 0, "USB uhci", NULL); SYSCTL_INT(_hw_usb_uhci, OID_AUTO, debug, CTLFLAG_RW, - &uhcidebug, 0, "uhci debug level"); + &uhcidebug, 0, "uhci debug level", &Giant); SYSCTL_INT(_hw_usb_uhci, OID_AUTO, loop, CTLFLAG_RW, - &uhcinoloop, 0, "uhci noloop"); + &uhcinoloop, 0, "uhci noloop", &Giant); #ifndef __NetBSD__ #define bitmask_snprintf(q,f,b,l) snprintf((b), (l), "%b", (q), (f)) #endif diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/uhid.c repl/dev/usb/uhid.c --- /home/refugee/freebsd/current/src/sys/dev/usb/uhid.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/uhid.c Tue Dec 14 00:49:51 2004 @@ -95,9 +95,9 @@ #define DPRINTF(x) if (uhiddebug) logprintf x #define DPRINTFN(n,x) if (uhiddebug>(n)) logprintf x int uhiddebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, uhid, CTLFLAG_RW, 0, "USB uhid"); +SYSCTL_NODE(_hw_usb, OID_AUTO, uhid, CTLFLAG_RW, 0, "USB uhid", NULL); SYSCTL_INT(_hw_usb_uhid, OID_AUTO, debug, CTLFLAG_RW, - &uhiddebug, 0, "uhid debug level"); + &uhiddebug, 0, "uhid debug level", &Giant); #else #define DPRINTF(x) #define DPRINTFN(n,x) diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/uhub.c repl/dev/usb/uhub.c --- /home/refugee/freebsd/current/src/sys/dev/usb/uhub.c Sun Nov 14 03:56:08 2004 +++ repl/dev/usb/uhub.c Tue Dec 14 00:49:51 2004 @@ -70,9 +70,9 @@ #define DPRINTF(x) if (uhubdebug) logprintf x #define DPRINTFN(n,x) if (uhubdebug>(n)) logprintf x int uhubdebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, uhub, CTLFLAG_RW, 0, "USB uhub"); +SYSCTL_NODE(_hw_usb, OID_AUTO, uhub, CTLFLAG_RW, 0, "USB uhub", NULL); SYSCTL_INT(_hw_usb_uhub, OID_AUTO, debug, CTLFLAG_RW, - &uhubdebug, 0, "uhub debug level"); + &uhubdebug, 0, "uhub debug level", &Giant); #else #define DPRINTF(x) #define DPRINTFN(n,x) diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/ukbd.c repl/dev/usb/ukbd.c --- /home/refugee/freebsd/current/src/sys/dev/usb/ukbd.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/ukbd.c Tue Dec 14 00:49:51 2004 @@ -90,9 +90,9 @@ #define DPRINTF(x) if (ukbddebug) logprintf x #define DPRINTFN(n,x) if (ukbddebug>(n)) logprintf x int ukbddebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, ukbd, CTLFLAG_RW, 0, "USB ukbd"); +SYSCTL_NODE(_hw_usb, OID_AUTO, ukbd, CTLFLAG_RW, 0, "USB ukbd", NULL); SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, debug, CTLFLAG_RW, - &ukbddebug, 0, "ukbd debug level"); + &ukbddebug, 0, "ukbd debug level", &Giant); #else #define DPRINTF(x) #define DPRINTFN(n,x) diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/ulpt.c repl/dev/usb/ulpt.c --- /home/refugee/freebsd/current/src/sys/dev/usb/ulpt.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/ulpt.c Tue Dec 14 00:49:51 2004 @@ -81,9 +81,9 @@ #define DPRINTF(x) if (ulptdebug) logprintf x #define DPRINTFN(n,x) if (ulptdebug>(n)) logprintf x int ulptdebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, ulpt, CTLFLAG_RW, 0, "USB ulpt"); +SYSCTL_NODE(_hw_usb, OID_AUTO, ulpt, CTLFLAG_RW, 0, "USB ulpt", NULL); SYSCTL_INT(_hw_usb_ulpt, OID_AUTO, debug, CTLFLAG_RW, - &ulptdebug, 0, "ulpt debug level"); + &ulptdebug, 0, "ulpt debug level", &Giant); #else #define DPRINTF(x) #define DPRINTFN(n,x) diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/umass.c repl/dev/usb/umass.c --- /home/refugee/freebsd/current/src/sys/dev/usb/umass.c Wed Dec 8 20:40:56 2004 +++ repl/dev/usb/umass.c Tue Dec 14 00:49:51 2004 @@ -141,9 +141,9 @@ #define UDMASS_WIRE (UDMASS_BBB|UDMASS_CBI) #define UDMASS_ALL 0xffff0000 /* all of the above */ int umassdebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, umass, CTLFLAG_RW, 0, "USB umass"); +SYSCTL_NODE(_hw_usb, OID_AUTO, umass, CTLFLAG_RW, 0, "USB umass", NULL); SYSCTL_INT(_hw_usb_umass, OID_AUTO, debug, CTLFLAG_RW, - &umassdebug, 0, "umass debug level"); + &umassdebug, 0, "umass debug level", &Giant); #else #define DIF(m, x) /* nop */ #define DPRINTF(m, x) /* nop */ diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/umodem.c repl/dev/usb/umodem.c --- /home/refugee/freebsd/current/src/sys/dev/usb/umodem.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/umodem.c Tue Dec 14 00:49:51 2004 @@ -108,9 +108,9 @@ #ifdef USB_DEBUG int umodemdebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, umodem, CTLFLAG_RW, 0, "USB umodem"); +SYSCTL_NODE(_hw_usb, OID_AUTO, umodem, CTLFLAG_RW, 0, "USB umodem", NULL); SYSCTL_INT(_hw_usb_umodem, OID_AUTO, debug, CTLFLAG_RW, - &umodemdebug, 0, "umodem debug level"); + &umodemdebug, 0, "umodem debug level", &Giant); #define DPRINTFN(n, x) if (umodemdebug > (n)) logprintf x #else #define DPRINTFN(n, x) diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/ums.c repl/dev/usb/ums.c --- /home/refugee/freebsd/current/src/sys/dev/usb/ums.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/ums.c Tue Dec 14 00:49:51 2004 @@ -81,9 +81,9 @@ #define DPRINTF(x) if (umsdebug) logprintf x #define DPRINTFN(n,x) if (umsdebug>(n)) logprintf x int umsdebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, ums, CTLFLAG_RW, 0, "USB ums"); +SYSCTL_NODE(_hw_usb, OID_AUTO, ums, CTLFLAG_RW, 0, "USB ums", NULL); SYSCTL_INT(_hw_usb_ums, OID_AUTO, debug, CTLFLAG_RW, - &umsdebug, 0, "ums debug level"); + &umsdebug, 0, "ums debug level", &Giant); #else #define DPRINTF(x) #define DPRINTFN(n,x) diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/uplcom.c repl/dev/usb/uplcom.c --- /home/refugee/freebsd/current/src/sys/dev/usb/uplcom.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/uplcom.c Tue Dec 14 00:49:51 2004 @@ -107,11 +107,11 @@ #include -SYSCTL_NODE(_hw_usb, OID_AUTO, uplcom, CTLFLAG_RW, 0, "USB uplcom"); +SYSCTL_NODE(_hw_usb, OID_AUTO, uplcom, CTLFLAG_RW, 0, "USB uplcom", NULL); #ifdef USB_DEBUG static int uplcomdebug = 0; SYSCTL_INT(_hw_usb_uplcom, OID_AUTO, debug, CTLFLAG_RW, - &uplcomdebug, 0, "uplcom debug level"); + &uplcomdebug, 0, "uplcom debug level", &Giant); #define DPRINTFN(n, x) do { \ if (uplcomdebug > (n)) \ @@ -256,7 +256,7 @@ int err, val; val = uplcominterval; - err = sysctl_handle_int(oidp, &val, sizeof(val), req); + err = sysctl_handle_int(oidp, &val, sizeof(val), req, &Giant); if (err != 0 || req->newptr == NULL) return (err); if (0 < val && val <= 1000) @@ -269,7 +269,7 @@ SYSCTL_PROC(_hw_usb_uplcom, OID_AUTO, interval, CTLTYPE_INT | CTLFLAG_RW, 0, sizeof(int), sysctl_hw_usb_uplcom_interval, - "I", "uplcom interrpt pipe interval"); + "I", "uplcom interrpt pipe interval", &Giant); USB_MATCH(uplcom) { diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/urio.c repl/dev/usb/urio.c --- /home/refugee/freebsd/current/src/sys/dev/usb/urio.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/urio.c Tue Dec 14 00:49:51 2004 @@ -82,9 +82,9 @@ #define DPRINTF(x) if (uriodebug) logprintf x #define DPRINTFN(n,x) if (uriodebug>(n)) logprintf x int uriodebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, urio, CTLFLAG_RW, 0, "USB urio"); +SYSCTL_NODE(_hw_usb, OID_AUTO, urio, CTLFLAG_RW, 0, "USB urio", NULL); SYSCTL_INT(_hw_usb_urio, OID_AUTO, debug, CTLFLAG_RW, - &uriodebug, 0, "urio debug level"); + &uriodebug, 0, "urio debug level", &Giant); #else #define DPRINTF(x) #define DPRINTFN(n,x) diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/usb.c repl/dev/usb/usb.c --- /home/refugee/freebsd/current/src/sys/dev/usb/usb.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/usb.c Tue Dec 14 00:49:51 2004 @@ -106,14 +106,14 @@ /* Define this unconditionally in case a kernel module is loaded that * has been compiled with debugging options. */ -SYSCTL_NODE(_hw, OID_AUTO, usb, CTLFLAG_RW, 0, "USB debugging"); +SYSCTL_NODE(_hw, OID_AUTO, usb, CTLFLAG_RW, 0, "USB debugging", NULL); #ifdef USB_DEBUG #define DPRINTF(x) if (usbdebug) logprintf x #define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x int usbdebug = 0; SYSCTL_INT(_hw_usb, OID_AUTO, debug, CTLFLAG_RW, - &usbdebug, 0, "usb debug level"); + &usbdebug, 0, "usb debug level", &Giant); /* * 0 - do usual exploration * 1 - do not use timeout exploration diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/uscanner.c repl/dev/usb/uscanner.c --- /home/refugee/freebsd/current/src/sys/dev/usb/uscanner.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/uscanner.c Tue Dec 14 00:49:51 2004 @@ -82,9 +82,9 @@ #define DPRINTF(x) if (uscannerdebug) logprintf x #define DPRINTFN(n,x) if (uscannerdebug>(n)) logprintf x int uscannerdebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, uscanner, CTLFLAG_RW, 0, "USB uscanner"); +SYSCTL_NODE(_hw_usb, OID_AUTO, uscanner, CTLFLAG_RW, 0, "USB uscanner", NULL); SYSCTL_INT(_hw_usb_uscanner, OID_AUTO, debug, CTLFLAG_RW, - &uscannerdebug, 0, "uscanner debug level"); + &uscannerdebug, 0, "uscanner debug level", &Giant); #else #define DPRINTF(x) #define DPRINTFN(n,x) diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/uvisor.c repl/dev/usb/uvisor.c --- /home/refugee/freebsd/current/src/sys/dev/usb/uvisor.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/uvisor.c Tue Dec 14 00:49:51 2004 @@ -81,9 +81,9 @@ #define DPRINTF(x) if (uvisordebug) printf x #define DPRINTFN(n,x) if (uvisordebug>(n)) printf x int uvisordebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, uvisor, CTLFLAG_RW, 0, "USB uvisor"); +SYSCTL_NODE(_hw_usb, OID_AUTO, uvisor, CTLFLAG_RW, 0, "USB uvisor", NULL); SYSCTL_INT(_hw_usb_uvisor, OID_AUTO, debug, CTLFLAG_RW, - &uvisordebug, 0, "uvisor debug level"); + &uvisordebug, 0, "uvisor debug level", &Giant); #else #define DPRINTF(x) #define DPRINTFN(n,x) diff -ur /home/refugee/freebsd/current/src/sys/dev/usb/uvscom.c repl/dev/usb/uvscom.c --- /home/refugee/freebsd/current/src/sys/dev/usb/uvscom.c Sun Oct 31 04:52:18 2004 +++ repl/dev/usb/uvscom.c Tue Dec 14 00:49:51 2004 @@ -74,11 +74,11 @@ #include -SYSCTL_NODE(_hw_usb, OID_AUTO, uvscom, CTLFLAG_RW, 0, "USB uvscom"); +SYSCTL_NODE(_hw_usb, OID_AUTO, uvscom, CTLFLAG_RW, 0, "USB uvscom", NULL); #ifdef USB_DEBUG static int uvscomdebug = 0; SYSCTL_INT(_hw_usb_uvscom, OID_AUTO, debug, CTLFLAG_RW, - &uvscomdebug, 0, "uvscom debug level"); + &uvscomdebug, 0, "uvscom debug level", &Giant); #define DPRINTFN(n, x) do { \ if (uvscomdebug > (n)) \ @@ -264,7 +264,7 @@ int err, val; val = uvscomobufsiz; - err = sysctl_handle_int(oidp, &val, sizeof(val), req); + err = sysctl_handle_int(oidp, &val, sizeof(val), req, &Giant); if (err != 0 || req->newptr == NULL) return (err); if (0 < val && val <= UVSCOMOBUFSIZE) @@ -281,7 +281,7 @@ int err, val; val = uvscominterval; - err = sysctl_handle_int(oidp, &val, sizeof(val), req); + err = sysctl_handle_int(oidp, &val, sizeof(val), req, &Giant); if (err != 0 || req->newptr == NULL) return (err); if (0 < val && val <= 1000) @@ -294,10 +294,10 @@ SYSCTL_PROC(_hw_usb_uvscom, OID_AUTO, opktsize, CTLTYPE_INT | CTLFLAG_RW, 0, sizeof(int), sysctl_hw_usb_uvscom_opktsize, - "I", "uvscom output packet size"); + "I", "uvscom output packet size", &Giant); SYSCTL_PROC(_hw_usb_uvscom, OID_AUTO, interval, CTLTYPE_INT | CTLFLAG_RW, 0, sizeof(int), sysctl_hw_usb_uvscom_interval, - "I", "uvscom interrpt pipe interval"); + "I", "uvscom interrpt pipe interval", &Giant); USB_MATCH(uvscom) { diff -ur /home/refugee/freebsd/current/src/sys/dev/utopia/utopia.c repl/dev/utopia/utopia.c --- /home/refugee/freebsd/current/src/sys/dev/utopia/utopia.c Sun Oct 31 04:52:00 2004 +++ repl/dev/utopia/utopia.c Tue Dec 14 00:49:49 2004 @@ -1401,7 +1401,7 @@ struct sysctl_oid_list *children, const struct utopia_methods *m) { - bzero(utp, sizeof(*utp)); + bzero(utp, sizeof(*utp), &Giant); utp->ifatm = ifatm; utp->methods = m; utp->media = media; @@ -1416,35 +1416,35 @@ if (SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "phy_regs", CTLFLAG_RW | CTLTYPE_OPAQUE, utp, 0, utopia_sysctl_regs, "S", "phy registers") == NULL) - return (-1); + return (-1, &Giant); if (SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "phy_loopback", CTLFLAG_RW | CTLTYPE_UINT, utp, 0, utopia_sysctl_loopback, "IU", "phy loopback mode") == NULL) - return (-1); + return (-1, &Giant); if (SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "phy_type", CTLFLAG_RD | CTLTYPE_UINT, utp, 0, utopia_sysctl_type, "IU", "phy type") == NULL) - return (-1); + return (-1, &Giant); if (SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "phy_name", CTLFLAG_RD | CTLTYPE_STRING, utp, 0, utopia_sysctl_name, "A", "phy name") == NULL) - return (-1); + return (-1, &Giant); if (SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "phy_stats", CTLFLAG_RW | CTLTYPE_OPAQUE, utp, 0, utopia_sysctl_stats, "S", "phy statistics") == NULL) - return (-1); + return (-1, &Giant); if (SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "phy_state", CTLFLAG_RD, &utp->state, 0, "phy state") == NULL) - return (-1); + return (-1, &Giant); if (SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "phy_carrier", CTLFLAG_RD, &utp->carrier, 0, "phy carrier") == NULL) - return (-1); + return (-1, &Giant); UTP_WLOCK_LIST(); LIST_INSERT_HEAD(&utopia_list, utp, link); diff -ur /home/refugee/freebsd/current/src/sys/dev/wi/if_wi.c repl/dev/wi/if_wi.c --- /home/refugee/freebsd/current/src/sys/dev/wi/if_wi.c Wed Dec 8 20:40:56 2004 +++ repl/dev/wi/if_wi.c Tue Dec 14 00:49:50 2004 @@ -168,19 +168,19 @@ return wi_write_rid(sc, rid, &val, sizeof(val)); } -SYSCTL_NODE(_hw, OID_AUTO, wi, CTLFLAG_RD, 0, "Wireless driver parameters"); +SYSCTL_NODE(_hw, OID_AUTO, wi, CTLFLAG_RD, 0, "Wireless driver parameters", NULL); static struct timeval lasttxerror; /* time of last tx error msg */ static int curtxeps; /* current tx error msgs/sec */ static int wi_txerate = 0; /* tx error rate: max msgs/sec */ SYSCTL_INT(_hw_wi, OID_AUTO, txerate, CTLFLAG_RW, &wi_txerate, - 0, "max tx error msgs/sec; 0 to disable msgs"); + 0, "max tx error msgs/sec; 0 to disable msgs", &Giant); #define WI_DEBUG #ifdef WI_DEBUG static int wi_debug = 0; SYSCTL_INT(_hw_wi, OID_AUTO, debug, CTLFLAG_RW, &wi_debug, - 0, "control debugging printfs"); + 0, "control debugging printfs", &Giant); #define DPRINTF(X) if (wi_debug) printf X #define DPRINTF2(X) if (wi_debug > 1) printf X diff -ur /home/refugee/freebsd/current/src/sys/dev/wl/if_wl.c repl/dev/wl/if_wl.c --- /home/refugee/freebsd/current/src/sys/dev/wl/if_wl.c Sun Oct 31 04:52:12 2004 +++ repl/dev/wl/if_wl.c Tue Dec 14 00:49:50 2004 @@ -301,7 +301,7 @@ * is queued which helps avoid this behaviour on fast systems. */ static int wl_xmit_delay = 250; -SYSCTL_INT(_machdep, OID_AUTO, wl_xmit_delay, CTLFLAG_RW, &wl_xmit_delay, 0, ""); +SYSCTL_INT(_machdep, OID_AUTO, wl_xmit_delay, CTLFLAG_RW, &wl_xmit_delay, 0, "", &Giant); /* * not XXX, but ZZZ (bizarre). @@ -311,19 +311,19 @@ * promiscuous mode. */ static int wl_ignore_nwid = 0; -SYSCTL_INT(_machdep, OID_AUTO, wl_ignore_nwid, CTLFLAG_RW, &wl_ignore_nwid, 0, ""); +SYSCTL_INT(_machdep, OID_AUTO, wl_ignore_nwid, CTLFLAG_RW, &wl_ignore_nwid, 0, "", &Giant); /* * Emit diagnostics about transmission problems */ static int xmt_watch = 0; -SYSCTL_INT(_machdep, OID_AUTO, wl_xmit_watch, CTLFLAG_RW, &xmt_watch, 0, ""); +SYSCTL_INT(_machdep, OID_AUTO, wl_xmit_watch, CTLFLAG_RW, &xmt_watch, 0, "", &Giant); /* * Collect SNR statistics */ static int gathersnr = 0; -SYSCTL_INT(_machdep, OID_AUTO, wl_gather_snr, CTLFLAG_RW, &gathersnr, 0, ""); +SYSCTL_INT(_machdep, OID_AUTO, wl_gather_snr, CTLFLAG_RW, &gathersnr, 0, "", &Giant); static int wl_allocate_resources(device_t device); static int wl_deallocate_resources(device_t device); @@ -2499,13 +2499,13 @@ */ static int wl_cache_mcastonly = 1; SYSCTL_INT(_machdep, OID_AUTO, wl_cache_mcastonly, CTLFLAG_RW, - &wl_cache_mcastonly, 0, ""); + &wl_cache_mcastonly, 0, "", &Giant); /* set true if you want to limit cache items to IP packets only */ static int wl_cache_iponly = 1; SYSCTL_INT(_machdep, OID_AUTO, wl_cache_iponly, CTLFLAG_RW, - &wl_cache_iponly, 0, ""); + &wl_cache_iponly, 0, "", &Giant); /* zero out the cache */ diff -ur /home/refugee/freebsd/current/src/sys/dev/xe/if_xe.c repl/dev/xe/if_xe.c --- /home/refugee/freebsd/current/src/sys/dev/xe/if_xe.c Sun Oct 31 04:52:14 2004 +++ repl/dev/xe/if_xe.c Tue Dec 14 00:49:51 2004 @@ -191,11 +191,11 @@ #ifdef XE_DEBUG /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, xe, CTLFLAG_RD, 0, "if_xe parameters"); +SYSCTL_NODE(_hw, OID_AUTO, xe, CTLFLAG_RD, 0, "if_xe parameters", NULL); int xe_debug = 0; SYSCTL_INT(_hw_xe, OID_AUTO, debug, CTLFLAG_RW, - &xe_debug, 0, "if_xe debug level"); + &xe_debug, 0, "if_xe debug level", &Giant); #define DEVPRINTF(level, arg) if (xe_debug >= (level)) device_printf arg #define DPRINTF(level, arg) if (xe_debug >= (level)) printf arg diff -ur /home/refugee/freebsd/current/src/sys/fs/devfs/devfs_devs.c repl/fs/devfs/devfs_devs.c --- /home/refugee/freebsd/current/src/sys/fs/devfs/devfs_devs.c Sun Oct 31 04:51:30 2004 +++ repl/fs/devfs/devfs_devs.c Tue Dec 14 00:49:45 2004 @@ -60,15 +60,15 @@ static struct devfs_dirent *devfs_find (struct devfs_dirent *dd, const char *name, int namelen); -SYSCTL_NODE(_vfs, OID_AUTO, devfs, CTLFLAG_RW, 0, "DEVFS filesystem"); +SYSCTL_NODE(_vfs, OID_AUTO, devfs, CTLFLAG_RW, 0, "DEVFS filesystem", NULL); SYSCTL_UINT(_vfs_devfs, OID_AUTO, noverflow, CTLFLAG_RW, - &devfs_noverflowwant, 0, "Size of DEVFS overflow table"); + &devfs_noverflowwant, 0, "Size of DEVFS overflow table", &Giant); SYSCTL_UINT(_vfs_devfs, OID_AUTO, generation, CTLFLAG_RD, - &devfs_generation, 0, "DEVFS generation number"); + &devfs_generation, 0, "DEVFS generation number", &Giant); SYSCTL_UINT(_vfs_devfs, OID_AUTO, inodes, CTLFLAG_RD, - &devfs_numino, 0, "DEVFS inodes"); + &devfs_numino, 0, "DEVFS inodes", &Giant); SYSCTL_UINT(_vfs_devfs, OID_AUTO, topinode, CTLFLAG_RD, - &devfs_topino, 0, "DEVFS highest inode#"); + &devfs_topino, 0, "DEVFS highest inode#", &Giant); static int * devfs_itor(int inode) diff -ur /home/refugee/freebsd/current/src/sys/fs/nullfs/null_vnops.c repl/fs/nullfs/null_vnops.c --- /home/refugee/freebsd/current/src/sys/fs/nullfs/null_vnops.c Wed Dec 8 20:40:56 2004 +++ repl/fs/nullfs/null_vnops.c Tue Dec 14 00:49:45 2004 @@ -190,7 +190,7 @@ static int null_bug_bypass = 0; /* for debugging: enables bypass printf'ing */ SYSCTL_INT(_debug, OID_AUTO, nullfs_bug_bypass, CTLFLAG_RW, - &null_bug_bypass, 0, ""); + &null_bug_bypass, 0, "", &Giant); static vop_access_t null_access; static vop_createvobject_t null_createvobject; diff -ur /home/refugee/freebsd/current/src/sys/fs/nwfs/nwfs_io.c repl/fs/nwfs/nwfs_io.c --- /home/refugee/freebsd/current/src/sys/fs/nwfs/nwfs_io.c Sun Oct 31 04:51:31 2004 +++ repl/fs/nwfs/nwfs_io.c Tue Dec 14 00:49:45 2004 @@ -65,7 +65,7 @@ static int nwfs_fastlookup = 1; SYSCTL_DECL(_vfs_nwfs); -SYSCTL_INT(_vfs_nwfs, OID_AUTO, fastlookup, CTLFLAG_RW, &nwfs_fastlookup, 0, ""); +SYSCTL_INT(_vfs_nwfs, OID_AUTO, fastlookup, CTLFLAG_RW, &nwfs_fastlookup, 0, "", &Giant); extern int nwfs_pbuf_freecnt; diff -ur /home/refugee/freebsd/current/src/sys/fs/nwfs/nwfs_node.c repl/fs/nwfs/nwfs_node.c --- /home/refugee/freebsd/current/src/sys/fs/nwfs/nwfs_node.c Wed Dec 8 20:40:56 2004 +++ repl/fs/nwfs/nwfs_node.c Tue Dec 14 00:49:45 2004 @@ -67,12 +67,12 @@ MALLOC_DEFINE(M_NWNODE, "NWFS node", "NWFS vnode private part"); MALLOC_DEFINE(M_NWFSHASH, "NWFS hash", "NWFS has table"); -static int nwfs_sysctl_vnprint(SYSCTL_HANDLER_ARGS); +static int nwfs_sysctl_vnprint(SYSCTL_HANDLER_ARGS, &Giant); SYSCTL_DECL(_vfs_nwfs); SYSCTL_PROC(_vfs_nwfs, OID_AUTO, vnprint, CTLFLAG_WR|CTLTYPE_OPAQUE, - NULL, 0, nwfs_sysctl_vnprint, "S,vnlist", "vnode hash"); + NULL, 0, nwfs_sysctl_vnprint, "S,vnlist", "vnode hash", &Giant); void nwfs_hash_init(void) { diff -ur /home/refugee/freebsd/current/src/sys/fs/nwfs/nwfs_vfsops.c repl/fs/nwfs/nwfs_vfsops.c --- /home/refugee/freebsd/current/src/sys/fs/nwfs/nwfs_vfsops.c Wed Dec 8 20:40:56 2004 +++ repl/fs/nwfs/nwfs_vfsops.c Tue Dec 14 00:49:45 2004 @@ -63,9 +63,9 @@ static int nwfs_version = NWFS_VERSION; SYSCTL_DECL(_vfs_nwfs); -SYSCTL_NODE(_vfs, OID_AUTO, nwfs, CTLFLAG_RW, 0, "Netware filesystem"); -SYSCTL_INT(_vfs_nwfs, OID_AUTO, version, CTLFLAG_RD, &nwfs_version, 0, ""); -SYSCTL_INT(_vfs_nwfs, OID_AUTO, debuglevel, CTLFLAG_RW, &nwfs_debuglevel, 0, ""); +SYSCTL_NODE(_vfs, OID_AUTO, nwfs, CTLFLAG_RW, 0, "Netware filesystem", NULL); +SYSCTL_INT(_vfs_nwfs, OID_AUTO, version, CTLFLAG_RD, &nwfs_version, 0, "", &Giant); +SYSCTL_INT(_vfs_nwfs, OID_AUTO, debuglevel, CTLFLAG_RW, &nwfs_debuglevel, 0, "", &Giant); MODULE_DEPEND(nwfs, ncp, 1, 1, 1); MODULE_DEPEND(nwfs, libmchain, 1, 1, 1); diff -ur /home/refugee/freebsd/current/src/sys/fs/pseudofs/pseudofs_vncache.c repl/fs/pseudofs/pseudofs_vncache.c --- /home/refugee/freebsd/current/src/sys/fs/pseudofs/pseudofs_vncache.c Wed Dec 8 20:40:56 2004 +++ repl/fs/pseudofs/pseudofs_vncache.c Tue Dec 14 00:49:45 2004 @@ -55,22 +55,22 @@ static int pfs_vncache_entries; SYSCTL_INT(_vfs_pfs_vncache, OID_AUTO, entries, CTLFLAG_RD, &pfs_vncache_entries, 0, - "number of entries in the vnode cache"); + "number of entries in the vnode cache", &Giant); static int pfs_vncache_maxentries; SYSCTL_INT(_vfs_pfs_vncache, OID_AUTO, maxentries, CTLFLAG_RD, &pfs_vncache_maxentries, 0, - "highest number of entries in the vnode cache"); + "highest number of entries in the vnode cache", &Giant); static int pfs_vncache_hits; SYSCTL_INT(_vfs_pfs_vncache, OID_AUTO, hits, CTLFLAG_RD, &pfs_vncache_hits, 0, - "number of cache hits since initialization"); + "number of cache hits since initialization", &Giant); static int pfs_vncache_misses; SYSCTL_INT(_vfs_pfs_vncache, OID_AUTO, misses, CTLFLAG_RD, &pfs_vncache_misses, 0, - "number of cache misses since initialization"); + "number of cache misses since initialization", &Giant); extern struct vop_vector pfs_vnodeops; /* XXX -> .h file */ diff -ur /home/refugee/freebsd/current/src/sys/fs/smbfs/smbfs_io.c repl/fs/smbfs/smbfs_io.c --- /home/refugee/freebsd/current/src/sys/fs/smbfs/smbfs_io.c Sun Oct 31 04:51:31 2004 +++ repl/fs/smbfs/smbfs_io.c Tue Dec 14 00:49:45 2004 @@ -72,7 +72,7 @@ static int smbfs_fastlookup = 1; SYSCTL_DECL(_vfs_smbfs); -SYSCTL_INT(_vfs_smbfs, OID_AUTO, fastlookup, CTLFLAG_RW, &smbfs_fastlookup, 0, ""); +SYSCTL_INT(_vfs_smbfs, OID_AUTO, fastlookup, CTLFLAG_RW, &smbfs_fastlookup, 0, "", &Giant); #define DE_SIZE (sizeof(struct dirent)) diff -ur /home/refugee/freebsd/current/src/sys/fs/smbfs/smbfs_node.c repl/fs/smbfs/smbfs_node.c --- /home/refugee/freebsd/current/src/sys/fs/smbfs/smbfs_node.c Wed Dec 8 20:40:56 2004 +++ repl/fs/smbfs/smbfs_node.c Tue Dec 14 00:49:45 2004 @@ -71,10 +71,10 @@ #if 0 #ifdef SYSCTL_DECL -SYSCTL_DECL(_vfs_smbfs); +SYSCTL_DECL(_vfs_smbfs, &Giant); #endif SYSCTL_PROC(_vfs_smbfs, OID_AUTO, vnprint, CTLFLAG_WR|CTLTYPE_OPAQUE, - NULL, 0, smbfs_hashprint, "S,vnlist", "vnode hash"); + NULL, 0, smbfs_hashprint, "S,vnlist", "vnode hash", &Giant); #endif #define FNV_32_PRIME ((u_int32_t) 0x01000193UL) diff -ur /home/refugee/freebsd/current/src/sys/fs/smbfs/smbfs_vfsops.c repl/fs/smbfs/smbfs_vfsops.c --- /home/refugee/freebsd/current/src/sys/fs/smbfs/smbfs_vfsops.c Wed Dec 8 20:40:56 2004 +++ repl/fs/smbfs/smbfs_vfsops.c Tue Dec 14 00:49:45 2004 @@ -70,9 +70,9 @@ vm_zone_t smbfsmount_zone; #endif -SYSCTL_NODE(_vfs, OID_AUTO, smbfs, CTLFLAG_RW, 0, "SMB/CIFS filesystem"); -SYSCTL_INT(_vfs_smbfs, OID_AUTO, version, CTLFLAG_RD, &smbfs_version, 0, ""); -SYSCTL_INT(_vfs_smbfs, OID_AUTO, debuglevel, CTLFLAG_RW, &smbfs_debuglevel, 0, ""); +SYSCTL_NODE(_vfs, OID_AUTO, smbfs, CTLFLAG_RW, 0, "SMB/CIFS filesystem", NULL); +SYSCTL_INT(_vfs_smbfs, OID_AUTO, version, CTLFLAG_RD, &smbfs_version, 0, "", &Giant); +SYSCTL_INT(_vfs_smbfs, OID_AUTO, debuglevel, CTLFLAG_RW, &smbfs_debuglevel, 0, "", &Giant); static MALLOC_DEFINE(M_SMBFSHASH, "SMBFS hash", "SMBFS hash table"); diff -ur /home/refugee/freebsd/current/src/sys/fs/umapfs/umap_vnops.c repl/fs/umapfs/umap_vnops.c --- /home/refugee/freebsd/current/src/sys/fs/umapfs/umap_vnops.c Wed Dec 8 20:40:57 2004 +++ repl/fs/umapfs/umap_vnops.c Tue Dec 14 00:49:45 2004 @@ -52,7 +52,7 @@ static int umap_bug_bypass = 0; /* for debugging: enables bypass printf'ing */ SYSCTL_INT(_debug, OID_AUTO, umapfs_bug_bypass, CTLFLAG_RW, - &umap_bug_bypass, 0, ""); + &umap_bug_bypass, 0, "", &Giant); static vop_generic_t umap_bypass; static vop_getattr_t umap_getattr; diff -ur /home/refugee/freebsd/current/src/sys/fs/unionfs/union_vnops.c repl/fs/unionfs/union_vnops.c --- /home/refugee/freebsd/current/src/sys/fs/unionfs/union_vnops.c Wed Dec 8 20:40:57 2004 +++ repl/fs/unionfs/union_vnops.c Tue Dec 14 00:49:45 2004 @@ -63,9 +63,9 @@ int uniondebug = 0; #if UDEBUG_ENABLED -SYSCTL_INT(_vfs, OID_AUTO, uniondebug, CTLFLAG_RW, &uniondebug, 0, ""); +SYSCTL_INT(_vfs, OID_AUTO, uniondebug, CTLFLAG_RW, &uniondebug, 0, "", &Giant); #else -SYSCTL_INT(_vfs, OID_AUTO, uniondebug, CTLFLAG_RD, &uniondebug, 0, ""); +SYSCTL_INT(_vfs, OID_AUTO, uniondebug, CTLFLAG_RD, &uniondebug, 0, "", &Giant); #endif static vop_access_t union_access; diff -ur /home/refugee/freebsd/current/src/sys/geom/bde/g_bde_work.c repl/geom/bde/g_bde_work.c --- /home/refugee/freebsd/current/src/sys/geom/bde/g_bde_work.c Sun Oct 31 04:52:35 2004 +++ repl/geom/bde/g_bde_work.c Tue Dec 14 00:49:53 2004 @@ -87,7 +87,7 @@ * C++ would call these constructors and destructors. */ static u_int g_bde_nwork; -SYSCTL_UINT(_debug, OID_AUTO, gbde_nwork, CTLFLAG_RD, &g_bde_nwork, 0, ""); +SYSCTL_UINT(_debug, OID_AUTO, gbde_nwork, CTLFLAG_RD, &g_bde_nwork, 0, "", &Giant); static MALLOC_DEFINE(M_GBDE, "GBDE", "GBDE data structures"); @@ -126,7 +126,7 @@ */ static u_int g_bde_nsect; -SYSCTL_UINT(_debug, OID_AUTO, gbde_nsect, CTLFLAG_RD, &g_bde_nsect, 0, ""); +SYSCTL_UINT(_debug, OID_AUTO, gbde_nsect, CTLFLAG_RD, &g_bde_nsect, 0, "", &Giant); static void g_bde_delete_sector(struct g_bde_softc *sc, struct g_bde_sector *sp) @@ -180,7 +180,7 @@ */ static u_int g_bde_ncache; -SYSCTL_UINT(_debug, OID_AUTO, gbde_ncache, CTLFLAG_RD, &g_bde_ncache, 0, ""); +SYSCTL_UINT(_debug, OID_AUTO, gbde_ncache, CTLFLAG_RD, &g_bde_ncache, 0, "", &Giant); static void g_bde_purge_one_sector(struct g_bde_softc *sc, struct g_bde_sector *sp) diff -ur /home/refugee/freebsd/current/src/sys/geom/concat/g_concat.c repl/geom/concat/g_concat.c --- /home/refugee/freebsd/current/src/sys/geom/concat/g_concat.c Sun Oct 31 04:52:36 2004 +++ repl/geom/concat/g_concat.c Tue Dec 14 00:49:53 2004 @@ -43,11 +43,11 @@ static MALLOC_DEFINE(M_CONCAT, "concat data", "GEOM_CONCAT Data"); SYSCTL_DECL(_kern_geom); -SYSCTL_NODE(_kern_geom, OID_AUTO, concat, CTLFLAG_RW, 0, "GEOM_CONCAT stuff"); +SYSCTL_NODE(_kern_geom, OID_AUTO, concat, CTLFLAG_RW, 0, "GEOM_CONCAT stuff", NULL); static u_int g_concat_debug = 0; TUNABLE_INT("kern.geom.concat.debug", &g_concat_debug); SYSCTL_UINT(_kern_geom_concat, OID_AUTO, debug, CTLFLAG_RW, &g_concat_debug, 0, - "Debug level"); + "Debug level", &Giant); static int g_concat_destroy(struct g_concat_softc *sc, boolean_t force); static int g_concat_destroy_geom(struct gctl_req *req, struct g_class *mp, diff -ur /home/refugee/freebsd/current/src/sys/geom/gate/g_gate.c repl/geom/gate/g_gate.c --- /home/refugee/freebsd/current/src/sys/geom/gate/g_gate.c Wed Dec 8 20:40:57 2004 +++ repl/geom/gate/g_gate.c Tue Dec 14 00:49:53 2004 @@ -51,10 +51,10 @@ static MALLOC_DEFINE(M_GATE, "gg data", "GEOM Gate Data"); SYSCTL_DECL(_kern_geom); -SYSCTL_NODE(_kern_geom, OID_AUTO, gate, CTLFLAG_RW, 0, "GEOM_GATE stuff"); +SYSCTL_NODE(_kern_geom, OID_AUTO, gate, CTLFLAG_RW, 0, "GEOM_GATE stuff", NULL); static u_int g_gate_debug = 0; SYSCTL_UINT(_kern_geom_gate, OID_AUTO, debug, CTLFLAG_RW, &g_gate_debug, 0, - "Debug level"); + "Debug level", &Giant); static int g_gate_destroy_geom(struct gctl_req *, struct g_class *, struct g_geom *); diff -ur /home/refugee/freebsd/current/src/sys/geom/geom_disk.c repl/geom/geom_disk.c --- /home/refugee/freebsd/current/src/sys/geom/geom_disk.c Sun Oct 31 04:52:36 2004 +++ repl/geom/geom_disk.c Tue Dec 14 00:49:54 2004 @@ -444,5 +444,5 @@ } SYSCTL_PROC(_kern, OID_AUTO, disks, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NOLOCK, 0, 0, - sysctl_disks, "A", "names of available disks"); + sysctl_disks, "A", "names of available disks", &Giant); diff -ur /home/refugee/freebsd/current/src/sys/geom/geom_kern.c repl/geom/geom_kern.c --- /home/refugee/freebsd/current/src/sys/geom/geom_kern.c Sun Oct 31 04:52:36 2004 +++ repl/geom/geom_kern.c Tue Dec 14 00:49:54 2004 @@ -206,34 +206,34 @@ return error; } -SYSCTL_NODE(_kern, OID_AUTO, geom, CTLFLAG_RW, 0, "GEOMetry management"); +SYSCTL_NODE(_kern, OID_AUTO, geom, CTLFLAG_RW, 0, "GEOMetry management", NULL); SYSCTL_PROC(_kern_geom, OID_AUTO, confxml, CTLTYPE_STRING|CTLFLAG_RD, 0, 0, sysctl_kern_geom_confxml, "", - "Dump the GEOM config in XML"); + "Dump the GEOM config in XML", &Giant); SYSCTL_PROC(_kern_geom, OID_AUTO, confdot, CTLTYPE_STRING|CTLFLAG_RD, 0, 0, sysctl_kern_geom_confdot, "", - "Dump the GEOM config in dot"); + "Dump the GEOM config in dot", &Giant); SYSCTL_PROC(_kern_geom, OID_AUTO, conftxt, CTLTYPE_STRING|CTLFLAG_RD, 0, 0, sysctl_kern_geom_conftxt, "", - "Dump the GEOM config in txt"); + "Dump the GEOM config in txt", &Giant); TUNABLE_INT("kern.geom.debugflags", &g_debugflags); SYSCTL_INT(_kern_geom, OID_AUTO, debugflags, CTLFLAG_RW, - &g_debugflags, 0, ""); + &g_debugflags, 0, "", &Giant); SYSCTL_INT(_kern_geom, OID_AUTO, collectstats, CTLFLAG_RW, - &g_collectstats, 0, ""); + &g_collectstats, 0, "", &Giant); SYSCTL_INT(_debug_sizeof, OID_AUTO, g_class, CTLFLAG_RD, - 0, sizeof(struct g_class), ""); + 0, sizeof(struct g_class), "", &Giant); SYSCTL_INT(_debug_sizeof, OID_AUTO, g_geom, CTLFLAG_RD, - 0, sizeof(struct g_geom), ""); + 0, sizeof(struct g_geom), "", &Giant); SYSCTL_INT(_debug_sizeof, OID_AUTO, g_provider, CTLFLAG_RD, - 0, sizeof(struct g_provider), ""); + 0, sizeof(struct g_provider), "", &Giant); SYSCTL_INT(_debug_sizeof, OID_AUTO, g_consumer, CTLFLAG_RD, - 0, sizeof(struct g_consumer), ""); + 0, sizeof(struct g_consumer), "", &Giant); SYSCTL_INT(_debug_sizeof, OID_AUTO, g_bioq, CTLFLAG_RD, - 0, sizeof(struct g_bioq), ""); + 0, sizeof(struct g_bioq), "", &Giant); diff -ur /home/refugee/freebsd/current/src/sys/geom/label/g_label.c repl/geom/label/g_label.c --- /home/refugee/freebsd/current/src/sys/geom/label/g_label.c Sun Oct 31 04:52:34 2004 +++ repl/geom/label/g_label.c Tue Dec 14 00:49:53 2004 @@ -42,11 +42,11 @@ SYSCTL_DECL(_kern_geom); -SYSCTL_NODE(_kern_geom, OID_AUTO, label, CTLFLAG_RW, 0, "GEOM_LABEL stuff"); +SYSCTL_NODE(_kern_geom, OID_AUTO, label, CTLFLAG_RW, 0, "GEOM_LABEL stuff", NULL); u_int g_label_debug = 0; TUNABLE_INT("kern.geom.label.debug", &g_label_debug); SYSCTL_UINT(_kern_geom_label, OID_AUTO, debug, CTLFLAG_RW, &g_label_debug, 0, - "Debug level"); + "Debug level", &Giant); static int g_label_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp); diff -ur /home/refugee/freebsd/current/src/sys/geom/mirror/g_mirror.c repl/geom/mirror/g_mirror.c --- /home/refugee/freebsd/current/src/sys/geom/mirror/g_mirror.c Sun Nov 14 03:56:15 2004 +++ repl/geom/mirror/g_mirror.c Tue Dec 14 00:49:53 2004 @@ -48,27 +48,27 @@ static MALLOC_DEFINE(M_MIRROR, "mirror data", "GEOM_MIRROR Data"); SYSCTL_DECL(_kern_geom); -SYSCTL_NODE(_kern_geom, OID_AUTO, mirror, CTLFLAG_RW, 0, "GEOM_MIRROR stuff"); +SYSCTL_NODE(_kern_geom, OID_AUTO, mirror, CTLFLAG_RW, 0, "GEOM_MIRROR stuff", NULL); u_int g_mirror_debug = 0; TUNABLE_INT("kern.geom.mirror.debug", &g_mirror_debug); SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, debug, CTLFLAG_RW, &g_mirror_debug, 0, - "Debug level"); + "Debug level", &Giant); static u_int g_mirror_timeout = 4; TUNABLE_INT("kern.geom.mirror.timeout", &g_mirror_timeout); SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, timeout, CTLFLAG_RW, &g_mirror_timeout, - 0, "Time to wait on all mirror components"); + 0, "Time to wait on all mirror components", &Giant); static u_int g_mirror_idletime = 5; TUNABLE_INT("kern.geom.mirror.idletime", &g_mirror_idletime); SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, idletime, CTLFLAG_RW, - &g_mirror_idletime, 0, "Mark components as clean when idling"); + &g_mirror_idletime, 0, "Mark components as clean when idling", &Giant); static u_int g_mirror_reqs_per_sync = 5; SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, reqs_per_sync, CTLFLAG_RW, &g_mirror_reqs_per_sync, 0, - "Number of regular I/O requests per synchronization request"); + "Number of regular I/O requests per synchronization request", &Giant); static u_int g_mirror_syncs_per_sec = 100; SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, syncs_per_sec, CTLFLAG_RW, &g_mirror_syncs_per_sec, 0, - "Number of synchronizations requests per second"); + "Number of synchronizations requests per second", &Giant); #define MSLEEP(ident, mtx, priority, wmesg, timeout) do { \ G_MIRROR_DEBUG(4, "%s: Sleeping %p.", __func__, (ident)); \ diff -ur /home/refugee/freebsd/current/src/sys/geom/nop/g_nop.c repl/geom/nop/g_nop.c --- /home/refugee/freebsd/current/src/sys/geom/nop/g_nop.c Sun Oct 31 04:52:35 2004 +++ repl/geom/nop/g_nop.c Tue Dec 14 00:49:53 2004 @@ -41,10 +41,10 @@ SYSCTL_DECL(_kern_geom); -SYSCTL_NODE(_kern_geom, OID_AUTO, nop, CTLFLAG_RW, 0, "GEOM_NOP stuff"); +SYSCTL_NODE(_kern_geom, OID_AUTO, nop, CTLFLAG_RW, 0, "GEOM_NOP stuff", NULL); static u_int g_nop_debug = 0; SYSCTL_UINT(_kern_geom_nop, OID_AUTO, debug, CTLFLAG_RW, &g_nop_debug, 0, - "Debug level"); + "Debug level", &Giant); static int g_nop_destroy(struct g_geom *gp, boolean_t force); static int g_nop_destroy_geom(struct gctl_req *req, struct g_class *mp, diff -ur /home/refugee/freebsd/current/src/sys/geom/stripe/g_stripe.c repl/geom/stripe/g_stripe.c --- /home/refugee/freebsd/current/src/sys/geom/stripe/g_stripe.c Sun Oct 31 04:52:36 2004 +++ repl/geom/stripe/g_stripe.c Tue Dec 14 00:49:53 2004 @@ -67,11 +67,11 @@ }; SYSCTL_DECL(_kern_geom); -SYSCTL_NODE(_kern_geom, OID_AUTO, stripe, CTLFLAG_RW, 0, "GEOM_STRIPE stuff"); +SYSCTL_NODE(_kern_geom, OID_AUTO, stripe, CTLFLAG_RW, 0, "GEOM_STRIPE stuff", NULL); static u_int g_stripe_debug = 0; TUNABLE_INT("kern.geom.stripe.debug", &g_stripe_debug); SYSCTL_UINT(_kern_geom_stripe, OID_AUTO, debug, CTLFLAG_RW, &g_stripe_debug, 0, - "Debug level"); + "Debug level", &Giant); static int g_stripe_fast = 1; TUNABLE_INT("kern.geom.stripe.fast", &g_stripe_fast); static int @@ -80,20 +80,20 @@ int error, fast; fast = g_stripe_fast; - error = sysctl_handle_int(oidp, &fast, sizeof(fast), req); + error = sysctl_handle_int(oidp, &fast, sizeof(fast), req, &Giant); if (error == 0 && req->newptr != NULL) g_stripe_fast = fast; return (error); } SYSCTL_PROC(_kern_geom_stripe, OID_AUTO, fast, CTLTYPE_INT | CTLFLAG_RW, - NULL, 0, g_sysctl_stripe_fast, "I", "Fast, but memory-consuming, mode"); + NULL, 0, g_sysctl_stripe_fast, "I", "Fast, but memory-consuming, mode", &Giant); static u_int g_stripe_maxmem = MAX_IO_SIZE * 50; TUNABLE_INT("kern.geom.stripe.maxmem", &g_stripe_maxmem); SYSCTL_UINT(_kern_geom_stripe, OID_AUTO, maxmem, CTLFLAG_RD, &g_stripe_maxmem, - 0, "Maximum memory that can be allocated in \"fast\" mode (in bytes)"); + 0, "Maximum memory that can be allocated in \"fast\" mode (in bytes)", &Giant); static u_int g_stripe_fast_failed = 0; SYSCTL_UINT(_kern_geom_stripe, OID_AUTO, fast_failed, CTLFLAG_RD, - &g_stripe_fast_failed, 0, "How many times \"fast\" mode failed"); + &g_stripe_fast_failed, 0, "How many times \"fast\" mode failed", &Giant); /* * Greatest Common Divisor. diff -ur /home/refugee/freebsd/current/src/sys/geom/vinum/geom_vinum.c repl/geom/vinum/geom_vinum.c --- /home/refugee/freebsd/current/src/sys/geom/vinum/geom_vinum.c Wed Dec 8 20:40:58 2004 +++ repl/geom/vinum/geom_vinum.c Tue Dec 14 00:49:53 2004 @@ -44,9 +44,9 @@ #if 0 SYSCTL_DECL(_kern_geom); -SYSCTL_NODE(_kern_geom, OID_AUTO, vinum, CTLFLAG_RW, 0, "GEOM_VINUM stuff"); +SYSCTL_NODE(_kern_geom, OID_AUTO, vinum, CTLFLAG_RW, 0, "GEOM_VINUM stuff", NULL); SYSCTL_UINT(_kern_geom_vinum, OID_AUTO, debug, CTLFLAG_RW, &gv_debug, 0, - "Debug level"); + "Debug level", &Giant); #endif int gv_create(struct g_geom *, struct gctl_req *); diff -ur /home/refugee/freebsd/current/src/sys/gnu/ext2fs/ext2_alloc.c repl/gnu/ext2fs/ext2_alloc.c --- /home/refugee/freebsd/current/src/sys/gnu/ext2fs/ext2_alloc.c Sun Oct 31 04:50:20 2004 +++ repl/gnu/ext2fs/ext2_alloc.c Tue Dec 14 00:49:40 2004 @@ -188,7 +188,7 @@ #include static int doasyncfree = 1; #ifdef OPT_DEBUG -SYSCTL_INT(_debug, 14, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, ""); +SYSCTL_INT(_debug, 14, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, "", &Giant); #endif /* OPT_DEBUG */ #endif diff -ur /home/refugee/freebsd/current/src/sys/gnu/ext2fs/ext2_lookup.c repl/gnu/ext2fs/ext2_lookup.c --- /home/refugee/freebsd/current/src/sys/gnu/ext2fs/ext2_lookup.c Sun Oct 31 04:50:20 2004 +++ repl/gnu/ext2fs/ext2_lookup.c Tue Dec 14 00:49:40 2004 @@ -66,8 +66,8 @@ static int dirchk = 0; #endif -SYSCTL_NODE(_vfs, OID_AUTO, e2fs, CTLFLAG_RD, 0, "EXT2FS filesystem"); -SYSCTL_INT(_vfs_e2fs, OID_AUTO, dircheck, CTLFLAG_RW, &dirchk, 0, ""); +SYSCTL_NODE(_vfs, OID_AUTO, e2fs, CTLFLAG_RD, 0, "EXT2FS filesystem", NULL); +SYSCTL_INT(_vfs_e2fs, OID_AUTO, dircheck, CTLFLAG_RW, &dirchk, 0, "", &Giant); /* DIRBLKSIZE in ffs is DEV_BSIZE (in most cases 512) diff -ur /home/refugee/freebsd/current/src/sys/i386/acpica/OsdEnvironment.c repl/i386/acpica/OsdEnvironment.c --- /home/refugee/freebsd/current/src/sys/i386/acpica/OsdEnvironment.c Sun Oct 31 04:52:38 2004 +++ repl/i386/acpica/OsdEnvironment.c Tue Dec 14 00:49:54 2004 @@ -40,7 +40,7 @@ static u_long i386_acpi_root; SYSCTL_ULONG(_machdep, OID_AUTO, acpi_root, CTLFLAG_RD, &i386_acpi_root, 0, - "The physical address of the RSDP"); + "The physical address of the RSDP", &Giant); ACPI_STATUS AcpiOsInitialize(void) diff -ur /home/refugee/freebsd/current/src/sys/i386/acpica/acpi_machdep.c repl/i386/acpica/acpi_machdep.c --- /home/refugee/freebsd/current/src/sys/i386/acpica/acpi_machdep.c Sun Oct 31 04:52:38 2004 +++ repl/i386/acpica/acpi_machdep.c Tue Dec 14 00:49:54 2004 @@ -316,7 +316,7 @@ SYSCTL_ADD_UINT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "reset_video", CTLFLAG_RD | CTLFLAG_RW, &acpi_reset_video, 0, - "Call the VESA reset BIOS vector on the resume path"); + "Call the VESA reset BIOS vector on the resume path", &Giant); return (0); } diff -ur /home/refugee/freebsd/current/src/sys/i386/bios/apm.c repl/i386/bios/apm.c --- /home/refugee/freebsd/current/src/sys/i386/bios/apm.c Sun Oct 31 04:52:42 2004 +++ repl/i386/bios/apm.c Tue Dec 14 00:49:55 2004 @@ -130,13 +130,13 @@ } \ } while (0) -SYSCTL_INT(_machdep, OID_AUTO, apm_suspend_delay, CTLFLAG_RW, &apm_suspend_delay, 1, ""); -SYSCTL_INT(_machdep, OID_AUTO, apm_standby_delay, CTLFLAG_RW, &apm_standby_delay, 1, ""); -SYSCTL_INT(_debug, OID_AUTO, apm_debug, CTLFLAG_RW, &apm_debug, 0, ""); +SYSCTL_INT(_machdep, OID_AUTO, apm_suspend_delay, CTLFLAG_RW, &apm_suspend_delay, 1, "", &Giant); +SYSCTL_INT(_machdep, OID_AUTO, apm_standby_delay, CTLFLAG_RW, &apm_standby_delay, 1, "", &Giant); +SYSCTL_INT(_debug, OID_AUTO, apm_debug, CTLFLAG_RW, &apm_debug, 0, "", &Giant); TUNABLE_INT("machdep.apm_swab_batt_minutes", &apm_swab_batt_minutes); SYSCTL_INT(_machdep, OID_AUTO, apm_swab_batt_minutes, CTLFLAG_RW, - &apm_swab_batt_minutes, 0, "Byte swap battery time value."); + &apm_swab_batt_minutes, 0, "Byte swap battery time value.", &Giant); #ifdef PC98 static __inline void diff -ur /home/refugee/freebsd/current/src/sys/i386/bios/vpd.c repl/i386/bios/vpd.c --- /home/refugee/freebsd/current/src/sys/i386/bios/vpd.c Sun Oct 31 04:52:42 2004 +++ repl/i386/bios/vpd.c Tue Dec 14 00:49:55 2004 @@ -103,14 +103,14 @@ static int vpd_cksum (struct vpd *); -SYSCTL_NODE(_hw, OID_AUTO, vpd, CTLFLAG_RD, NULL, NULL); -SYSCTL_NODE(_hw_vpd, OID_AUTO, machine, CTLFLAG_RD, NULL, NULL); -SYSCTL_NODE(_hw_vpd_machine, OID_AUTO, type, CTLFLAG_RD, NULL, NULL); -SYSCTL_NODE(_hw_vpd_machine, OID_AUTO, model, CTLFLAG_RD, NULL, NULL); -SYSCTL_NODE(_hw_vpd, OID_AUTO, build_id, CTLFLAG_RD, NULL, NULL); -SYSCTL_NODE(_hw_vpd, OID_AUTO, serial, CTLFLAG_RD, NULL, NULL); -SYSCTL_NODE(_hw_vpd_serial, OID_AUTO, box, CTLFLAG_RD, NULL, NULL); -SYSCTL_NODE(_hw_vpd_serial, OID_AUTO, planar, CTLFLAG_RD, NULL, NULL); +SYSCTL_NODE(_hw, OID_AUTO, vpd, CTLFLAG_RD, NULL, NULL, NULL); +SYSCTL_NODE(_hw_vpd, OID_AUTO, machine, CTLFLAG_RD, NULL, NULL, NULL); +SYSCTL_NODE(_hw_vpd_machine, OID_AUTO, type, CTLFLAG_RD, NULL, NULL, NULL); +SYSCTL_NODE(_hw_vpd_machine, OID_AUTO, model, CTLFLAG_RD, NULL, NULL, NULL); +SYSCTL_NODE(_hw_vpd, OID_AUTO, build_id, CTLFLAG_RD, NULL, NULL, NULL); +SYSCTL_NODE(_hw_vpd, OID_AUTO, serial, CTLFLAG_RD, NULL, NULL, NULL); +SYSCTL_NODE(_hw_vpd_serial, OID_AUTO, box, CTLFLAG_RD, NULL, NULL, NULL); +SYSCTL_NODE(_hw_vpd_serial, OID_AUTO, planar, CTLFLAG_RD, NULL, NULL, NULL); static void vpd_identify (driver_t *driver, device_t parent) @@ -190,22 +190,22 @@ snprintf(sc->BoxSerial, 8, "%.7s", sc->vpd->BoxSerial); snprintf(sc->PlanarSerial, 12, "%.11s", sc->vpd->PlanarSerial); - sysctl_ctx_init(&sc->ctx); + sysctl_ctx_init(&sc->ctx, &Giant); SYSCTL_ADD_STRING(&sc->ctx, SYSCTL_STATIC_CHILDREN(_hw_vpd_machine_type), OID_AUTO, - unit, CTLFLAG_RD|CTLFLAG_DYN, sc->MachineType, 0, NULL); + unit, CTLFLAG_RD|CTLFLAG_DYN, sc->MachineType, 0, NULL, &Giant); SYSCTL_ADD_STRING(&sc->ctx, SYSCTL_STATIC_CHILDREN(_hw_vpd_machine_model), OID_AUTO, - unit, CTLFLAG_RD|CTLFLAG_DYN, sc->MachineModel, 0, NULL); + unit, CTLFLAG_RD|CTLFLAG_DYN, sc->MachineModel, 0, NULL, &Giant); SYSCTL_ADD_STRING(&sc->ctx, SYSCTL_STATIC_CHILDREN(_hw_vpd_build_id), OID_AUTO, - unit, CTLFLAG_RD|CTLFLAG_DYN, sc->BuildID, 0, NULL); + unit, CTLFLAG_RD|CTLFLAG_DYN, sc->BuildID, 0, NULL, &Giant); SYSCTL_ADD_STRING(&sc->ctx, SYSCTL_STATIC_CHILDREN(_hw_vpd_serial_box), OID_AUTO, - unit, CTLFLAG_RD|CTLFLAG_DYN, sc->BoxSerial, 0, NULL); + unit, CTLFLAG_RD|CTLFLAG_DYN, sc->BoxSerial, 0, NULL, &Giant); SYSCTL_ADD_STRING(&sc->ctx, SYSCTL_STATIC_CHILDREN(_hw_vpd_serial_planar), OID_AUTO, - unit, CTLFLAG_RD|CTLFLAG_DYN, sc->PlanarSerial, 0, NULL); + unit, CTLFLAG_RD|CTLFLAG_DYN, sc->PlanarSerial, 0, NULL, &Giant); device_printf(dev, "Machine Type: %.4s, Model: %.3s, Build ID: %.9s\n", sc->MachineType, sc->MachineModel, sc->BuildID); @@ -229,7 +229,7 @@ if (sc->res) bus_release_resource(dev, SYS_RES_MEMORY, sc->rid, sc->res); - sysctl_ctx_free(&sc->ctx); + sysctl_ctx_free(&sc->ctx, &Giant); return (0); } diff -ur /home/refugee/freebsd/current/src/sys/i386/i386/busdma_machdep.c repl/i386/i386/busdma_machdep.c --- /home/refugee/freebsd/current/src/sys/i386/i386/busdma_machdep.c Wed Dec 8 20:41:00 2004 +++ repl/i386/i386/busdma_machdep.c Tue Dec 14 00:49:54 2004 @@ -107,9 +107,9 @@ static STAILQ_HEAD(, bounce_zone) bounce_zone_list; static bus_addr_t bounce_lowaddr = BUS_SPACE_MAXADDR; -SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters"); +SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters", NULL); SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0, - "Total bounce pages"); + "Total bounce pages", &Giant); struct bus_dmamap { struct bp_list bpages; @@ -903,13 +903,13 @@ static struct sysctl_ctx_list * busdma_sysctl_tree(struct bounce_zone *bz) { - return (&bz->sysctl_tree); + return (&bz->sysctl_tree, &Giant); } static struct sysctl_oid * busdma_sysctl_tree_top(struct bounce_zone *bz) { - return (bz->sysctl_tree_top); + return (bz->sysctl_tree_top, &Giant); } static int @@ -944,48 +944,48 @@ STAILQ_INSERT_TAIL(&bounce_zone_list, bz, links); dmat->bounce_zone = bz; - sysctl_ctx_init(&bz->sysctl_tree); + sysctl_ctx_init(&bz->sysctl_tree, &Giant); bz->sysctl_tree_top = SYSCTL_ADD_NODE(&bz->sysctl_tree, SYSCTL_STATIC_CHILDREN(_hw_busdma), OID_AUTO, bz->zoneid, - CTLFLAG_RD, 0, ""); + CTLFLAG_RD, 0, "", &Giant); if (bz->sysctl_tree_top == NULL) { - sysctl_ctx_free(&bz->sysctl_tree); + sysctl_ctx_free(&bz->sysctl_tree, &Giant); return (0); /* XXX error code? */ } SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "total_bpages", CTLFLAG_RD, &bz->total_bpages, 0, - "Totoal bounce pages"); + "Totoal bounce pages", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "free_bpages", CTLFLAG_RD, &bz->free_bpages, 0, - "Free bounce pages"); + "Free bounce pages", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "reserved_bpages", CTLFLAG_RD, &bz->reserved_bpages, 0, - "Reserved bounce pages"); + "Reserved bounce pages", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "active_bpages", CTLFLAG_RD, &bz->active_bpages, 0, - "Active bounce pages"); + "Active bounce pages", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "total_bounced", CTLFLAG_RD, &bz->total_bounced, 0, - "Total bounce requests"); + "Total bounce requests", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "total_deferred", CTLFLAG_RD, &bz->total_deferred, 0, - "Total bounce requests that were deferred"); + "Total bounce requests that were deferred", &Giant); SYSCTL_ADD_STRING(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, ""); + "lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, "", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "alignment", CTLFLAG_RD, &bz->alignment, 0, ""); + "alignment", CTLFLAG_RD, &bz->alignment, 0, "", &Giant); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "boundary", CTLFLAG_RD, &bz->boundary, 0, ""); + "boundary", CTLFLAG_RD, &bz->boundary, 0, "", &Giant); return (0); } diff -ur /home/refugee/freebsd/current/src/sys/i386/i386/elan-mmcr.c repl/i386/i386/elan-mmcr.c --- /home/refugee/freebsd/current/src/sys/i386/i386/elan-mmcr.c Sun Oct 31 04:52:41 2004 +++ repl/i386/i386/elan-mmcr.c Tue Dec 14 00:49:54 2004 @@ -204,7 +204,7 @@ } SYSCTL_OID(_machdep, OID_AUTO, elan_gpio_config, CTLTYPE_STRING | CTLFLAG_RW, - NULL, 0, sysctl_machdep_elan_gpio_config, "A", "Elan CPU GPIO pin config"); + NULL, 0, sysctl_machdep_elan_gpio_config, "A", "Elan CPU GPIO pin config", &Giant); #ifdef CPU_ELAN_PPS static void @@ -298,14 +298,14 @@ int error; f = elan_timecounter.tc_frequency * 4; - error = sysctl_handle_int(oidp, &f, sizeof(f), req); + error = sysctl_handle_int(oidp, &f, sizeof(f), req, &Giant); if (error == 0 && req->newptr != NULL) elan_timecounter.tc_frequency = (f + 3) / 4; return (error); } SYSCTL_PROC(_machdep, OID_AUTO, elan_freq, CTLTYPE_UINT | CTLFLAG_RW, - 0, sizeof (u_int), sysctl_machdep_elan_freq, "IU", ""); + 0, sizeof (u_int), sysctl_machdep_elan_freq, "IU", "", &Giant); /* * Positively identifying the Elan can only be done through the PCI id of diff -ur /home/refugee/freebsd/current/src/sys/i386/i386/i686_mem.c repl/i386/i386/i686_mem.c --- /home/refugee/freebsd/current/src/sys/i386/i386/i686_mem.c Sun Oct 31 04:52:41 2004 +++ repl/i386/i386/i686_mem.c Tue Dec 14 00:49:54 2004 @@ -65,7 +65,7 @@ static int mtrrs_disabled; TUNABLE_INT("machdep.disable_mtrrs", &mtrrs_disabled); SYSCTL_INT(_machdep, OID_AUTO, disable_mtrrs, CTLFLAG_RDTUN, - &mtrrs_disabled, 0, "Disable i686 MTRRs."); + &mtrrs_disabled, 0, "Disable i686 MTRRs.", &Giant); static void i686_mrinit(struct mem_range_softc *sc); static int i686_mrset(struct mem_range_softc *sc, diff -ur /home/refugee/freebsd/current/src/sys/i386/i386/identcpu.c repl/i386/i386/identcpu.c --- /home/refugee/freebsd/current/src/sys/i386/i386/identcpu.c Sun Nov 21 00:03:21 2004 +++ repl/i386/i386/identcpu.c Tue Dec 14 00:49:54 2004 @@ -88,15 +88,15 @@ u_int cyrix_did; /* Device ID of Cyrix CPU */ char machine[] = "i386"; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, - machine, 0, "Machine class"); + machine, 0, "Machine class", &Giant); static char cpu_model[128]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, - cpu_model, 0, "Machine model"); + cpu_model, 0, "Machine model", &Giant); static int hw_clockrate; SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, - &hw_clockrate, 0, "CPU instruction clock rate"); + &hw_clockrate, 0, "CPU instruction clock rate", &Giant); #if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) static char cpu_brand[48]; diff -ur /home/refugee/freebsd/current/src/sys/i386/i386/initcpu.c repl/i386/i386/initcpu.c --- /home/refugee/freebsd/current/src/sys/i386/i386/initcpu.c Sun Oct 31 04:52:41 2004 +++ repl/i386/i386/initcpu.c Tue Dec 14 00:49:54 2004 @@ -74,7 +74,7 @@ static int hw_instruction_sse; SYSCTL_INT(_hw, OID_AUTO, instruction_sse, CTLFLAG_RD, - &hw_instruction_sse, 0, "SIMD/MMX2 instructions available in CPU"); + &hw_instruction_sse, 0, "SIMD/MMX2 instructions available in CPU", &Giant); /* Must *NOT* be BSS or locore will bzero these after setting them */ int cpu = 0; /* Are we 386, 386sx, 486, etc? */ diff -ur /home/refugee/freebsd/current/src/sys/i386/i386/longrun.c repl/i386/i386/longrun.c --- /home/refugee/freebsd/current/src/sys/i386/i386/longrun.c Sun Oct 31 04:52:41 2004 +++ repl/i386/i386/longrun.c Tue Dec 14 00:49:54 2004 @@ -201,7 +201,7 @@ crusoe_longrun = tmx86_get_longrun_mode(); mode = crusoe_longrun; - error = sysctl_handle_int(oidp, &mode, 0, req); + error = sysctl_handle_int(oidp, &mode, 0, req, &Giant); if (error || !req->newptr) { return (error); } @@ -226,7 +226,7 @@ tmx86_get_longrun_status(&crusoe_frequency, &crusoe_voltage, &crusoe_percentage); val = *(u_int *)oidp->oid_arg1; - error = sysctl_handle_int(oidp, &val, 0, req); + error = sysctl_handle_int(oidp, &val, 0, req, &Giant); return (error); } @@ -239,7 +239,7 @@ argp = (u_int32_t *)oidp->oid_arg1; arg = *argp; - error = sysctl_handle_int(oidp, &arg, 0, req); + error = sysctl_handle_int(oidp, &arg, 0, req, &Giant); /* error or no new value */ if ((error != 0) || (req->newptr == NULL)) @@ -272,11 +272,11 @@ "<%dMHz %dmV %d%%>\n", crusoe_longrun, crusoe_frequency, crusoe_voltage, crusoe_percentage); - sysctl_ctx_init(&crusoe_sysctl_ctx); + sysctl_ctx_init(&crusoe_sysctl_ctx, &Giant); crusoe_sysctl_tree = SYSCTL_ADD_NODE(&crusoe_sysctl_ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, "crusoe", CTLFLAG_RD, 0, - "Transmeta Crusoe LongRun support"); + "Transmeta Crusoe LongRun support", &Giant); SYSCTL_ADD_PROC(&crusoe_sysctl_ctx, SYSCTL_CHILDREN(crusoe_sysctl_tree), OID_AUTO, "longrun", CTLTYPE_INT | CTLFLAG_RW, &crusoe_longrun, 0, tmx86_longrun_sysctl, "I", diff -ur /home/refugee/freebsd/current/src/sys/i386/i386/machdep.c repl/i386/i386/machdep.c --- /home/refugee/freebsd/current/src/sys/i386/i386/machdep.c Wed Dec 8 20:41:00 2004 +++ repl/i386/i386/machdep.c Tue Dec 14 00:49:54 2004 @@ -1049,7 +1049,7 @@ */ static int cpu_idle_hlt = 1; SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, - &cpu_idle_hlt, 0, "Idle loop HLT enable"); + &cpu_idle_hlt, 0, "Idle loop HLT enable", &Giant); static void cpu_idle_default(void) @@ -1187,27 +1187,27 @@ { int error; error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, - req); + req, &Giant); if (!error && req->newptr) resettodr(); return (error); } SYSCTL_PROC(_machdep, CPU_ADJKERNTZ, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", ""); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "", &Giant); SYSCTL_INT(_machdep, CPU_DISRTCSET, disable_rtc_set, - CTLFLAG_RW, &disable_rtc_set, 0, ""); + CTLFLAG_RW, &disable_rtc_set, 0, "", &Giant); SYSCTL_STRUCT(_machdep, CPU_BOOTINFO, bootinfo, - CTLFLAG_RD, &bootinfo, bootinfo, ""); + CTLFLAG_RD, &bootinfo, bootinfo, "", &Giant); SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, - CTLFLAG_RW, &wall_cmos_clock, 0, ""); + CTLFLAG_RW, &wall_cmos_clock, 0, "", &Giant); u_long bootdev; /* not a struct cdev *- encoding is different */ SYSCTL_ULONG(_machdep, OID_AUTO, guessed_bootdev, - CTLFLAG_RD, &bootdev, 0, "Maybe the Boot device (not in struct cdev *format)"); + CTLFLAG_RD, &bootdev, 0, "Maybe the Boot device (not in struct cdev *format)", &Giant); /* * Initialize 386 and configure to run kernel diff -ur /home/refugee/freebsd/current/src/sys/i386/i386/mp_clock.c repl/i386/i386/mp_clock.c --- /home/refugee/freebsd/current/src/sys/i386/i386/mp_clock.c Sun Oct 31 04:52:41 2004 +++ repl/i386/i386/mp_clock.c Tue Dec 14 00:49:55 2004 @@ -71,7 +71,7 @@ if (piix_timecounter.tc_frequency == 0) return (EOPNOTSUPP); freq = piix_freq; - error = sysctl_handle_int(oidp, &freq, sizeof(freq), req); + error = sysctl_handle_int(oidp, &freq, sizeof(freq), req, &Giant); if (error == 0 && req->newptr != NULL) { piix_freq = freq; piix_timecounter.tc_frequency = piix_freq; @@ -80,7 +80,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, piix_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_piix_freq, "I", ""); + 0, sizeof(u_int), sysctl_machdep_piix_freq, "I", "", &Giant); static unsigned piix_get_timecount(struct timecounter *tc) diff -ur /home/refugee/freebsd/current/src/sys/i386/i386/mp_machdep.c repl/i386/i386/mp_machdep.c --- /home/refugee/freebsd/current/src/sys/i386/i386/mp_machdep.c Wed Dec 8 20:41:00 2004 +++ repl/i386/i386/mp_machdep.c Tue Dec 14 00:49:54 2004 @@ -878,36 +878,36 @@ u_int xhits_gbl[MAXCPU]; u_int xhits_pg[MAXCPU]; u_int xhits_rng[MAXCPU]; -SYSCTL_NODE(_debug, OID_AUTO, xhits, CTLFLAG_RW, 0, ""); +SYSCTL_NODE(_debug, OID_AUTO, xhits, CTLFLAG_RW, 0, "", NULL); SYSCTL_OPAQUE(_debug_xhits, OID_AUTO, global, CTLFLAG_RW, &xhits_gbl, - sizeof(xhits_gbl), "IU", ""); + sizeof(xhits_gbl), "IU", "", &Giant); SYSCTL_OPAQUE(_debug_xhits, OID_AUTO, page, CTLFLAG_RW, &xhits_pg, - sizeof(xhits_pg), "IU", ""); + sizeof(xhits_pg), "IU", "", &Giant); SYSCTL_OPAQUE(_debug_xhits, OID_AUTO, range, CTLFLAG_RW, &xhits_rng, - sizeof(xhits_rng), "IU", ""); + sizeof(xhits_rng), "IU", "", &Giant); u_int ipi_global; u_int ipi_page; u_int ipi_range; u_int ipi_range_size; -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_global, CTLFLAG_RW, &ipi_global, 0, ""); -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_page, CTLFLAG_RW, &ipi_page, 0, ""); -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_range, CTLFLAG_RW, &ipi_range, 0, ""); +SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_global, CTLFLAG_RW, &ipi_global, 0, "", &Giant); +SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_page, CTLFLAG_RW, &ipi_page, 0, "", &Giant); +SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_range, CTLFLAG_RW, &ipi_range, 0, "", &Giant); SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_range_size, CTLFLAG_RW, &ipi_range_size, - 0, ""); + 0, "", &Giant); u_int ipi_masked_global; u_int ipi_masked_page; u_int ipi_masked_range; u_int ipi_masked_range_size; SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_masked_global, CTLFLAG_RW, - &ipi_masked_global, 0, ""); + &ipi_masked_global, 0, "", &Giant); SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_masked_page, CTLFLAG_RW, - &ipi_masked_page, 0, ""); + &ipi_masked_page, 0, "", &Giant); SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_masked_range, CTLFLAG_RW, - &ipi_masked_range, 0, ""); + &ipi_masked_range, 0, "", &Giant); SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_masked_range_size, CTLFLAG_RW, - &ipi_masked_range_size, 0, ""); + &ipi_masked_range_size, 0, "", &Giant); #endif /* COUNT_XINVLTLB_HITS */ /* @@ -1264,7 +1264,7 @@ int error; mask = hlt_cpus_mask; - error = sysctl_handle_int(oidp, &mask, 0, req); + error = sysctl_handle_int(oidp, &mask, 0, req, &Giant); if (error || !req->newptr) return (error); @@ -1281,7 +1281,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, hlt_cpus, CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_hlt_cpus, "IU", - "Bitmap of CPUs to halt. 101 (binary) will halt CPUs 0 and 2."); + "Bitmap of CPUs to halt. 101 (binary) will halt CPUs 0 and 2.", &Giant); static int sysctl_hlt_logical_cpus(SYSCTL_HANDLER_ARGS) @@ -1289,7 +1289,7 @@ int disable, error; disable = hlt_logical_cpus; - error = sysctl_handle_int(oidp, &disable, 0, req); + error = sysctl_handle_int(oidp, &disable, 0, req, &Giant); if (error || !req->newptr) return (error); @@ -1312,7 +1312,7 @@ if (logical_cpus_mask != 0) { TUNABLE_INT_FETCH("machdep.hlt_logical_cpus", &hlt_logical_cpus); - sysctl_ctx_init(&logical_cpu_clist); + sysctl_ctx_init(&logical_cpu_clist, &Giant); SYSCTL_ADD_PROC(&logical_cpu_clist, SYSCTL_STATIC_CHILDREN(_machdep), OID_AUTO, "hlt_logical_cpus", CTLTYPE_INT|CTLFLAG_RW, 0, 0, @@ -1320,7 +1320,7 @@ SYSCTL_ADD_UINT(&logical_cpu_clist, SYSCTL_STATIC_CHILDREN(_machdep), OID_AUTO, "logical_cpus_mask", CTLTYPE_INT|CTLFLAG_RD, - &logical_cpus_mask, 0, ""); + &logical_cpus_mask, 0, "", &Giant); if (hlt_logical_cpus) hlt_cpus_mask |= logical_cpus_mask; diff -ur /home/refugee/freebsd/current/src/sys/i386/i386/mp_watchdog.c repl/i386/i386/mp_watchdog.c --- /home/refugee/freebsd/current/src/sys/i386/i386/mp_watchdog.c Sun Oct 31 04:52:41 2004 +++ repl/i386/i386/mp_watchdog.c Tue Dec 14 00:49:54 2004 @@ -69,7 +69,7 @@ static int watchdog_nmi = 1; SYSCTL_INT(_debug, OID_AUTO, watchdog_nmi, CTLFLAG_RW, &watchdog_nmi, 0, - "IPI the boot processor with an NMI to enter the debugger"); + "IPI the boot processor with an NMI to enter the debugger", &Giant); static struct callout watchdog_callout; @@ -118,7 +118,7 @@ int error, temp; temp = watchdog_cpu; - error = sysctl_handle_int(oidp, &temp, 0, req); + error = sysctl_handle_int(oidp, &temp, 0, req, &Giant); if (error) return (error); @@ -142,7 +142,7 @@ return (0); } SYSCTL_PROC(_debug, OID_AUTO, watchdog, CTLTYPE_INT|CTLFLAG_RW, 0, 0, - sysctl_watchdog, "IU", ""); + sysctl_watchdog, "IU", "", &Giant); /* * A badly behaved sysctl that leaks the sched lock when written to. Then @@ -156,7 +156,7 @@ int error, temp; temp = 0; - error = sysctl_handle_int(oidp, &temp, 0, req); + error = sysctl_handle_int(oidp, &temp, 0, req, &Giant); if (error) return (error); @@ -170,7 +170,7 @@ return (0); } SYSCTL_PROC(_debug, OID_AUTO, leak_schedlock, CTLTYPE_INT|CTLFLAG_RW, 0, 0, - sysctl_leak_schedlock, "IU", ""); + sysctl_leak_schedlock, "IU", "", &Giant); /* * Drop into the debugger by sending an IPI NMI to the boot processor. diff -ur /home/refugee/freebsd/current/src/sys/i386/i386/p4tcc.c repl/i386/i386/p4tcc.c --- /home/refugee/freebsd/current/src/sys/i386/i386/p4tcc.c Sun Oct 31 04:52:41 2004 +++ repl/i386/i386/p4tcc.c Tue Dec 14 00:49:54 2004 @@ -119,7 +119,7 @@ p4tcc_percentage = p4tcc_getperf(); percentage = p4tcc_percentage; - error = sysctl_handle_int(oidp, &percentage, 0, req); + error = sysctl_handle_int(oidp, &percentage, 0, req, &Giant); if (error || !req->newptr) { return (error); } @@ -160,7 +160,7 @@ argp = (u_int32_t *)oidp->oid_arg1; arg = *argp; - error = sysctl_handle_int(oidp, &arg, 0, req); + error = sysctl_handle_int(oidp, &arg, 0, req, &Giant); /* error or no new value */ if ((error != 0) || (req->newptr == NULL)) @@ -228,10 +228,10 @@ "current performance %u%%\n", nsteps, p4tcc_economy, p4tcc_percentage); - sysctl_ctx_init(&p4tcc_sysctl_ctx); + sysctl_ctx_init(&p4tcc_sysctl_ctx, &Giant); p4tcc_sysctl_tree = SYSCTL_ADD_NODE(&p4tcc_sysctl_ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, "p4tcc", CTLFLAG_RD, 0, - "Pentium 4 Thermal Control Circuitry support"); + "Pentium 4 Thermal Control Circuitry support", &Giant); SYSCTL_ADD_PROC(&p4tcc_sysctl_ctx, SYSCTL_CHILDREN(p4tcc_sysctl_tree), OID_AUTO, "cpuperf", CTLTYPE_INT | CTLFLAG_RW, @@ -251,7 +251,7 @@ SYSCTL_CHILDREN(p4tcc_sysctl_tree), OID_AUTO, "cpuperf_levels", CTLFLAG_RD, p4tcc_levels, 0, "Perormance levels supported by the Pentium 4 Thermal Control " - "Circuitry"); + "Circuitry", &Giant); /* register performance profile change handler */ EVENTHANDLER_REGISTER(power_profile_change, p4tcc_power_profile, NULL, 0); diff -ur /home/refugee/freebsd/current/src/sys/i386/i386/pmap.c repl/i386/i386/pmap.c --- /home/refugee/freebsd/current/src/sys/i386/i386/pmap.c Wed Dec 8 20:41:02 2004 +++ repl/i386/i386/pmap.c Tue Dec 14 00:49:54 2004 @@ -242,16 +242,16 @@ static int PMAP1changedcpu; SYSCTL_INT(_debug, OID_AUTO, PMAP1changedcpu, CTLFLAG_RD, &PMAP1changedcpu, 0, - "Number of times pmap_pte_quick changed CPU with same PMAP1"); + "Number of times pmap_pte_quick changed CPU with same PMAP1", &Giant); #endif static int PMAP1changed; SYSCTL_INT(_debug, OID_AUTO, PMAP1changed, CTLFLAG_RD, &PMAP1changed, 0, - "Number of times pmap_pte_quick changed PMAP1"); + "Number of times pmap_pte_quick changed PMAP1", &Giant); static int PMAP1unchanged; SYSCTL_INT(_debug, OID_AUTO, PMAP1unchanged, CTLFLAG_RD, &PMAP1unchanged, 0, - "Number of times pmap_pte_quick didn't change PMAP1"); + "Number of times pmap_pte_quick didn't change PMAP1", &Giant); static struct mtx PMAP2mutex; static PMAP_INLINE void free_pv_entry(pv_entry_t pv); @@ -1382,20 +1382,20 @@ { unsigned long ksize = VM_MAX_KERNEL_ADDRESS - KERNBASE; - return sysctl_handle_long(oidp, &ksize, 0, req); + return sysctl_handle_long(oidp, &ksize, 0, req, &Giant); } SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG|CTLFLAG_RD, - 0, 0, kvm_size, "IU", "Size of KVM"); + 0, 0, kvm_size, "IU", "Size of KVM", &Giant); static int kvm_free(SYSCTL_HANDLER_ARGS) { unsigned long kfree = VM_MAX_KERNEL_ADDRESS - kernel_vm_end; - return sysctl_handle_long(oidp, &kfree, 0, req); + return sysctl_handle_long(oidp, &kfree, 0, req, &Giant); } SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD, - 0, 0, kvm_free, "IU", "Amount of KVM free"); + 0, 0, kvm_free, "IU", "Amount of KVM free", &Giant); /* * grow the number of kernel page table entries, if needed diff -ur /home/refugee/freebsd/current/src/sys/i386/i386/trap.c repl/i386/i386/trap.c --- /home/refugee/freebsd/current/src/sys/i386/i386/trap.c Sun Nov 21 00:03:22 2004 +++ repl/i386/i386/trap.c Tue Dec 14 00:49:54 2004 @@ -145,11 +145,11 @@ #ifdef KDB static int kdb_on_nmi = 1; SYSCTL_INT(_machdep, OID_AUTO, kdb_on_nmi, CTLFLAG_RW, - &kdb_on_nmi, 0, "Go to KDB on NMI"); + &kdb_on_nmi, 0, "Go to KDB on NMI", &Giant); #endif static int panic_on_nmi = 1; SYSCTL_INT(_machdep, OID_AUTO, panic_on_nmi, CTLFLAG_RW, - &panic_on_nmi, 0, "Panic on NMI"); + &panic_on_nmi, 0, "Panic on NMI", &Giant); #ifdef WITNESS extern char *syscallnames[]; diff -ur /home/refugee/freebsd/current/src/sys/i386/i386/tsc.c repl/i386/i386/tsc.c --- /home/refugee/freebsd/current/src/sys/i386/i386/tsc.c Sun Oct 31 04:52:41 2004 +++ repl/i386/i386/tsc.c Tue Dec 14 00:49:55 2004 @@ -48,7 +48,7 @@ #ifdef SMP static int smp_tsc; SYSCTL_INT(_kern_timecounter, OID_AUTO, smp_tsc, CTLFLAG_RDTUN, &smp_tsc, 0, - "Indicates whether the TSC is safe to use in SMP mode"); + "Indicates whether the TSC is safe to use in SMP mode", &Giant); TUNABLE_INT("kern.timecounter.smp_tsc", &smp_tsc); #endif @@ -136,7 +136,7 @@ if (tsc_timecounter.tc_frequency == 0) return (EOPNOTSUPP); freq = tsc_freq; - error = sysctl_handle_int(oidp, &freq, sizeof(freq), req); + error = sysctl_handle_int(oidp, &freq, sizeof(freq), req, &Giant); if (error == 0 && req->newptr != NULL) { tsc_freq = freq; tsc_timecounter.tc_frequency = tsc_freq; @@ -145,7 +145,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_QUAD | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_tsc_freq, "IU", ""); + 0, sizeof(u_int), sysctl_machdep_tsc_freq, "IU", "", &Giant); static unsigned tsc_get_timecount(struct timecounter *tc) diff -ur /home/refugee/freebsd/current/src/sys/i386/isa/clock.c repl/i386/isa/clock.c --- /home/refugee/freebsd/current/src/sys/i386/isa/clock.c Sun Oct 31 04:52:43 2004 +++ repl/i386/isa/clock.c Tue Dec 14 00:49:55 2004 @@ -991,7 +991,7 @@ * is is too generic. Should use it everywhere. */ freq = timer_freq; - error = sysctl_handle_int(oidp, &freq, sizeof(freq), req); + error = sysctl_handle_int(oidp, &freq, sizeof(freq), req, &Giant); if (error == 0 && req->newptr != NULL) { #ifndef BURN_BRIDGES if (timer0_state != RELEASED) @@ -1004,7 +1004,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, i8254_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_i8254_freq, "IU", ""); + 0, sizeof(u_int), sysctl_machdep_i8254_freq, "IU", "", &Giant); static unsigned i8254_get_timecount(struct timecounter *tc) diff -ur /home/refugee/freebsd/current/src/sys/i386/isa/npx.c repl/i386/isa/npx.c --- /home/refugee/freebsd/current/src/sys/i386/isa/npx.c Wed Dec 8 20:41:02 2004 +++ repl/i386/isa/npx.c Tue Dec 14 00:49:55 2004 @@ -165,7 +165,7 @@ SYSCTL_INT(_hw,HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, &hw_float, 0, - "Floatingpoint instructions executed in hardware"); + "Floatingpoint instructions executed in hardware", &Giant); static volatile u_int npx_intrs_while_probing; static volatile u_int npx_traps_while_probing; diff -ur /home/refugee/freebsd/current/src/sys/i386/isa/prof_machdep.c repl/i386/isa/prof_machdep.c --- /home/refugee/freebsd/current/src/sys/i386/isa/prof_machdep.c Sun Oct 31 04:52:43 2004 +++ repl/i386/isa/prof_machdep.c Tue Dec 14 00:49:55 2004 @@ -260,7 +260,7 @@ clock += pmc.pmc_event; } #endif - error = sysctl_handle_opaque(oidp, &clock, sizeof clock, req); + error = sysctl_handle_opaque(oidp, &clock, sizeof clock, req, &Giant); if (error == 0 && req->newptr != NULL) { #if defined(PERFMON) && defined(I586_PMC_GUPROF) if (clock >= CPUTIME_CLOCK_I586_PMC) { @@ -286,7 +286,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, cputime_clock, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_cputime_clock, "I", ""); + 0, sizeof(u_int), sysctl_machdep_cputime_clock, "I", "", &Giant); /* * The start and stop routines need not be here since we turn off profiling diff -ur /home/refugee/freebsd/current/src/sys/i386/pci/pci_bus.c repl/i386/pci/pci_bus.c --- /home/refugee/freebsd/current/src/sys/i386/pci/pci_bus.c Sun Nov 14 03:56:23 2004 +++ repl/i386/pci/pci_bus.c Tue Dec 14 00:49:55 2004 @@ -477,7 +477,7 @@ SYSCTL_ULONG(_hw_pci, OID_AUTO, host_mem_start, CTLFLAG_RDTUN, &legacy_host_mem_start, 0x80000000, "Limit the host bridge memory to being above this address. Must be\n\ -set at boot via a tunable."); +set at boot via a tunable.", &Giant); static struct resource * legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, diff -ur /home/refugee/freebsd/current/src/sys/i386/pci/pci_pir.c repl/i386/pci/pci_pir.c --- /home/refugee/freebsd/current/src/sys/i386/pci/pci_pir.c Sun Oct 31 04:52:42 2004 +++ repl/i386/pci/pci_pir.c Tue Dec 14 00:49:55 2004 @@ -123,7 +123,7 @@ SYSCTL_INT(_hw_pci, OID_AUTO, irq_override_mask, CTLFLAG_RDTUN, &pci_irq_override_mask, PCI_IRQ_OVERRIDE_MASK, "Mask of allowed irqs to try to route when it has no good clue about\n" - "which irqs it should use."); + "which irqs it should use.", &Giant); /* * Look for the interrupt routing table. diff -ur /home/refugee/freebsd/current/src/sys/ia64/acpica/OsdEnvironment.c repl/ia64/acpica/OsdEnvironment.c --- /home/refugee/freebsd/current/src/sys/ia64/acpica/OsdEnvironment.c Sun Oct 31 04:50:28 2004 +++ repl/ia64/acpica/OsdEnvironment.c Tue Dec 14 00:49:42 2004 @@ -40,7 +40,7 @@ static u_long acpi_root_phys; SYSCTL_ULONG(_machdep, OID_AUTO, acpi_root, CTLFLAG_RD, &acpi_root_phys, 0, - "The physical address of the RSDP"); + "The physical address of the RSDP", &Giant); ACPI_STATUS AcpiOsInitialize(void) diff -ur /home/refugee/freebsd/current/src/sys/ia64/ia64/busdma_machdep.c repl/ia64/ia64/busdma_machdep.c --- /home/refugee/freebsd/current/src/sys/ia64/ia64/busdma_machdep.c Sun Oct 31 04:50:28 2004 +++ repl/ia64/ia64/busdma_machdep.c Tue Dec 14 00:49:42 2004 @@ -89,19 +89,19 @@ static int total_deferred; static bus_addr_t bounce_lowaddr = BUS_SPACE_MAXADDR; -SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters"); +SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters", NULL); SYSCTL_INT(_hw_busdma, OID_AUTO, free_bpages, CTLFLAG_RD, &free_bpages, 0, - "Free bounce pages"); + "Free bounce pages", &Giant); SYSCTL_INT(_hw_busdma, OID_AUTO, reserved_bpages, CTLFLAG_RD, &reserved_bpages, - 0, "Reserved bounce pages"); + 0, "Reserved bounce pages", &Giant); SYSCTL_INT(_hw_busdma, OID_AUTO, active_bpages, CTLFLAG_RD, &active_bpages, 0, - "Active bounce pages"); + "Active bounce pages", &Giant); SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0, - "Total bounce pages"); + "Total bounce pages", &Giant); SYSCTL_INT(_hw_busdma, OID_AUTO, total_bounced, CTLFLAG_RD, &total_bounced, 0, - "Total bounce requests"); + "Total bounce requests", &Giant); SYSCTL_INT(_hw_busdma, OID_AUTO, total_deferred, CTLFLAG_RD, &total_deferred, 0, - "Total bounce requests that were deferred"); + "Total bounce requests that were deferred", &Giant); struct bus_dmamap { struct bp_list bpages; diff -ur /home/refugee/freebsd/current/src/sys/ia64/ia64/clock.c repl/ia64/ia64/clock.c --- /home/refugee/freebsd/current/src/sys/ia64/ia64/clock.c Sun Oct 31 04:50:28 2004 +++ repl/ia64/ia64/clock.c Tue Dec 14 00:49:42 2004 @@ -65,19 +65,19 @@ */ #define LEAPYEAR(y) (((y) % 4) == 0) -static int sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS); +static int sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS, &Giant); int disable_rtc_set; /* disable resettodr() if != 0 */ SYSCTL_INT(_machdep, CPU_DISRTCSET, disable_rtc_set, - CTLFLAG_RW, &disable_rtc_set, 0, ""); + CTLFLAG_RW, &disable_rtc_set, 0, "", &Giant); int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, - CTLFLAG_RW, &wall_cmos_clock, 0, ""); + CTLFLAG_RW, &wall_cmos_clock, 0, "", &Giant); int adjkerntz; /* local offset from GMT in seconds */ SYSCTL_PROC(_machdep, CPU_ADJKERNTZ, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", ""); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "", &Giant); kobj_t clockdev; int todr_initialized; @@ -107,7 +107,7 @@ { int error; - error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); + error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req, &Giant); if (!error && req->newptr) resettodr(); return (error); diff -ur /home/refugee/freebsd/current/src/sys/ia64/ia64/interrupt.c repl/ia64/ia64/interrupt.c --- /home/refugee/freebsd/current/src/sys/ia64/ia64/interrupt.c Sun Oct 31 04:50:28 2004 +++ repl/ia64/ia64/interrupt.c Tue Dec 14 00:49:42 2004 @@ -88,41 +88,41 @@ static unsigned int ints[MAXCPU]; SYSCTL_OPAQUE(_debug, OID_AUTO, ints, CTLFLAG_RW, &ints, sizeof(ints), "IU", - ""); + "", &Giant); static unsigned int clks[MAXCPU]; #ifdef SMP SYSCTL_OPAQUE(_debug, OID_AUTO, clks, CTLFLAG_RW, &clks, sizeof(clks), "IU", - ""); + "", &Giant); #else -SYSCTL_INT(_debug, OID_AUTO, clks, CTLFLAG_RW, clks, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, clks, CTLFLAG_RW, clks, 0, "", &Giant); #endif #ifdef SMP static unsigned int asts[MAXCPU]; SYSCTL_OPAQUE(_debug, OID_AUTO, asts, CTLFLAG_RW, &asts, sizeof(asts), "IU", - ""); + "", &Giant); static unsigned int rdvs[MAXCPU]; SYSCTL_OPAQUE(_debug, OID_AUTO, rdvs, CTLFLAG_RW, &rdvs, sizeof(rdvs), "IU", - ""); + "", &Giant); #endif static int adjust_edges = 0; SYSCTL_INT(_debug, OID_AUTO, clock_adjust_edges, CTLFLAG_RW, - &adjust_edges, 0, "Number of times ITC got more than 12.5% behind"); + &adjust_edges, 0, "Number of times ITC got more than 12.5% behind", &Giant); static int adjust_excess = 0; SYSCTL_INT(_debug, OID_AUTO, clock_adjust_excess, CTLFLAG_RW, - &adjust_excess, 0, "Total number of ignored ITC interrupts"); + &adjust_excess, 0, "Total number of ignored ITC interrupts", &Giant); static int adjust_lost = 0; SYSCTL_INT(_debug, OID_AUTO, clock_adjust_lost, CTLFLAG_RW, - &adjust_lost, 0, "Total number of lost ITC interrupts"); + &adjust_lost, 0, "Total number of lost ITC interrupts", &Giant); static int adjust_ticks = 0; SYSCTL_INT(_debug, OID_AUTO, clock_adjust_ticks, CTLFLAG_RW, - &adjust_ticks, 0, "Total number of ITC interrupts with adjustment"); + &adjust_ticks, 0, "Total number of ITC interrupts with adjustment", &Giant); int interrupt(u_int64_t vector, struct trapframe *tf) diff -ur /home/refugee/freebsd/current/src/sys/ia64/ia64/machdep.c repl/ia64/ia64/machdep.c --- /home/refugee/freebsd/current/src/sys/ia64/ia64/machdep.c Wed Dec 8 20:41:03 2004 +++ repl/ia64/ia64/machdep.c Tue Dec 14 00:49:42 2004 @@ -116,15 +116,15 @@ u_int64_t ia64_port_base; char machine[] = MACHINE; -SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, ""); +SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "", &Giant); static char cpu_model[64]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, - "The CPU model name"); + "The CPU model name", &Giant); static char cpu_family[64]; SYSCTL_STRING(_hw, OID_AUTO, family, CTLFLAG_RD, cpu_family, 0, - "The CPU family name"); + "The CPU family name", &Giant); #ifdef DDB extern vm_offset_t ksym_start, ksym_end; diff -ur /home/refugee/freebsd/current/src/sys/ia64/ia64/mca.c repl/ia64/ia64/mca.c --- /home/refugee/freebsd/current/src/sys/ia64/ia64/mca.c Sun Oct 31 04:50:28 2004 +++ repl/ia64/ia64/mca.c Tue Dec 14 00:49:42 2004 @@ -46,18 +46,18 @@ vm_offset_t mca_info_block; struct mtx mca_info_block_lock; -SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RW, 0, "MCA container"); +SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RW, 0, "MCA container", NULL); static int mca_count; /* Number of records stored. */ static int mca_first; /* First (lowest) record ID. */ static int mca_last; /* Last (highest) record ID. */ SYSCTL_INT(_hw_mca, OID_AUTO, count, CTLFLAG_RD, &mca_count, 0, - "Record count"); + "Record count", &Giant); SYSCTL_INT(_hw_mca, OID_AUTO, first, CTLFLAG_RD, &mca_first, 0, - "First record id"); + "First record id", &Giant); SYSCTL_INT(_hw_mca, OID_AUTO, last, CTLFLAG_RD, &mca_last, 0, - "Last record id"); + "Last record id", &Giant); static int mca_sysctl_handler(SYSCTL_HANDLER_ARGS) @@ -147,7 +147,7 @@ oidp->oid_fmt = "S,MCA"; oidp->descr = "Error record"; - sysctl_register_oid(oidp); + sysctl_register_oid(oidp, &Giant); if (mca_count > 0) { if (seqnr < mca_first) diff -ur /home/refugee/freebsd/current/src/sys/ia64/ia64/pmap.c repl/ia64/ia64/pmap.c --- /home/refugee/freebsd/current/src/sys/ia64/ia64/pmap.c Wed Dec 8 20:41:03 2004 +++ repl/ia64/ia64/pmap.c Tue Dec 14 00:49:42 2004 @@ -208,13 +208,13 @@ static int pmap_vhpt_collisions; static int pmap_vhpt_resident; SYSCTL_DECL(_vm_stats); -SYSCTL_NODE(_vm_stats, OID_AUTO, vhpt, CTLFLAG_RD, 0, ""); +SYSCTL_NODE(_vm_stats, OID_AUTO, vhpt, CTLFLAG_RD, 0, "", NULL); SYSCTL_INT(_vm_stats_vhpt, OID_AUTO, inserts, CTLFLAG_RD, - &pmap_vhpt_inserts, 0, ""); + &pmap_vhpt_inserts, 0, "", &Giant); SYSCTL_INT(_vm_stats_vhpt, OID_AUTO, collisions, CTLFLAG_RD, - &pmap_vhpt_collisions, 0, ""); + &pmap_vhpt_collisions, 0, "", &Giant); SYSCTL_INT(_vm_stats_vhpt, OID_AUTO, resident, CTLFLAG_RD, - &pmap_vhpt_resident, 0, ""); + &pmap_vhpt_resident, 0, "", &Giant); static PMAP_INLINE void free_pv_entry(pv_entry_t pv); static pv_entry_t get_pv_entry(void); diff -ur /home/refugee/freebsd/current/src/sys/ia64/ia64/sapic.c repl/ia64/ia64/sapic.c --- /home/refugee/freebsd/current/src/sys/ia64/ia64/sapic.c Sun Oct 31 04:50:28 2004 +++ repl/ia64/ia64/sapic.c Tue Dec 14 00:49:42 2004 @@ -42,10 +42,10 @@ static MALLOC_DEFINE(M_SAPIC, "sapic", "I/O SAPIC devices"); -static int sysctl_machdep_apic(SYSCTL_HANDLER_ARGS); +static int sysctl_machdep_apic(SYSCTL_HANDLER_ARGS, &Giant); SYSCTL_OID(_machdep, OID_AUTO, apic, CTLTYPE_STRING|CTLFLAG_RD, - NULL, 0, sysctl_machdep_apic, "A", "(x)APIC redirection table entries"); + NULL, 0, sysctl_machdep_apic, "A", "(x)APIC redirection table entries", &Giant); struct sapic *ia64_sapics[16]; /* XXX make this resizable */ int ia64_sapic_count; diff -ur /home/refugee/freebsd/current/src/sys/ia64/ia64/trap.c repl/ia64/ia64/trap.c --- /home/refugee/freebsd/current/src/sys/ia64/ia64/trap.c Wed Dec 8 20:41:03 2004 +++ repl/ia64/ia64/trap.c Tue Dec 14 00:49:42 2004 @@ -78,7 +78,7 @@ static int print_usertrap = 0; SYSCTL_INT(_machdep, OID_AUTO, print_usertrap, - CTLFLAG_RW, &print_usertrap, 0, ""); + CTLFLAG_RW, &print_usertrap, 0, "", &Giant); static void break_syscall(struct trapframe *tf); diff -ur /home/refugee/freebsd/current/src/sys/ia64/ia64/unaligned.c repl/ia64/ia64/unaligned.c --- /home/refugee/freebsd/current/src/sys/ia64/ia64/unaligned.c Sun Oct 31 04:50:28 2004 +++ repl/ia64/ia64/unaligned.c Tue Dec 14 00:49:42 2004 @@ -42,10 +42,10 @@ static int ia64_unaligned_sigbus = 0; /* SIGBUS on all unaligned accesses. */ SYSCTL_INT(_machdep, OID_AUTO, unaligned_print, CTLFLAG_RW, - &ia64_unaligned_print, 0, "warn about unaligned accesses"); + &ia64_unaligned_print, 0, "warn about unaligned accesses", &Giant); SYSCTL_INT(_machdep, OID_AUTO, unaligned_sigbus, CTLFLAG_RW, - &ia64_unaligned_sigbus, 0, "do not SIGBUS on fixed-up accesses"); + &ia64_unaligned_sigbus, 0, "do not SIGBUS on fixed-up accesses", &Giant); static void * fpreg_ptr(mcontext_t *mc, int fr) diff -ur /home/refugee/freebsd/current/src/sys/isa/psm.c repl/isa/psm.c --- /home/refugee/freebsd/current/src/sys/isa/psm.c Sun Oct 31 04:51:37 2004 +++ repl/isa/psm.c Tue Dec 14 00:49:46 2004 @@ -2010,26 +2010,26 @@ } static int psmhz = 20; -SYSCTL_INT(_debug, OID_AUTO, psmhz, CTLFLAG_RW, &psmhz, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, psmhz, CTLFLAG_RW, &psmhz, 0, "", &Giant); static int psm_soft_timeout = 500000; /* 0.5 sec */ SYSCTL_INT(_debug, OID_AUTO, psm_soft_timeout, CTLFLAG_RW, - &psm_soft_timeout, 0, ""); + &psm_soft_timeout, 0, "", &Giant); static int psmerrsecs = 2; -SYSCTL_INT(_debug, OID_AUTO, psmerrsecs, CTLFLAG_RW, &psmerrsecs, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, psmerrsecs, CTLFLAG_RW, &psmerrsecs, 0, "", &Giant); static int psmerrusecs = 0; -SYSCTL_INT(_debug, OID_AUTO, psmerrusecs, CTLFLAG_RW, &psmerrusecs, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, psmerrusecs, CTLFLAG_RW, &psmerrusecs, 0, "", &Giant); static int psmsecs = 0; -SYSCTL_INT(_debug, OID_AUTO, psmsecs, CTLFLAG_RW, &psmsecs, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, psmsecs, CTLFLAG_RW, &psmsecs, 0, "", &Giant); static int psmusecs = 500000; -SYSCTL_INT(_debug, OID_AUTO, psmusecs, CTLFLAG_RW, &psmusecs, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, psmusecs, CTLFLAG_RW, &psmusecs, 0, "", &Giant); static int psmpkterrthresh = 2; SYSCTL_INT(_debug, OID_AUTO, psmpkterrthresh, CTLFLAG_RW, - &psmpkterrthresh, 0, ""); + &psmpkterrthresh, 0, "", &Giant); -SYSCTL_INT(_debug, OID_AUTO, psmloglevel, CTLFLAG_RW, &verbose, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, psmloglevel, CTLFLAG_RW, &verbose, 0, "", &Giant); static void diff -ur /home/refugee/freebsd/current/src/sys/isa/syscons_isa.c repl/isa/syscons_isa.c --- /home/refugee/freebsd/current/src/sys/isa/syscons_isa.c Sun Oct 31 04:51:37 2004 +++ repl/isa/syscons_isa.c Tue Dec 14 00:49:46 2004 @@ -76,7 +76,7 @@ TUNABLE_INT("hw.syscons.sc_no_suspend_vtswitch", (int *)&sc_no_suspend_vtswitch); SYSCTL_DECL(_hw_syscons); SYSCTL_INT(_hw_syscons, OID_AUTO, sc_no_suspend_vtswitch, CTLFLAG_RW, - &sc_no_suspend_vtswitch, 0, "Disable VT switch before suspend."); + &sc_no_suspend_vtswitch, 0, "Disable VT switch before suspend.", &Giant); static void scidentify (driver_t *driver, device_t parent) diff -ur /home/refugee/freebsd/current/src/sys/kern/imgact_elf.c repl/kern/imgact_elf.c --- /home/refugee/freebsd/current/src/sys/kern/imgact_elf.c Sun Oct 31 04:50:26 2004 +++ repl/kern/imgact_elf.c Tue Dec 14 00:49:41 2004 @@ -89,16 +89,16 @@ #endif SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, fallback_brand, CTLFLAG_RW, &__elfN(fallback_brand), 0, - __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) " brand of last resort"); + __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) " brand of last resort", &Giant); TUNABLE_INT("kern.elf" __XSTRING(__ELF_WORD_SIZE) ".fallback_brand", &__elfN(fallback_brand)); static int elf_trace = 0; -SYSCTL_INT(_debug, OID_AUTO, __elfN(trace), CTLFLAG_RW, &elf_trace, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, __elfN(trace), CTLFLAG_RW, &elf_trace, 0, "", &Giant); static int elf_legacy_coredump = 0; SYSCTL_INT(_debug, OID_AUTO, __elfN(legacy_coredump), CTLFLAG_RW, - &elf_legacy_coredump, 0, ""); + &elf_legacy_coredump, 0, "", &Giant); static Elf_Brandinfo *elf_brand_list[MAX_BRANDS]; diff -ur /home/refugee/freebsd/current/src/sys/kern/init_main.c repl/kern/init_main.c --- /home/refugee/freebsd/current/src/sys/kern/init_main.c Wed Dec 8 20:41:04 2004 +++ repl/kern/init_main.c Tue Dec 14 00:49:41 2004 @@ -94,9 +94,9 @@ struct proc *initproc; int boothowto = 0; /* initialized so that it can be patched */ -SYSCTL_INT(_debug, OID_AUTO, boothowto, CTLFLAG_RD, &boothowto, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, boothowto, CTLFLAG_RD, &boothowto, 0, "", &Giant); int bootverbose; -SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0, "", &Giant); /* * This ensures that there is at least one entry so that the sysinit_set @@ -496,7 +496,7 @@ "/sbin/init:/sbin/oinit:/sbin/init.bak:/stand/sysinstall"; #endif SYSCTL_STRING(_kern, OID_AUTO, init_path, CTLFLAG_RD, init_path, 0, - "Path used to search the init process"); + "Path used to search the init process", &Giant); /* * Start the initial user process; try exec'ing each pathname in init_path. diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_acct.c repl/kern/kern_acct.c --- /home/refugee/freebsd/current/src/sys/kern/kern_acct.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_acct.c Tue Dec 14 00:49:40 2004 @@ -105,15 +105,15 @@ */ static int acctsuspend = 2; /* stop accounting when < 2% free space left */ SYSCTL_INT(_kern, OID_AUTO, acct_suspend, CTLFLAG_RW, - &acctsuspend, 0, "percentage of free disk space below which accounting stops"); + &acctsuspend, 0, "percentage of free disk space below which accounting stops", &Giant); static int acctresume = 4; /* resume when free space risen to > 4% */ SYSCTL_INT(_kern, OID_AUTO, acct_resume, CTLFLAG_RW, - &acctresume, 0, "percentage of free disk space above which accounting resumes"); + &acctresume, 0, "percentage of free disk space above which accounting resumes", &Giant); static int acctchkfreq = 15; /* frequency (in seconds) to check space */ SYSCTL_INT(_kern, OID_AUTO, acct_chkfreq, CTLFLAG_RW, - &acctchkfreq, 0, "frequency for checking the free space"); + &acctchkfreq, 0, "frequency for checking the free space", &Giant); /* * Accounting system call. Written based on the specification and diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_clock.c repl/kern/kern_clock.c --- /home/refugee/freebsd/current/src/sys/kern/kern_clock.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_clock.c Tue Dec 14 00:49:41 2004 @@ -80,7 +80,7 @@ long cp_time[CPUSTATES]; SYSCTL_OPAQUE(_kern, OID_AUTO, cp_time, CTLFLAG_RD, &cp_time, sizeof(cp_time), - "LU", "CPU time statistics"); + "LU", "CPU time statistics", &Giant); #ifdef SW_WATCHDOG #include @@ -488,12 +488,12 @@ clkinfo.tick = tick; clkinfo.profhz = profhz; clkinfo.stathz = stathz ? stathz : hz; - return (sysctl_handle_opaque(oidp, &clkinfo, sizeof clkinfo, req)); + return (sysctl_handle_opaque(oidp, &clkinfo, sizeof clkinfo, req), &Giant); } SYSCTL_PROC(_kern, KERN_CLOCKRATE, clockrate, CTLTYPE_STRUCT|CTLFLAG_RD, 0, 0, sysctl_kern_clockrate, "S,clockinfo", - "Rate and period of various kernel clocks"); + "Rate and period of various kernel clocks", &Giant); #ifdef SW_WATCHDOG diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_conf.c repl/kern/kern_conf.c --- /home/refugee/freebsd/current/src/sys/kern/kern_conf.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_conf.c Tue Dec 14 00:49:40 2004 @@ -798,4 +798,4 @@ } SYSCTL_PROC(_kern, OID_AUTO, devname, CTLTYPE_OPAQUE|CTLFLAG_RW|CTLFLAG_ANYBODY, - NULL, 0, sysctl_devname, "", "devname(3) handler"); + NULL, 0, sysctl_devname, "", "devname(3) handler", &Giant); diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_descrip.c repl/kern/kern_descrip.c --- /home/refugee/freebsd/current/src/sys/kern/kern_descrip.c Wed Dec 8 20:41:04 2004 +++ repl/kern/kern_descrip.c Tue Dec 14 00:49:41 2004 @@ -2283,7 +2283,7 @@ * it is of a similar order of magnitude to the leakage from * global system statistics such as kern.openfiles. */ - error = sysctl_wire_old_buffer(req, 0); + error = sysctl_wire_old_buffer(req, 0, &Giant); if (error != 0) return (error); if (req->oldptr == NULL) { @@ -2348,16 +2348,16 @@ } SYSCTL_PROC(_kern, KERN_FILE, file, CTLTYPE_OPAQUE|CTLFLAG_RD, - 0, 0, sysctl_kern_file, "S,xfile", "Entire file table"); + 0, 0, sysctl_kern_file, "S,xfile", "Entire file table", &Giant); SYSCTL_INT(_kern, KERN_MAXFILESPERPROC, maxfilesperproc, CTLFLAG_RW, - &maxfilesperproc, 0, "Maximum files allowed open per process"); + &maxfilesperproc, 0, "Maximum files allowed open per process", &Giant); SYSCTL_INT(_kern, KERN_MAXFILES, maxfiles, CTLFLAG_RW, - &maxfiles, 0, "Maximum number of files"); + &maxfiles, 0, "Maximum number of files", &Giant); SYSCTL_INT(_kern, OID_AUTO, openfiles, CTLFLAG_RD, - &openfiles, 0, "System-wide number of open files"); + &openfiles, 0, "System-wide number of open files", &Giant); /* ARGSUSED*/ static void diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_event.c repl/kern/kern_event.c --- /home/refugee/freebsd/current/src/sys/kern/kern_event.c Sun Nov 21 00:03:32 2004 +++ repl/kern/kern_event.c Tue Dec 14 00:49:41 2004 @@ -142,7 +142,7 @@ static int kq_ncallouts = 0; static int kq_calloutmax = (4 * 1024); SYSCTL_INT(_kern, OID_AUTO, kq_calloutmax, CTLFLAG_RW, - &kq_calloutmax, 0, "Maximum number of callouts allocated for kqueue"); + &kq_calloutmax, 0, "Maximum number of callouts allocated for kqueue", &Giant); /* XXX - ensure not KN_INFLUX?? */ #define KNOTE_ACTIVATE(kn, islock) do { \ diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_exec.c repl/kern/kern_exec.c --- /home/refugee/freebsd/current/src/sys/kern/kern_exec.c Wed Dec 8 20:41:04 2004 +++ repl/kern/kern_exec.c Tue Dec 14 00:49:41 2004 @@ -76,26 +76,26 @@ MALLOC_DEFINE(M_PARGS, "proc-args", "Process arguments"); -static int sysctl_kern_ps_strings(SYSCTL_HANDLER_ARGS); -static int sysctl_kern_usrstack(SYSCTL_HANDLER_ARGS); -static int sysctl_kern_stackprot(SYSCTL_HANDLER_ARGS); +static int sysctl_kern_ps_strings(SYSCTL_HANDLER_ARGS, &Giant); +static int sysctl_kern_usrstack(SYSCTL_HANDLER_ARGS, &Giant); +static int sysctl_kern_stackprot(SYSCTL_HANDLER_ARGS, &Giant); static int do_execve(struct thread *td, char *fname, char **argv, char **envv, struct mac *mac_p); /* XXX This should be vm_size_t. */ SYSCTL_PROC(_kern, KERN_PS_STRINGS, ps_strings, CTLTYPE_ULONG|CTLFLAG_RD, - NULL, 0, sysctl_kern_ps_strings, "LU", ""); + NULL, 0, sysctl_kern_ps_strings, "LU", "", &Giant); /* XXX This should be vm_size_t. */ SYSCTL_PROC(_kern, KERN_USRSTACK, usrstack, CTLTYPE_ULONG|CTLFLAG_RD, - NULL, 0, sysctl_kern_usrstack, "LU", ""); + NULL, 0, sysctl_kern_usrstack, "LU", "", &Giant); SYSCTL_PROC(_kern, OID_AUTO, stackprot, CTLTYPE_INT|CTLFLAG_RD, - NULL, 0, sysctl_kern_stackprot, "I", ""); + NULL, 0, sysctl_kern_stackprot, "I", "", &Giant); u_long ps_arg_cache_limit = PAGE_SIZE / 16; SYSCTL_ULONG(_kern, OID_AUTO, ps_arg_cache_limit, CTLFLAG_RW, - &ps_arg_cache_limit, 0, ""); + &ps_arg_cache_limit, 0, "", &Giant); static int sysctl_kern_ps_strings(SYSCTL_HANDLER_ARGS) diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_fork.c repl/kern/kern_fork.c --- /home/refugee/freebsd/current/src/sys/kern/kern_fork.c Wed Dec 8 20:41:04 2004 +++ repl/kern/kern_fork.c Tue Dec 14 00:49:41 2004 @@ -148,7 +148,7 @@ int nprocs = 1; /* process 0 */ int lastpid = 0; SYSCTL_INT(_kern, OID_AUTO, lastpid, CTLFLAG_RD, &lastpid, 0, - "Last used PID"); + "Last used PID", &Giant); /* * Random component to lastpid generation. We mix in a random factor to make @@ -165,12 +165,12 @@ { int error, pid; - error = sysctl_wire_old_buffer(req, sizeof(int)); + error = sysctl_wire_old_buffer(req, sizeof(int), &Giant); if (error != 0) return(error); sx_xlock(&allproc_lock); pid = randompid; - error = sysctl_handle_int(oidp, &pid, 0, req); + error = sysctl_handle_int(oidp, &pid, 0, req, &Giant); if (error == 0 && req->newptr != NULL) { if (pid < 0 || pid > PID_MAX - 100) /* out of range */ pid = PID_MAX - 100; @@ -185,7 +185,7 @@ } SYSCTL_PROC(_kern, OID_AUTO, randompid, CTLTYPE_INT|CTLFLAG_RW, - 0, 0, sysctl_kern_randompid, "I", "Random PID modulus"); + 0, 0, sysctl_kern_randompid, "I", "Random PID modulus", &Giant); int fork1(td, flags, pages, procp) diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_intr.c repl/kern/kern_intr.c --- /home/refugee/freebsd/current/src/sys/kern/kern_intr.c Sun Nov 21 00:03:32 2004 +++ repl/kern/kern_intr.c Tue Dec 14 00:49:41 2004 @@ -73,7 +73,7 @@ TUNABLE_INT("hw.intr_storm_threshold", &intr_storm_threshold); SYSCTL_INT(_hw, OID_AUTO, intr_storm_threshold, CTLFLAG_RW, &intr_storm_threshold, 0, - "Number of consecutive interrupts before storm protection is enabled"); + "Number of consecutive interrupts before storm protection is enabled", &Giant); static void ithread_loop(void *); static void ithread_update(struct ithd *); @@ -770,21 +770,21 @@ sysctl_intrnames(SYSCTL_HANDLER_ARGS) { return (sysctl_handle_opaque(oidp, intrnames, eintrnames - intrnames, - req)); + req), &Giant); } SYSCTL_PROC(_hw, OID_AUTO, intrnames, CTLTYPE_OPAQUE | CTLFLAG_RD, - NULL, 0, sysctl_intrnames, "", "Interrupt Names"); + NULL, 0, sysctl_intrnames, "", "Interrupt Names", &Giant); static int sysctl_intrcnt(SYSCTL_HANDLER_ARGS) { return (sysctl_handle_opaque(oidp, intrcnt, - (char *)eintrcnt - (char *)intrcnt, req)); + (char *)eintrcnt - (char *)intrcnt, req), &Giant); } SYSCTL_PROC(_hw, OID_AUTO, intrcnt, CTLTYPE_OPAQUE | CTLFLAG_RD, - NULL, 0, sysctl_intrcnt, "", "Interrupt Counts"); + NULL, 0, sysctl_intrcnt, "", "Interrupt Counts", &Giant); #ifdef DDB /* diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_jail.c repl/kern/kern_jail.c --- /home/refugee/freebsd/current/src/sys/kern/kern_jail.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_jail.c Tue Dec 14 00:49:40 2004 @@ -45,27 +45,27 @@ int jail_set_hostname_allowed = 1; SYSCTL_INT(_security_jail, OID_AUTO, set_hostname_allowed, CTLFLAG_RW, &jail_set_hostname_allowed, 0, - "Processes in jail can set their hostnames"); + "Processes in jail can set their hostnames", &Giant); int jail_socket_unixiproute_only = 1; SYSCTL_INT(_security_jail, OID_AUTO, socket_unixiproute_only, CTLFLAG_RW, &jail_socket_unixiproute_only, 0, - "Processes in jail are limited to creating UNIX/IPv4/route sockets only"); + "Processes in jail are limited to creating UNIX/IPv4/route sockets only", &Giant); int jail_sysvipc_allowed = 0; SYSCTL_INT(_security_jail, OID_AUTO, sysvipc_allowed, CTLFLAG_RW, &jail_sysvipc_allowed, 0, - "Processes in jail can use System V IPC primitives"); + "Processes in jail can use System V IPC primitives", &Giant); int jail_getfsstatroot_only = 1; SYSCTL_INT(_security_jail, OID_AUTO, getfsstatroot_only, CTLFLAG_RW, &jail_getfsstatroot_only, 0, - "Processes see only their root file system in getfsstat()"); + "Processes see only their root file system in getfsstat()", &Giant); int jail_allow_raw_sockets = 0; SYSCTL_INT(_security_jail, OID_AUTO, allow_raw_sockets, CTLFLAG_RW, &jail_allow_raw_sockets, 0, - "Prison root can create raw sockets"); + "Prison root can create raw sockets", &Giant); /* allprison, lastprid, and prisoncount are protected by allprison_mtx. */ struct prisonlist allprison; @@ -76,7 +76,7 @@ static void init_prison(void *); static void prison_complete(void *context, int pending); static struct prison *prison_find(int); -static int sysctl_jail_list(SYSCTL_HANDLER_ARGS); +static int sysctl_jail_list(SYSCTL_HANDLER_ARGS, &Giant); static void init_prison(void *data __unused) @@ -451,18 +451,18 @@ { struct xprison *xp, *sxp; struct prison *pr; - int count, error; + int count, error = 0; - mtx_assert(&Giant, MA_OWNED); + mtx_lock(&Giant); if (jailed(req->td->td_ucred)) - return (0); + goto done; retry: mtx_lock(&allprison_mtx); count = prisoncount; mtx_unlock(&allprison_mtx); if (count == 0) - return (0); + goto done; sxp = xp = malloc(sizeof(*xp) * count, M_TEMP, M_WAITOK | M_ZERO); mtx_lock(&allprison_mtx); @@ -483,16 +483,18 @@ xp++; } mtx_unlock(&allprison_mtx); - + error = SYSCTL_OUT(req, sxp, sizeof(*sxp) * count); free(sxp, M_TEMP); +done: + mtx_unlock(&Giant); if (error) return (error); return (0); } SYSCTL_OID(_security_jail, OID_AUTO, list, CTLTYPE_STRUCT | CTLFLAG_RD, - NULL, 0, sysctl_jail_list, "S", "List of active jails"); + NULL, 0, sysctl_jail_list, "S", "List of active jails", &Giant); static int sysctl_jail_jailed(SYSCTL_HANDLER_ARGS) @@ -505,4 +507,4 @@ return (error); } SYSCTL_PROC(_security_jail, OID_AUTO, jailed, CTLTYPE_INT | CTLFLAG_RD, - NULL, 0, sysctl_jail_jailed, "I", "Process in jail?"); + NULL, 0, sysctl_jail_jailed, "I", "Process in jail?", &Giant); diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_ktr.c repl/kern/kern_ktr.c --- /home/refugee/freebsd/current/src/sys/kern/kern_ktr.c Sun Nov 14 03:56:24 2004 +++ repl/kern/kern_ktr.c Tue Dec 14 00:49:40 2004 @@ -78,24 +78,24 @@ #define KTR_CPU PCPU_GET(cpuid) #endif -SYSCTL_NODE(_debug, OID_AUTO, ktr, CTLFLAG_RD, 0, "KTR options"); +SYSCTL_NODE(_debug, OID_AUTO, ktr, CTLFLAG_RD, 0, "KTR options", NULL); int ktr_cpumask = KTR_CPUMASK; TUNABLE_INT("debug.ktr.cpumask", &ktr_cpumask); -SYSCTL_INT(_debug_ktr, OID_AUTO, cpumask, CTLFLAG_RW, &ktr_cpumask, 0, ""); +SYSCTL_INT(_debug_ktr, OID_AUTO, cpumask, CTLFLAG_RW, &ktr_cpumask, 0, "", &Giant); int ktr_mask = KTR_MASK; TUNABLE_INT("debug.ktr.mask", &ktr_mask); -SYSCTL_INT(_debug_ktr, OID_AUTO, mask, CTLFLAG_RW, &ktr_mask, 0, ""); +SYSCTL_INT(_debug_ktr, OID_AUTO, mask, CTLFLAG_RW, &ktr_mask, 0, "", &Giant); int ktr_compile = KTR_COMPILE; -SYSCTL_INT(_debug_ktr, OID_AUTO, compile, CTLFLAG_RD, &ktr_compile, 0, ""); +SYSCTL_INT(_debug_ktr, OID_AUTO, compile, CTLFLAG_RD, &ktr_compile, 0, "", &Giant); int ktr_entries = KTR_ENTRIES; -SYSCTL_INT(_debug_ktr, OID_AUTO, entries, CTLFLAG_RD, &ktr_entries, 0, ""); +SYSCTL_INT(_debug_ktr, OID_AUTO, entries, CTLFLAG_RD, &ktr_entries, 0, "", &Giant); int ktr_version = KTR_VERSION; -SYSCTL_INT(_debug_ktr, OID_AUTO, version, CTLFLAG_RD, &ktr_version, 0, ""); +SYSCTL_INT(_debug_ktr, OID_AUTO, version, CTLFLAG_RD, &ktr_version, 0, "", &Giant); volatile int ktr_idx = 0; struct ktr_entry ktr_buf[KTR_ENTRIES]; @@ -103,7 +103,7 @@ #ifdef KTR_VERBOSE int ktr_verbose = KTR_VERBOSE; TUNABLE_INT("debug.ktr.verbose", &ktr_verbose); -SYSCTL_INT(_debug_ktr, OID_AUTO, verbose, CTLFLAG_RW, &ktr_verbose, 0, ""); +SYSCTL_INT(_debug_ktr, OID_AUTO, verbose, CTLFLAG_RW, &ktr_verbose, 0, "", &Giant); #endif #ifdef KTR_ALQ @@ -116,15 +116,15 @@ int ktr_alq_max = 0; SYSCTL_INT(_debug_ktr, OID_AUTO, alq_max, CTLFLAG_RW, &ktr_alq_max, 0, - "Maximum number of entries to write"); + "Maximum number of entries to write", &Giant); SYSCTL_INT(_debug_ktr, OID_AUTO, alq_cnt, CTLFLAG_RD, &ktr_alq_cnt, 0, - "Current number of written entries"); + "Current number of written entries", &Giant); SYSCTL_INT(_debug_ktr, OID_AUTO, alq_failed, CTLFLAG_RD, &ktr_alq_failed, 0, - "Number of times we overran the buffer"); + "Number of times we overran the buffer", &Giant); SYSCTL_INT(_debug_ktr, OID_AUTO, alq_depth, CTLFLAG_RW, &ktr_alq_depth, 0, - "Number of items in the write buffer"); + "Number of items in the write buffer", &Giant); SYSCTL_STRING(_debug_ktr, OID_AUTO, alq_file, CTLFLAG_RW, ktr_alq_file, - sizeof(ktr_alq_file), "KTR logging file"); + sizeof(ktr_alq_file), "KTR logging file", &Giant); static int sysctl_debug_ktr_alq_enable(SYSCTL_HANDLER_ARGS) @@ -134,7 +134,7 @@ enable = ktr_alq_enabled; - error = sysctl_handle_int(oidp, &enable, 0, req); + error = sysctl_handle_int(oidp, &enable, 0, req, &Giant); if (error || !req->newptr) return (error); @@ -165,7 +165,7 @@ } SYSCTL_PROC(_debug_ktr, OID_AUTO, alq_enable, CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_debug_ktr_alq_enable, - "I", "Enable KTR logging"); + "I", "Enable KTR logging", &Giant); #endif void diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_ktrace.c repl/kern/kern_ktrace.c --- /home/refugee/freebsd/current/src/sys/kern/kern_ktrace.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_ktrace.c Tue Dec 14 00:49:41 2004 @@ -90,7 +90,7 @@ static STAILQ_HEAD(, ktr_request) ktr_todo; static STAILQ_HEAD(, ktr_request) ktr_free; -SYSCTL_NODE(_kern, OID_AUTO, ktrace, CTLFLAG_RD, 0, "KTRACE options"); +SYSCTL_NODE(_kern, OID_AUTO, ktrace, CTLFLAG_RD, 0, "KTRACE options", NULL); static u_int ktr_requestpool = KTRACE_REQUEST_POOL; TUNABLE_INT("kern.ktrace.request_pool", &ktr_requestpool); @@ -98,14 +98,14 @@ static u_int ktr_geniosize = PAGE_SIZE; TUNABLE_INT("kern.ktrace.genio_size", &ktr_geniosize); SYSCTL_UINT(_kern_ktrace, OID_AUTO, genio_size, CTLFLAG_RW, &ktr_geniosize, - 0, "Maximum size of genio event payload"); + 0, "Maximum size of genio event payload", &Giant); static int print_message = 1; struct mtx ktrace_mtx; static struct cv ktrace_cv; static void ktrace_init(void *dummy); -static int sysctl_kern_ktrace_request_pool(SYSCTL_HANDLER_ARGS); +static int sysctl_kern_ktrace_request_pool(SYSCTL_HANDLER_ARGS, &Giant); static u_int ktrace_resize_pool(u_int newsize); static struct ktr_request *ktr_getrequest(int type); static void ktr_submitrequest(struct ktr_request *req); @@ -167,7 +167,7 @@ return (0); } SYSCTL_PROC(_kern_ktrace, OID_AUTO, request_pool, CTLTYPE_UINT|CTLFLAG_RW, - &ktr_requestpool, 0, sysctl_kern_ktrace_request_pool, "IU", ""); + &ktr_requestpool, 0, sysctl_kern_ktrace_request_pool, "IU", "", &Giant); static u_int ktrace_resize_pool(u_int newsize) diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_linker.c repl/kern/kern_linker.c --- /home/refugee/freebsd/current/src/sys/kern/kern_linker.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_linker.c Tue Dec 14 00:49:41 2004 @@ -251,7 +251,7 @@ return; for (oidp = start; oidp < stop; oidp++) - sysctl_register_oid(*oidp); + sysctl_register_oid(*oidp, &Giant); } static void @@ -266,7 +266,7 @@ return; for (oidp = start; oidp < stop; oidp++) - sysctl_unregister_oid(*oidp); + sysctl_unregister_oid(*oidp, &Giant); } static int @@ -1377,7 +1377,7 @@ static char linker_path[MAXPATHLEN] = "/boot/kernel;/boot/modules"; SYSCTL_STRING(_kern, OID_AUTO, module_path, CTLFLAG_RW, linker_path, - sizeof(linker_path), "module load search path"); + sizeof(linker_path), "module load search path", &Giant); TUNABLE_STR("module_path", linker_path, sizeof(linker_path)); @@ -1826,7 +1826,7 @@ if (error) return (error); #endif - error = sysctl_wire_old_buffer(req, 0); + error = sysctl_wire_old_buffer(req, 0, &Giant); if (error != 0) return (error); mtx_lock(&kld_mtx); @@ -1843,4 +1843,4 @@ } SYSCTL_PROC(_kern, OID_AUTO, function_list, CTLFLAG_RD, - NULL, 0, sysctl_kern_function_list, "", "kernel function list"); + NULL, 0, sysctl_kern_function_list, "", "kernel function list", &Giant); diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_lockf.c repl/kern/kern_lockf.c --- /home/refugee/freebsd/current/src/sys/kern/kern_lockf.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_lockf.c Tue Dec 14 00:49:41 2004 @@ -65,7 +65,7 @@ static int lockf_debug = 0; -SYSCTL_INT(_debug, OID_AUTO, lockf_debug, CTLFLAG_RW, &lockf_debug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, lockf_debug, CTLFLAG_RW, &lockf_debug, 0, "", &Giant); #endif MALLOC_DEFINE(M_LOCKF, "lockf", "Byte-range locking structures"); diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_mac.c repl/kern/kern_mac.c --- /home/refugee/freebsd/current/src/sys/kern/kern_mac.c Sun Nov 14 03:56:24 2004 +++ repl/kern/kern_mac.c Tue Dec 14 00:49:40 2004 @@ -108,7 +108,7 @@ static unsigned int mac_max_slots = MAC_MAX_SLOTS; static unsigned int mac_slot_offsets_free = (1 << MAC_MAX_SLOTS) - 1; SYSCTL_UINT(_security_mac, OID_AUTO, max_slots, CTLFLAG_RD, - &mac_max_slots, 0, ""); + &mac_max_slots, 0, "", &Giant); /* * Has the kernel started generating labeled objects yet? All read/write @@ -140,7 +140,7 @@ static unsigned int nmactemp; SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, temp, CTLFLAG_RD, - &nmactemp, 0, "number of temporary labels in use"); + &nmactemp, 0, "number of temporary labels in use", &Giant); #endif static int mac_policy_register(struct mac_policy_conf *mpc); diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_malloc.c repl/kern/kern_malloc.c --- /home/refugee/freebsd/current/src/sys/kern/kern_malloc.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_malloc.c Tue Dec 14 00:49:41 2004 @@ -131,15 +131,15 @@ u_int vm_kmem_size; SYSCTL_UINT(_vm, OID_AUTO, kmem_size, CTLFLAG_RD, &vm_kmem_size, 0, - "Size of kernel memory"); + "Size of kernel memory", &Giant); u_int vm_kmem_size_max; SYSCTL_UINT(_vm, OID_AUTO, kmem_size_max, CTLFLAG_RD, &vm_kmem_size_max, 0, - "Maximum size of kernel memory"); + "Maximum size of kernel memory", &Giant); u_int vm_kmem_size_scale; SYSCTL_UINT(_vm, OID_AUTO, kmem_size_scale, CTLFLAG_RD, &vm_kmem_size_scale, 0, - "Scale factor for kernel memory size"); + "Scale factor for kernel memory size", &Giant); /* * The malloc_mtx protects the kmemstatistics linked list. @@ -150,10 +150,10 @@ #ifdef MALLOC_PROFILE uint64_t krequests[KMEM_ZSIZE + 1]; -static int sysctl_kern_mprof(SYSCTL_HANDLER_ARGS); +static int sysctl_kern_mprof(SYSCTL_HANDLER_ARGS, &Giant); #endif -static int sysctl_kern_malloc(SYSCTL_HANDLER_ARGS); +static int sysctl_kern_malloc(SYSCTL_HANDLER_ARGS, &Giant); /* time_uptime of last malloc(9) failure */ static time_t t_malloc_fail; @@ -170,10 +170,10 @@ static int malloc_nowait_count; static int malloc_failure_count; SYSCTL_INT(_debug_malloc, OID_AUTO, failure_rate, CTLFLAG_RW, - &malloc_failure_rate, 0, "Every (n) mallocs with M_NOWAIT will fail"); + &malloc_failure_rate, 0, "Every (n) mallocs with M_NOWAIT will fail", &Giant); TUNABLE_INT("debug.malloc.failure_rate", &malloc_failure_rate); SYSCTL_INT(_debug_malloc, OID_AUTO, failure_count, CTLFLAG_RD, - &malloc_failure_count, 0, "Number of imposed M_NOWAIT malloc failures"); + &malloc_failure_count, 0, "Number of imposed M_NOWAIT malloc failures", &Giant); #endif int @@ -651,7 +651,7 @@ } SYSCTL_OID(_kern, OID_AUTO, malloc, CTLTYPE_STRING|CTLFLAG_RD, - NULL, 0, sysctl_kern_malloc, "A", "Malloc Stats"); + NULL, 0, sysctl_kern_malloc, "A", "Malloc Stats", &Giant); #ifdef MALLOC_PROFILE @@ -710,5 +710,5 @@ } SYSCTL_OID(_kern, OID_AUTO, mprof, CTLTYPE_STRING|CTLFLAG_RD, - NULL, 0, sysctl_kern_mprof, "A", "Malloc Profiling"); + NULL, 0, sysctl_kern_mprof, "A", "Malloc Profiling", &Giant); #endif /* MALLOC_PROFILE */ diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_mbuf.c repl/kern/kern_mbuf.c --- /home/refugee/freebsd/current/src/sys/kern/kern_mbuf.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_mbuf.c Tue Dec 14 00:49:41 2004 @@ -97,9 +97,9 @@ SYSCTL_DECL(_kern_ipc); SYSCTL_INT(_kern_ipc, OID_AUTO, nmbclusters, CTLFLAG_RW, &nmbclusters, 0, - "Maximum number of mbuf clusters allowed"); + "Maximum number of mbuf clusters allowed", &Giant); SYSCTL_STRUCT(_kern_ipc, OID_AUTO, mbstat, CTLFLAG_RD, &mbstat, mbstat, - "Mbuf general information and statistics"); + "Mbuf general information and statistics", &Giant); /* * Zones from which we allocate. diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_mib.c repl/kern/kern_mib.c --- /home/refugee/freebsd/current/src/sys/kern/kern_mib.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_mib.c Tue Dec 14 00:49:42 2004 @@ -84,19 +84,19 @@ #endif SYSCTL_STRING(_kern, OID_AUTO, ident, CTLFLAG_RD, - kern_ident, 0, "Kernel identifier"); + kern_ident, 0, "Kernel identifier", &Giant); SYSCTL_STRING(_kern, KERN_OSRELEASE, osrelease, CTLFLAG_RD, - osrelease, 0, "Operating system release"); + osrelease, 0, "Operating system release", &Giant); SYSCTL_INT(_kern, KERN_OSREV, osrevision, CTLFLAG_RD, - 0, BSD, "Operating system revision"); + 0, BSD, "Operating system revision", &Giant); SYSCTL_STRING(_kern, KERN_VERSION, version, CTLFLAG_RD, - version, 0, "Kernel version"); + version, 0, "Kernel version", &Giant); SYSCTL_STRING(_kern, KERN_OSTYPE, ostype, CTLFLAG_RD, - ostype, 0, "Operating system type"); + ostype, 0, "Operating system type", &Giant); /* * NOTICE: The *userland* release date is available in @@ -104,55 +104,55 @@ */ extern int osreldate; SYSCTL_INT(_kern, KERN_OSRELDATE, osreldate, CTLFLAG_RD, - &osreldate, 0, "Kernel release date"); + &osreldate, 0, "Kernel release date", &Giant); SYSCTL_INT(_kern, KERN_MAXPROC, maxproc, CTLFLAG_RDTUN, - &maxproc, 0, "Maximum number of processes"); + &maxproc, 0, "Maximum number of processes", &Giant); SYSCTL_INT(_kern, KERN_MAXPROCPERUID, maxprocperuid, CTLFLAG_RW, - &maxprocperuid, 0, "Maximum processes allowed per userid"); + &maxprocperuid, 0, "Maximum processes allowed per userid", &Giant); SYSCTL_INT(_kern, OID_AUTO, maxusers, CTLFLAG_RDTUN, - &maxusers, 0, "Hint for kernel tuning"); + &maxusers, 0, "Hint for kernel tuning", &Giant); SYSCTL_INT(_kern, KERN_ARGMAX, argmax, CTLFLAG_RD, - 0, ARG_MAX, "Maximum bytes of argument to execve(2)"); + 0, ARG_MAX, "Maximum bytes of argument to execve(2)", &Giant); SYSCTL_INT(_kern, KERN_POSIX1, posix1version, CTLFLAG_RD, - 0, _POSIX_VERSION, "Version of POSIX attempting to comply to"); + 0, _POSIX_VERSION, "Version of POSIX attempting to comply to", &Giant); SYSCTL_INT(_kern, KERN_NGROUPS, ngroups, CTLFLAG_RD, - 0, NGROUPS_MAX, "Maximum number of groups a user can belong to"); + 0, NGROUPS_MAX, "Maximum number of groups a user can belong to", &Giant); SYSCTL_INT(_kern, KERN_JOB_CONTROL, job_control, CTLFLAG_RD, - 0, 1, "Whether job control is available"); + 0, 1, "Whether job control is available", &Giant); #ifdef _POSIX_SAVED_IDS SYSCTL_INT(_kern, KERN_SAVED_IDS, saved_ids, CTLFLAG_RD, - 0, 1, "Whether saved set-group/user ID is available"); + 0, 1, "Whether saved set-group/user ID is available", &Giant); #else SYSCTL_INT(_kern, KERN_SAVED_IDS, saved_ids, CTLFLAG_RD, - 0, 0, "Whether saved set-group/user ID is available"); + 0, 0, "Whether saved set-group/user ID is available", &Giant); #endif char kernelname[MAXPATHLEN] = "/kernel"; /* XXX bloat */ SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW, - kernelname, sizeof kernelname, "Name of kernel file booted"); + kernelname, sizeof kernelname, "Name of kernel file booted", &Giant); #ifdef SMP SYSCTL_INT(_hw, HW_NCPU, ncpu, CTLFLAG_RD, - &mp_ncpus, 0, "Number of active CPUs"); + &mp_ncpus, 0, "Number of active CPUs", &Giant); #else SYSCTL_INT(_hw, HW_NCPU, ncpu, CTLFLAG_RD, - 0, 1, "Number of active CPUs"); + 0, 1, "Number of active CPUs", &Giant); #endif SYSCTL_INT(_hw, HW_BYTEORDER, byteorder, CTLFLAG_RD, - 0, BYTE_ORDER, "System byte order"); + 0, BYTE_ORDER, "System byte order", &Giant); SYSCTL_INT(_hw, HW_PAGESIZE, pagesize, CTLFLAG_RD, - 0, PAGE_SIZE, "System memory page size"); + 0, PAGE_SIZE, "System memory page size", &Giant); static int sysctl_hw_physmem(SYSCTL_HANDLER_ARGS) @@ -160,11 +160,11 @@ u_long val; val = ctob(physmem); - return (sysctl_handle_long(oidp, &val, 0, req)); + return (sysctl_handle_long(oidp, &val, 0, req), &Giant); } SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG | CTLFLAG_RD, - 0, 0, sysctl_hw_physmem, "LU", ""); + 0, 0, sysctl_hw_physmem, "LU", "", &Giant); static int sysctl_hw_usermem(SYSCTL_HANDLER_ARGS) @@ -172,17 +172,17 @@ u_long val; val = ctob(physmem - cnt.v_wire_count); - return (sysctl_handle_long(oidp, &val, 0, req)); + return (sysctl_handle_long(oidp, &val, 0, req), &Giant); } SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG | CTLFLAG_RD, - 0, 0, sysctl_hw_usermem, "LU", ""); + 0, 0, sysctl_hw_usermem, "LU", "", &Giant); -SYSCTL_ULONG(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, ""); +SYSCTL_ULONG(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, "", &Giant); static char machine_arch[] = MACHINE_ARCH; SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD, - machine_arch, 0, "System architecture"); + machine_arch, 0, "System architecture", &Giant); char hostname[MAXHOSTNAMELEN]; @@ -207,7 +207,7 @@ mtx_unlock(&pr->pr_mtx); error = sysctl_handle_string(oidp, tmphostname, - sizeof pr->pr_host, req); + sizeof pr->pr_host, req, &Giant); if (req->newptr != NULL && error == 0) { /* @@ -220,19 +220,19 @@ } } else error = sysctl_handle_string(oidp, - hostname, sizeof hostname, req); + hostname, sizeof hostname, req, &Giant); return (error); } SYSCTL_PROC(_kern, KERN_HOSTNAME, hostname, CTLTYPE_STRING|CTLFLAG_RW|CTLFLAG_PRISON, - 0, 0, sysctl_hostname, "A", "Hostname"); + 0, 0, sysctl_hostname, "A", "Hostname", &Giant); static int regression_securelevel_nonmonotonic = 0; #ifdef REGRESSION SYSCTL_INT(_regression, OID_AUTO, securelevel_nonmonotonic, CTLFLAG_RW, - ®ression_securelevel_nonmonotonic, 0, "securelevel may be lowered"); + ®ression_securelevel_nonmonotonic, 0, "securelevel may be lowered", &Giant); #endif int securelevel = -1; @@ -259,7 +259,7 @@ mtx_unlock(&pr->pr_mtx); } else level = securelevel; - error = sysctl_handle_int(oidp, &level, 0, req); + error = sysctl_handle_int(oidp, &level, 0, req, &Giant); if (error || !req->newptr) return (error); /* @@ -290,14 +290,14 @@ SYSCTL_PROC(_kern, KERN_SECURELVL, securelevel, CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_PRISON, 0, 0, sysctl_kern_securelvl, - "I", "Current secure level"); + "I", "Current secure level", &Giant); char domainname[MAXHOSTNAMELEN]; SYSCTL_STRING(_kern, KERN_NISDOMAINNAME, domainname, CTLFLAG_RW, - &domainname, sizeof(domainname), "Name of the current YP/NIS domain"); + &domainname, sizeof(domainname), "Name of the current YP/NIS domain", &Giant); u_long hostid; -SYSCTL_ULONG(_kern, KERN_HOSTID, hostid, CTLFLAG_RW, &hostid, 0, "Host ID"); +SYSCTL_ULONG(_kern, KERN_HOSTID, hostid, CTLFLAG_RW, &hostid, 0, "Host ID", &Giant); /* * This is really cheating. These actually live in the libc, something @@ -305,71 +305,71 @@ * getnext and friends to actually work, we define dummies here. */ SYSCTL_STRING(_user, USER_CS_PATH, cs_path, CTLFLAG_RD, - "", 0, "PATH that finds all the standard utilities"); + "", 0, "PATH that finds all the standard utilities", &Giant); SYSCTL_INT(_user, USER_BC_BASE_MAX, bc_base_max, CTLFLAG_RD, - 0, 0, "Max ibase/obase values in bc(1)"); + 0, 0, "Max ibase/obase values in bc(1)", &Giant); SYSCTL_INT(_user, USER_BC_DIM_MAX, bc_dim_max, CTLFLAG_RD, - 0, 0, "Max array size in bc(1)"); + 0, 0, "Max array size in bc(1)", &Giant); SYSCTL_INT(_user, USER_BC_SCALE_MAX, bc_scale_max, CTLFLAG_RD, - 0, 0, "Max scale value in bc(1)"); + 0, 0, "Max scale value in bc(1)", &Giant); SYSCTL_INT(_user, USER_BC_STRING_MAX, bc_string_max, CTLFLAG_RD, - 0, 0, "Max string length in bc(1)"); + 0, 0, "Max string length in bc(1)", &Giant); SYSCTL_INT(_user, USER_COLL_WEIGHTS_MAX, coll_weights_max, CTLFLAG_RD, - 0, 0, "Maximum number of weights assigned to an LC_COLLATE locale entry"); -SYSCTL_INT(_user, USER_EXPR_NEST_MAX, expr_nest_max, CTLFLAG_RD, 0, 0, ""); + 0, 0, "Maximum number of weights assigned to an LC_COLLATE locale entry", &Giant); +SYSCTL_INT(_user, USER_EXPR_NEST_MAX, expr_nest_max, CTLFLAG_RD, 0, 0, "", &Giant); SYSCTL_INT(_user, USER_LINE_MAX, line_max, CTLFLAG_RD, - 0, 0, "Max length (bytes) of a text-processing utility's input line"); + 0, 0, "Max length (bytes) of a text-processing utility's input line", &Giant); SYSCTL_INT(_user, USER_RE_DUP_MAX, re_dup_max, CTLFLAG_RD, - 0, 0, "Maximum number of repeats of a regexp permitted"); + 0, 0, "Maximum number of repeats of a regexp permitted", &Giant); SYSCTL_INT(_user, USER_POSIX2_VERSION, posix2_version, CTLFLAG_RD, 0, 0, - "The version of POSIX 1003.2 with which the system attempts to comply"); + "The version of POSIX 1003.2 with which the system attempts to comply", &Giant); SYSCTL_INT(_user, USER_POSIX2_C_BIND, posix2_c_bind, CTLFLAG_RD, - 0, 0, "Whether C development supports the C bindings option"); + 0, 0, "Whether C development supports the C bindings option", &Giant); SYSCTL_INT(_user, USER_POSIX2_C_DEV, posix2_c_dev, CTLFLAG_RD, - 0, 0, "Whether system supports the C development utilities option"); + 0, 0, "Whether system supports the C development utilities option", &Giant); SYSCTL_INT(_user, USER_POSIX2_CHAR_TERM, posix2_char_term, CTLFLAG_RD, - 0, 0, ""); + 0, 0, "", &Giant); SYSCTL_INT(_user, USER_POSIX2_FORT_DEV, posix2_fort_dev, CTLFLAG_RD, - 0, 0, "Whether system supports FORTRAN development utilities"); + 0, 0, "Whether system supports FORTRAN development utilities", &Giant); SYSCTL_INT(_user, USER_POSIX2_FORT_RUN, posix2_fort_run, CTLFLAG_RD, - 0, 0, "Whether system supports FORTRAN runtime utilities"); + 0, 0, "Whether system supports FORTRAN runtime utilities", &Giant); SYSCTL_INT(_user, USER_POSIX2_LOCALEDEF, posix2_localedef, CTLFLAG_RD, - 0, 0, "Whether system supports creation of locales"); + 0, 0, "Whether system supports creation of locales", &Giant); SYSCTL_INT(_user, USER_POSIX2_SW_DEV, posix2_sw_dev, CTLFLAG_RD, - 0, 0, "Whether system supports software development utilities"); + 0, 0, "Whether system supports software development utilities", &Giant); SYSCTL_INT(_user, USER_POSIX2_UPE, posix2_upe, CTLFLAG_RD, - 0, 0, "Whether system supports the user portability utilities"); + 0, 0, "Whether system supports the user portability utilities", &Giant); SYSCTL_INT(_user, USER_STREAM_MAX, stream_max, CTLFLAG_RD, - 0, 0, "Min Maximum number of streams a process may have open at one time"); + 0, 0, "Min Maximum number of streams a process may have open at one time", &Giant); SYSCTL_INT(_user, USER_TZNAME_MAX, tzname_max, CTLFLAG_RD, - 0, 0, "Min Maximum number of types supported for timezone names"); + 0, 0, "Min Maximum number of types supported for timezone names", &Giant); #include SYSCTL_INT(_debug_sizeof, OID_AUTO, vnode, CTLFLAG_RD, - 0, sizeof(struct vnode), "sizeof(struct vnode)"); + 0, sizeof(struct vnode), "sizeof(struct vnode)", &Giant); SYSCTL_INT(_debug_sizeof, OID_AUTO, proc, CTLFLAG_RD, - 0, sizeof(struct proc), "sizeof(struct proc)"); + 0, sizeof(struct proc), "sizeof(struct proc)", &Giant); #include SYSCTL_INT(_debug_sizeof, OID_AUTO, cdev, CTLFLAG_RD, - 0, sizeof(struct cdev), "sizeof(struct cdev)"); + 0, sizeof(struct cdev), "sizeof(struct cdev)", &Giant); #include #include SYSCTL_INT(_debug_sizeof, OID_AUTO, bio, CTLFLAG_RD, - 0, sizeof(struct bio), "sizeof(struct bio)"); + 0, sizeof(struct bio), "sizeof(struct bio)", &Giant); SYSCTL_INT(_debug_sizeof, OID_AUTO, buf, CTLFLAG_RD, - 0, sizeof(struct buf), "sizeof(struct buf)"); + 0, sizeof(struct buf), "sizeof(struct buf)", &Giant); #include SYSCTL_INT(_debug_sizeof, OID_AUTO, kinfo_proc, CTLFLAG_RD, - 0, sizeof(struct kinfo_proc), "sizeof(struct kinfo_proc)"); + 0, sizeof(struct kinfo_proc), "sizeof(struct kinfo_proc)", &Giant); /* XXX compatibility, remove for 6.0 */ #include #include SYSCTL_INT(_kern, OID_AUTO, fallback_elf_brand, CTLFLAG_RW, &__elfN(fallback_brand), sizeof(__elfN(fallback_brand)), - "compatibility for kern.fallback_elf_brand"); + "compatibility for kern.fallback_elf_brand", &Giant); diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_mutex.c repl/kern/kern_mutex.c --- /home/refugee/freebsd/current/src/sys/kern/kern_mutex.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_mutex.c Tue Dec 14 00:49:40 2004 @@ -105,11 +105,11 @@ struct mtx Giant; #ifdef MUTEX_PROFILING -SYSCTL_NODE(_debug, OID_AUTO, mutex, CTLFLAG_RD, NULL, "mutex debugging"); -SYSCTL_NODE(_debug_mutex, OID_AUTO, prof, CTLFLAG_RD, NULL, "mutex profiling"); +SYSCTL_NODE(_debug, OID_AUTO, mutex, CTLFLAG_RD, NULL, "mutex debugging", NULL); +SYSCTL_NODE(_debug_mutex, OID_AUTO, prof, CTLFLAG_RD, NULL, "mutex profiling", NULL); static int mutex_prof_enable = 0; SYSCTL_INT(_debug_mutex_prof, OID_AUTO, enable, CTLFLAG_RW, - &mutex_prof_enable, 0, "Enable tracing of mutex holdtime"); + &mutex_prof_enable, 0, "Enable tracing of mutex holdtime", &Giant); struct mutex_prof { const char *name; @@ -148,22 +148,22 @@ static int mutex_prof_acquisitions; SYSCTL_INT(_debug_mutex_prof, OID_AUTO, acquisitions, CTLFLAG_RD, - &mutex_prof_acquisitions, 0, "Number of mutex acquistions recorded"); + &mutex_prof_acquisitions, 0, "Number of mutex acquistions recorded", &Giant); static int mutex_prof_records; SYSCTL_INT(_debug_mutex_prof, OID_AUTO, records, CTLFLAG_RD, - &mutex_prof_records, 0, "Number of profiling records"); + &mutex_prof_records, 0, "Number of profiling records", &Giant); static int mutex_prof_maxrecords = NUM_MPROF_BUFFERS; SYSCTL_INT(_debug_mutex_prof, OID_AUTO, maxrecords, CTLFLAG_RD, - &mutex_prof_maxrecords, 0, "Maximum number of profiling records"); + &mutex_prof_maxrecords, 0, "Maximum number of profiling records", &Giant); static int mutex_prof_rejected; SYSCTL_INT(_debug_mutex_prof, OID_AUTO, rejected, CTLFLAG_RD, - &mutex_prof_rejected, 0, "Number of rejected profiling records"); + &mutex_prof_rejected, 0, "Number of rejected profiling records", &Giant); static int mutex_prof_hashsize = MPROF_HASH_SIZE; SYSCTL_INT(_debug_mutex_prof, OID_AUTO, hashsize, CTLFLAG_RD, - &mutex_prof_hashsize, 0, "Hash size"); + &mutex_prof_hashsize, 0, "Hash size", &Giant); static int mutex_prof_collisions = 0; SYSCTL_INT(_debug_mutex_prof, OID_AUTO, collisions, CTLFLAG_RD, - &mutex_prof_collisions, 0, "Number of hash collisions"); + &mutex_prof_collisions, 0, "Number of hash collisions", &Giant); /* * mprof_mtx protects the profiling buffers and the hash. @@ -226,7 +226,7 @@ return (error); } SYSCTL_PROC(_debug_mutex_prof, OID_AUTO, stats, CTLTYPE_STRING | CTLFLAG_RD, - NULL, 0, dump_mutex_prof_stats, "A", "Mutex profiling statistics"); + NULL, 0, dump_mutex_prof_stats, "A", "Mutex profiling statistics", &Giant); static int reset_mutex_prof_stats(SYSCTL_HANDLER_ARGS) @@ -237,7 +237,7 @@ return (0); v = 0; - error = sysctl_handle_int(oidp, &v, 0, req); + error = sysctl_handle_int(oidp, &v, 0, req, &Giant); if (error) return (error); if (req->newptr == NULL) @@ -253,7 +253,7 @@ return (0); } SYSCTL_PROC(_debug_mutex_prof, OID_AUTO, reset, CTLTYPE_INT | CTLFLAG_RW, - NULL, 0, reset_mutex_prof_stats, "I", "Reset mutex profiling statistics"); + NULL, 0, reset_mutex_prof_stats, "I", "Reset mutex profiling statistics", &Giant); #endif /* diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_ntptime.c repl/kern/kern_ntptime.c --- /home/refugee/freebsd/current/src/sys/kern/kern_ntptime.c Sun Nov 21 00:03:32 2004 +++ repl/kern/kern_ntptime.c Tue Dec 14 00:49:41 2004 @@ -269,22 +269,22 @@ { struct ntptimeval ntv; /* temporary structure */ - ntp_gettime1(&ntv); + ntp_gettime1(&ntv, &Giant); - return (sysctl_handle_opaque(oidp, &ntv, sizeof(ntv), req)); + return (sysctl_handle_opaque(oidp, &ntv, sizeof(ntv), req), &Giant); } -SYSCTL_NODE(_kern, OID_AUTO, ntp_pll, CTLFLAG_RW, 0, ""); +SYSCTL_NODE(_kern, OID_AUTO, ntp_pll, CTLFLAG_RW, 0, "", NULL); SYSCTL_PROC(_kern_ntp_pll, OID_AUTO, gettime, CTLTYPE_OPAQUE|CTLFLAG_RD, - 0, sizeof(struct ntptimeval) , ntp_sysctl, "S,ntptimeval", ""); + 0, sizeof(struct ntptimeval) , ntp_sysctl, "S,ntptimeval", "", &Giant); #ifdef PPS_SYNC -SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shiftmax, CTLFLAG_RW, &pps_shiftmax, 0, ""); -SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shift, CTLFLAG_RW, &pps_shift, 0, ""); -SYSCTL_INT(_kern_ntp_pll, OID_AUTO, time_monitor, CTLFLAG_RD, &time_monitor, 0, ""); +SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shiftmax, CTLFLAG_RW, &pps_shiftmax, 0, "", &Giant); +SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shift, CTLFLAG_RW, &pps_shift, 0, "", &Giant); +SYSCTL_INT(_kern_ntp_pll, OID_AUTO, time_monitor, CTLFLAG_RD, &time_monitor, 0, "", &Giant); -SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, pps_freq, CTLFLAG_RD, &pps_freq, sizeof(pps_freq), "I", ""); -SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, time_freq, CTLFLAG_RD, &time_freq, sizeof(time_freq), "I", ""); +SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, pps_freq, CTLFLAG_RD, &pps_freq, sizeof(pps_freq), "I", "", &Giant); +SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, time_freq, CTLFLAG_RD, &time_freq, sizeof(time_freq), "I", "", &Giant); #endif /* * ntp_adjtime() - NTP daemon application interface diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_poll.c repl/kern/kern_poll.c --- /home/refugee/freebsd/current/src/sys/kern/kern_poll.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_poll.c Tue Dec 14 00:49:42 2004 @@ -108,71 +108,71 @@ static u_int32_t poll_burst = 5; SYSCTL_UINT(_kern_polling, OID_AUTO, burst, CTLFLAG_RW, - &poll_burst, 0, "Current polling burst size"); + &poll_burst, 0, "Current polling burst size", &Giant); static u_int32_t poll_each_burst = 5; SYSCTL_UINT(_kern_polling, OID_AUTO, each_burst, CTLFLAG_RW, - &poll_each_burst, 0, "Max size of each burst"); + &poll_each_burst, 0, "Max size of each burst", &Giant); static u_int32_t poll_burst_max = 150; /* good for 100Mbit net and HZ=1000 */ SYSCTL_UINT(_kern_polling, OID_AUTO, burst_max, CTLFLAG_RW, - &poll_burst_max, 0, "Max Polling burst size"); + &poll_burst_max, 0, "Max Polling burst size", &Giant); static u_int32_t poll_in_idle_loop=0; /* do we poll in idle loop ? */ SYSCTL_UINT(_kern_polling, OID_AUTO, idle_poll, CTLFLAG_RW, - &poll_in_idle_loop, 0, "Enable device polling in idle loop"); + &poll_in_idle_loop, 0, "Enable device polling in idle loop", &Giant); u_int32_t poll_in_trap; /* used in trap.c */ SYSCTL_UINT(_kern_polling, OID_AUTO, poll_in_trap, CTLFLAG_RW, - &poll_in_trap, 0, "Poll burst size during a trap"); + &poll_in_trap, 0, "Poll burst size during a trap", &Giant); static u_int32_t user_frac = 50; SYSCTL_UINT(_kern_polling, OID_AUTO, user_frac, CTLFLAG_RW, - &user_frac, 0, "Desired user fraction of cpu time"); + &user_frac, 0, "Desired user fraction of cpu time", &Giant); static u_int32_t reg_frac = 20 ; SYSCTL_UINT(_kern_polling, OID_AUTO, reg_frac, CTLFLAG_RW, - ®_frac, 0, "Every this many cycles poll register"); + ®_frac, 0, "Every this many cycles poll register", &Giant); static u_int32_t short_ticks; SYSCTL_UINT(_kern_polling, OID_AUTO, short_ticks, CTLFLAG_RW, - &short_ticks, 0, "Hardclock ticks shorter than they should be"); + &short_ticks, 0, "Hardclock ticks shorter than they should be", &Giant); static u_int32_t lost_polls; SYSCTL_UINT(_kern_polling, OID_AUTO, lost_polls, CTLFLAG_RW, - &lost_polls, 0, "How many times we would have lost a poll tick"); + &lost_polls, 0, "How many times we would have lost a poll tick", &Giant); static u_int32_t pending_polls; SYSCTL_UINT(_kern_polling, OID_AUTO, pending_polls, CTLFLAG_RW, - &pending_polls, 0, "Do we need to poll again"); + &pending_polls, 0, "Do we need to poll again", &Giant); static int residual_burst = 0; SYSCTL_INT(_kern_polling, OID_AUTO, residual_burst, CTLFLAG_RW, - &residual_burst, 0, "# of residual cycles in burst"); + &residual_burst, 0, "# of residual cycles in burst", &Giant); static u_int32_t poll_handlers; /* next free entry in pr[]. */ SYSCTL_UINT(_kern_polling, OID_AUTO, handlers, CTLFLAG_RD, - &poll_handlers, 0, "Number of registered poll handlers"); + &poll_handlers, 0, "Number of registered poll handlers", &Giant); static int polling = 0; /* global polling enable */ SYSCTL_UINT(_kern_polling, OID_AUTO, enable, CTLFLAG_RW, - &polling, 0, "Polling enabled"); + &polling, 0, "Polling enabled", &Giant); static u_int32_t phase; SYSCTL_UINT(_kern_polling, OID_AUTO, phase, CTLFLAG_RW, - &phase, 0, "Polling phase"); + &phase, 0, "Polling phase", &Giant); static u_int32_t suspect; SYSCTL_UINT(_kern_polling, OID_AUTO, suspect, CTLFLAG_RW, - &suspect, 0, "suspect event"); + &suspect, 0, "suspect event", &Giant); static u_int32_t stalled; SYSCTL_UINT(_kern_polling, OID_AUTO, stalled, CTLFLAG_RW, - &stalled, 0, "potential stalls"); + &stalled, 0, "potential stalls", &Giant); static u_int32_t idlepoll_sleeping; /* idlepoll is sleeping */ SYSCTL_UINT(_kern_polling, OID_AUTO, idlepoll_sleeping, CTLFLAG_RD, - &idlepoll_sleeping, 0, "idlepoll is sleeping"); + &idlepoll_sleeping, 0, "idlepoll is sleeping", &Giant); #define POLL_LIST_LEN 128 diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_proc.c repl/kern/kern_proc.c --- /home/refugee/freebsd/current/src/sys/kern/kern_proc.c Wed Dec 8 20:41:04 2004 +++ repl/kern/kern_proc.c Tue Dec 14 00:49:41 2004 @@ -96,7 +96,7 @@ uma_zone_t ithread_zone; int kstack_pages = KSTACK_PAGES; -SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, "", &Giant); CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); @@ -928,7 +928,7 @@ PROC_UNLOCK(p); return (error); } - error = sysctl_out_proc(p, req, flags); + error = sysctl_out_proc(p, req, flags, &Giant); return (error); } @@ -953,7 +953,7 @@ if (error) return (error); } - error = sysctl_wire_old_buffer(req, 0); + error = sysctl_wire_old_buffer(req, 0, &Giant); if (error != 0) return (error); sx_slock(&allproc_lock); @@ -1060,7 +1060,7 @@ } - error = sysctl_out_proc(p, req, flags | doingzomb); + error = sysctl_out_proc(p, req, flags | doingzomb, &Giant); if (error) { sx_sunlock(&allproc_lock); return (error); @@ -1194,14 +1194,14 @@ } sv_name = p->p_sysent->sv_name; PROC_UNLOCK(p); - return (sysctl_handle_string(oidp, sv_name, 0, req)); + return (sysctl_handle_string(oidp, sv_name, 0, req), &Giant); } -SYSCTL_NODE(_kern, KERN_PROC, proc, CTLFLAG_RD, 0, "Process table"); +SYSCTL_NODE(_kern, KERN_PROC, proc, CTLFLAG_RD, 0, "Process table", NULL); SYSCTL_PROC(_kern_proc, KERN_PROC_ALL, all, CTLFLAG_RD|CTLTYPE_STRUCT, - 0, 0, sysctl_kern_proc, "S,proc", "Return entire process table"); + 0, 0, sysctl_kern_proc, "S,proc", "Return entire process table", &Giant); SYSCTL_NODE(_kern_proc, KERN_PROC_GID, gid, CTLFLAG_RD, sysctl_kern_proc, "Process table"); diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_prot.c repl/kern/kern_prot.c --- /home/refugee/freebsd/current/src/sys/kern/kern_prot.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_prot.c Tue Dec 14 00:49:41 2004 @@ -1218,7 +1218,7 @@ */ int suser_enabled = 1; SYSCTL_INT(_security_bsd, OID_AUTO, suser_enabled, CTLFLAG_RW, - &suser_enabled, 0, "processes with uid 0 have privilege"); + &suser_enabled, 0, "processes with uid 0 have privilege", &Giant); TUNABLE_INT("security.bsd.suser_enabled", &suser_enabled); /* @@ -1309,7 +1309,7 @@ static int see_other_uids = 1; SYSCTL_INT(_security_bsd, OID_AUTO, see_other_uids, CTLFLAG_RW, &see_other_uids, 0, - "Unprivileged processes may see subjects/objects with different real uid"); + "Unprivileged processes may see subjects/objects with different real uid", &Giant); /*- * Determine if u1 "can see" the subject specified by u2, according to the @@ -1339,7 +1339,7 @@ static int see_other_gids = 1; SYSCTL_INT(_security_bsd, OID_AUTO, see_other_gids, CTLFLAG_RW, &see_other_gids, 0, - "Unprivileged processes may see subjects/objects with different real gid"); + "Unprivileged processes may see subjects/objects with different real gid", &Giant); /* * Determine if u1 can "see" the subject specified by u2, according to the @@ -1425,7 +1425,7 @@ static int conservative_signals = 1; SYSCTL_INT(_security_bsd, OID_AUTO, conservative_signals, CTLFLAG_RW, &conservative_signals, 0, "Unprivileged processes prevented from " - "sending certain signals to processes whose credentials have changed"); + "sending certain signals to processes whose credentials have changed", &Giant); /*- * Determine whether cred may deliver the specified signal to proc. * Returns: 0 for permitted, an errno value otherwise. @@ -1589,7 +1589,7 @@ static int unprivileged_proc_debug = 1; SYSCTL_INT(_security_bsd, OID_AUTO, unprivileged_proc_debug, CTLFLAG_RW, &unprivileged_proc_debug, 0, - "Unprivileged processes may use process debugging facilities"); + "Unprivileged processes may use process debugging facilities", &Giant); /*- * Determine whether td may debug p. diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_shutdown.c repl/kern/kern_shutdown.c --- /home/refugee/freebsd/current/src/sys/kern/kern_shutdown.c Wed Dec 8 20:41:04 2004 +++ repl/kern/kern_shutdown.c Tue Dec 14 00:49:40 2004 @@ -88,7 +88,7 @@ int debugger_on_panic = 1; #endif SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic, CTLFLAG_RW, - &debugger_on_panic, 0, "Run debugger on kernel panic"); + &debugger_on_panic, 0, "Run debugger on kernel panic", &Giant); #ifdef KDB_TRACE int trace_on_panic = 1; @@ -96,14 +96,14 @@ int trace_on_panic = 0; #endif SYSCTL_INT(_debug, OID_AUTO, trace_on_panic, CTLFLAG_RW, - &trace_on_panic, 0, "Print stack trace on kernel panic"); + &trace_on_panic, 0, "Print stack trace on kernel panic", &Giant); #endif /* KDB */ int sync_on_panic = 0; SYSCTL_INT(_kern, OID_AUTO, sync_on_panic, CTLFLAG_RW, - &sync_on_panic, 0, "Do a sync before rebooting from a panic"); + &sync_on_panic, 0, "Do a sync before rebooting from a panic", &Giant); -SYSCTL_NODE(_kern, OID_AUTO, shutdown, CTLFLAG_RW, 0, "Shutdown environment"); +SYSCTL_NODE(_kern, OID_AUTO, shutdown, CTLFLAG_RW, 0, "Shutdown environment", NULL); /* * Variable panicstr contains argument to first call to panic; used as flag @@ -563,7 +563,7 @@ static int poweroff_delay = POWEROFF_DELAY; SYSCTL_INT(_kern_shutdown, OID_AUTO, poweroff_delay, CTLFLAG_RW, - &poweroff_delay, 0, ""); + &poweroff_delay, 0, "", &Giant); static void poweroff_wait(void *junk, int howto) @@ -583,7 +583,7 @@ */ static int kproc_shutdown_wait = 60; SYSCTL_INT(_kern_shutdown, OID_AUTO, kproc_shutdown_wait, CTLFLAG_RW, - &kproc_shutdown_wait, 0, ""); + &kproc_shutdown_wait, 0, "", &Giant); void kproc_shutdown(void *arg, int howto) diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_sig.c repl/kern/kern_sig.c --- /home/refugee/freebsd/current/src/sys/kern/kern_sig.c Sun Nov 21 00:03:32 2004 +++ repl/kern/kern_sig.c Tue Dec 14 00:49:41 2004 @@ -101,7 +101,7 @@ static int kern_logsigexit = 1; SYSCTL_INT(_kern, KERN_LOGSIGEXIT, logsigexit, CTLFLAG_RW, &kern_logsigexit, 0, - "Log processes quitting on abnormal signals to syslog(3)"); + "Log processes quitting on abnormal signals to syslog(3)", &Giant); /* * Policy -- Can ucred cr1 send SIGIO to process cr2? @@ -117,15 +117,15 @@ int sugid_coredump; SYSCTL_INT(_kern, OID_AUTO, sugid_coredump, CTLFLAG_RW, - &sugid_coredump, 0, "Enable coredumping set user/group ID processes"); + &sugid_coredump, 0, "Enable coredumping set user/group ID processes", &Giant); static int do_coredump = 1; SYSCTL_INT(_kern, OID_AUTO, coredump, CTLFLAG_RW, - &do_coredump, 0, "Enable/Disable coredumps"); + &do_coredump, 0, "Enable/Disable coredumps", &Giant); static int set_core_nodump_flag = 0; SYSCTL_INT(_kern, OID_AUTO, nodump_coredump, CTLFLAG_RW, &set_core_nodump_flag, - 0, "Enable setting the NODUMP flag on coredump files"); + 0, "Enable setting the NODUMP flag on coredump files", &Giant); /* * Signal properties and actions. @@ -2469,7 +2469,7 @@ static char corefilename[MAXPATHLEN] = {"%N.core"}; SYSCTL_STRING(_kern, OID_AUTO, corefile, CTLFLAG_RW, corefilename, - sizeof(corefilename), "process corefile name format string"); + sizeof(corefilename), "process corefile name format string", &Giant); /* * expand_name(name, uid, pid) diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_subr.c repl/kern/kern_subr.c --- /home/refugee/freebsd/current/src/sys/kern/kern_subr.c Wed Dec 8 20:41:04 2004 +++ repl/kern/kern_subr.c Tue Dec 14 00:49:41 2004 @@ -62,7 +62,7 @@ #endif SYSCTL_INT(_kern, KERN_IOV_MAX, iov_max, CTLFLAG_RD, NULL, UIO_MAXIOV, - "Maximum number of elements in an I/O vector; sysconf(_SC_IOV_MAX)"); + "Maximum number of elements in an I/O vector; sysconf(_SC_IOV_MAX)", &Giant); #ifdef ZERO_COPY_SOCKETS /* Declared in uipc_socket.c */ diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_switch.c repl/kern/kern_switch.c --- /home/refugee/freebsd/current/src/sys/kern/kern_switch.c Sun Nov 21 00:03:32 2004 +++ repl/kern/kern_switch.c Tue Dec 14 00:49:40 2004 @@ -835,7 +835,7 @@ #if defined(SMP) && defined(SCHED_4BSD) int runq_fuzz = 1; -SYSCTL_INT(_kern_sched, OID_AUTO, runq_fuzz, CTLFLAG_RW, &runq_fuzz, 0, ""); +SYSCTL_INT(_kern_sched, OID_AUTO, runq_fuzz, CTLFLAG_RW, &runq_fuzz, 0, "", &Giant); #endif /* diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_sx.c repl/kern/kern_sx.c --- /home/refugee/freebsd/current/src/sys/kern/kern_sx.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_sx.c Tue Dec 14 00:49:41 2004 @@ -367,3 +367,15 @@ } } #endif /* INVARIANT_SUPPORT */ + +int +sx_xlocked(struct sx *sx) +{ + mtx_lock(sx->sx_lock); + if (sx->sx_xholder == curthread) { + mtx_unlock(sx->sx_lock); + return (1); + } + mtx_unlock(sx->sx_lock); + return (0); +} diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_synch.c repl/kern/kern_synch.c --- /home/refugee/freebsd/current/src/sys/kern/kern_synch.c Wed Dec 8 20:41:04 2004 +++ repl/kern/kern_synch.c Tue Dec 14 00:49:41 2004 @@ -87,7 +87,7 @@ /* kernel uses `FSCALE', userland (SHOULD) use kern.fscale */ static int fscale __unused = FSCALE; -SYSCTL_INT(_kern, OID_AUTO, fscale, CTLFLAG_RD, 0, FSCALE, ""); +SYSCTL_INT(_kern, OID_AUTO, fscale, CTLFLAG_RD, 0, FSCALE, "", &Giant); static void loadav(void *arg); static void lboltcb(void *arg); diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_sysctl.c repl/kern/kern_sysctl.c --- /home/refugee/freebsd/current/src/sys/kern/kern_sysctl.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_sysctl.c Tue Dec 14 00:49:42 2004 @@ -62,13 +62,22 @@ /* * Locking - this locks the sysctl tree in memory. */ -static struct sx sysctllock; +static struct mtx sysctl_ctx_mtx; +static struct sx sysctl_sx; -#define SYSCTL_LOCK() sx_xlock(&sysctllock) -#define SYSCTL_UNLOCK() sx_xunlock(&sysctllock) -#define SYSCTL_INIT() sx_init(&sysctllock, "sysctl lock") +#define SYSCTL_XLOCK() sx_xlock(&sysctl_sx) +#define SYSCTL_SLOCK() sx_slock(&sysctl_sx) +#define SYSCTL_XUNLOCK() sx_xunlock(&sysctl_sx) +#define SYSCTL_SUNLOCK() sx_sunlock(&sysctl_sx) +#define SYSCTL_INIT() sx_init(&sysctl_sx, "sysctl sx lock") + +#define SYSCTL_CTX_LOCK() mtx_lock(&sysctl_ctx_mtx) +#define SYSCTL_CTX_UNLOCK() mtx_unlock(&sysctl_ctx_mtx) +#define SYSCTL_CTX_INIT() mtx_init(&sysctl_ctx_mtx, \ + "sysctl context lock", \ + NULL, MTX_DEF) -static int sysctl_root(SYSCTL_HANDLER_ARGS); +static int sysctl_root(SYSCTL_HANDLER_ARGS, &Giant); struct sysctl_oid_list sysctl__children; /* root list */ @@ -77,6 +86,8 @@ { struct sysctl_oid *oidp; + sx_assert(&sysctl_sx, SX_LOCKED); + SLIST_FOREACH(oidp, list, oid_link) { if (strcmp(oidp->oid_name, name) == 0) { return (oidp); @@ -91,25 +102,39 @@ * Order by number in each list. */ -void +int sysctl_register_oid(struct sysctl_oid *oidp) { struct sysctl_oid_list *parent = oidp->oid_parent; struct sysctl_oid *p; struct sysctl_oid *q; + int error; + int locked; + locked = sx_xlocked(&sysctl_sx); + if (!locked) + SYSCTL_XLOCK(); + /* * First check if another oid with the same name already * exists in the parent's list. */ - p = sysctl_find_oidname(oidp->oid_name, parent); + + if (parent == NULL) { /* The oid has no parent! */ + error = 1; + goto done; + } + + p = sysctl_find_oidname(oidp->oid_name, parent, &Giant); if (p != NULL) { if ((p->oid_kind & CTLTYPE) == CTLTYPE_NODE) { p->oid_refcnt++; - return; + error = 1; + goto done; } else { printf("can't re-use a leaf (%s)!\n", p->oid_name); - return; + error = 1; + goto done; } } /* @@ -146,19 +171,30 @@ SLIST_INSERT_AFTER(q, oidp, oid_link); else SLIST_INSERT_HEAD(parent, oidp, oid_link); + error = 0; +done: + if (!locked) + SYSCTL_XUNLOCK(); + return (error); } void sysctl_unregister_oid(struct sysctl_oid *oidp) { struct sysctl_oid *p; + struct sysctl_oid_list *parent = oidp->oid_parent; int error; + int locked; + + locked = sx_xlocked(&sysctl_sx); + if (!locked) + SYSCTL_XLOCK(); error = ENOENT; if (oidp->oid_number == OID_AUTO) { error = EINVAL; } else { - SLIST_FOREACH(p, oidp->oid_parent, oid_link) { + SLIST_FOREACH(p, parent, oid_link) { if (p == oidp) { SLIST_REMOVE(oidp->oid_parent, oidp, sysctl_oid, oid_link); @@ -167,7 +203,8 @@ } } } - + if (!locked) + SYSCTL_XUNLOCK(); /* * This can happen when a module fails to register and is * being unloaded afterwards. It should not be a panic() @@ -183,7 +220,7 @@ { if (c == NULL) { - return (EINVAL); + return (EINVAL, &Giant); } TAILQ_INIT(c); return (0); @@ -203,8 +240,10 @@ * XXX This algorithm is a hack. But I don't know any * XXX better solution for now... */ + + SYSCTL_CTX_LOCK(); TAILQ_FOREACH(e, clist, link) { - error = sysctl_remove_oid(e->entry, 0, 0); + error = sysctl_remove_oid(e->entry, 0, 0, &Giant); if (error) break; } @@ -218,22 +257,25 @@ else e1 = TAILQ_LAST(clist, sysctl_ctx_list); while (e1 != NULL) { - sysctl_register_oid(e1->entry); + sysctl_register_oid(e1->entry, &Giant); e1 = TAILQ_PREV(e1, sysctl_ctx_list, link); } - if (error) + if (error) { + SYSCTL_CTX_UNLOCK(); return(EBUSY); + } /* Now really delete the entries */ e = TAILQ_FIRST(clist); while (e != NULL) { e1 = TAILQ_NEXT(e, link); - error = sysctl_remove_oid(e->entry, 1, 0); + error = sysctl_remove_oid(e->entry, 1, 0, &Giant); if (error) panic("sysctl_remove_oid: corrupt tree, entry: %s", - e->entry->oid_name); + e->entry->oid_name, &Giant); free(e, M_SYSCTLOID); e = e1; } + SYSCTL_CTX_UNLOCK(); return (error); } @@ -247,7 +289,9 @@ return(NULL); e = malloc(sizeof(struct sysctl_ctx_entry), M_SYSCTLOID, M_WAITOK); e->entry = oidp; + SYSCTL_CTX_LOCK(); TAILQ_INSERT_HEAD(clist, e, link); + SYSCTL_CTX_UNLOCK(); return (e); } @@ -278,17 +322,21 @@ if (clist == NULL || oidp == NULL) return (EINVAL); - e = sysctl_ctx_entry_find(clist, oidp); + SYSCTL_CTX_LOCK(); + e = sysctl_ctx_entry_find(clist, oidp, &Giant); if (e != NULL) { TAILQ_REMOVE(clist, e, link); free(e, M_SYSCTLOID); + SYSCTL_CTX_UNLOCK(); return (0); - } else + } else { + SYSCTL_CTX_UNLOCK(); return (ENOENT); + } } /* - * Remove dynamically created sysctl trees. + * Really remove dynamically created sysctl trees. * oidp - top of the tree to be removed * del - if 0 - just deregister, otherwise free up entries as well * recurse - if != 0 traverse the subtree to be deleted @@ -298,12 +346,23 @@ { struct sysctl_oid *p; int error; + int locked; if (oidp == NULL) return(EINVAL); + + /* + * Only aquire the exclusive lock if we are really going to delete a + * node, and we don't already hold it. + */ + locked = sx_xlocked(&sysctl_sx); + if (del && (!locked)) + SYSCTL_XLOCK(); + if ((oidp->oid_kind & CTLFLAG_DYN) == 0) { printf("can't remove non-dynamic nodes!\n"); - return (EINVAL); + error = EINVAL; + goto done; } /* * WARNING: normal method to do this should be through @@ -315,25 +374,28 @@ if ((oidp->oid_kind & CTLTYPE) == CTLTYPE_NODE) { if (oidp->oid_refcnt == 1) { SLIST_FOREACH(p, SYSCTL_CHILDREN(oidp), oid_link) { - if (!recurse) - return (ENOTEMPTY); - error = sysctl_remove_oid(p, del, recurse); + if (!recurse) { + error = ENOTEMPTY; + goto done; + } + error = sysctl_remove_oid(p, del, recurse, &Giant); if (error) - return (error); + goto done; } if (del) free(SYSCTL_CHILDREN(oidp), M_SYSCTLOID); } } - if (oidp->oid_refcnt > 1 ) { + if (oidp->oid_refcnt > 1) { oidp->oid_refcnt--; } else { if (oidp->oid_refcnt == 0) { printf("Warning: bad oid_refcnt=%u (%s)!\n", oidp->oid_refcnt, oidp->oid_name); - return (EINVAL); + error = EINVAL; + goto done; } - sysctl_unregister_oid(oidp); + sysctl_unregister_oid(oidp, &Giant); if (del) { if (oidp->descr) free((void *)(uintptr_t)(const void *)oidp->descr, M_SYSCTLOID); @@ -342,7 +404,11 @@ free(oidp, M_SYSCTLOID); } } - return (0); + error = 0; +done: + if (del && (!locked)) + SYSCTL_XUNLOCK(); + return (error); } /* @@ -352,7 +418,8 @@ struct sysctl_oid * sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent, int number, const char *name, int kind, void *arg1, int arg2, - int (*handler)(SYSCTL_HANDLER_ARGS), const char *fmt, const char *descr) + int (*handler)(SYSCTL_HANDLER_ARGS), const char *fmt, const char *descr, + struct mtx *mtx) { struct sysctl_oid *oidp; ssize_t len; @@ -361,17 +428,21 @@ /* You have to hook up somewhere.. */ if (parent == NULL) return(NULL); + + SYSCTL_XLOCK(); /* Check if the node already exists, otherwise create it */ - oidp = sysctl_find_oidname(name, parent); + oidp = sysctl_find_oidname(name, parent, &Giant); if (oidp != NULL) { if ((oidp->oid_kind & CTLTYPE) == CTLTYPE_NODE) { oidp->oid_refcnt++; /* Update the context */ if (clist != NULL) - sysctl_ctx_entry_add(clist, oidp); + sysctl_ctx_entry_add(clist, oidp, &Giant); + SYSCTL_XUNLOCK(); return (oidp); } else { printf("can't re-use a leaf (%s)!\n", name); + SYSCTL_XUNLOCK(); return (NULL); } } @@ -397,6 +468,7 @@ oidp->oid_arg2 = arg2; } oidp->oid_fmt = fmt; + oidp->oid_mtx = mtx; if (descr) { int len = strlen(descr) + 1; oidp->descr = malloc(len, M_SYSCTLOID, M_WAITOK); @@ -405,9 +477,21 @@ } /* Update the context, if used */ if (clist != NULL) - sysctl_ctx_entry_add(clist, oidp); + sysctl_ctx_entry_add(clist, oidp, &Giant); + /* Register this oid */ - sysctl_register_oid(oidp); + if (sysctl_register_oid(oidp)) { + free((void *)(uintptr_t)(const void *)oidp->descr, + M_SYSCTLOID, &Giant); + free((void *)(uintptr_t)(const void *)oidp->oid_name, + M_SYSCTLOID); + free(oidp->oid_arg1, M_SYSCTLOID); /* Children */ + free(newname, M_SYSCTLOID); + free(oidp, M_SYSCTLOID); + return (NULL); + } + + SYSCTL_XUNLOCK(); return (oidp); } @@ -421,13 +505,17 @@ if (oid->oid_parent == parent) return (0); - oidp = sysctl_find_oidname(oid->oid_name, parent); - if (oidp != NULL) + SYSCTL_XLOCK(); + oidp = sysctl_find_oidname(oid->oid_name, parent, &Giant); + if (oidp != NULL) { + SYSCTL_XUNLOCK(); return (EEXIST); - sysctl_unregister_oid(oid); + } + sysctl_unregister_oid(oid, &Giant); oid->oid_parent = parent; oid->oid_number = OID_AUTO; - sysctl_register_oid(oid); + sysctl_register_oid(oid, &Giant); + SYSCTL_XUNLOCK(); return (0); } @@ -441,11 +529,12 @@ { struct sysctl_oid **oidp; - SYSCTL_INIT(); + SYSCTL_CTX_INIT(, &Giant); + SYSCTL_INIT(, &Giant); SET_FOREACH(oidp, sysctl_set) - sysctl_register_oid(*oidp); + sysctl_register_oid(*oidp, &Giant); } -SYSINIT(sysctl, SI_SUB_KMEM, SI_ORDER_ANY, sysctl_register_all, 0); +SYSINIT(sysctl, SI_SUB_LOCK, SI_ORDER_ANY, sysctl_register_all, 0); /* * "Staff-functions" @@ -492,7 +581,7 @@ printf(" Node\n"); if (!oidp->oid_handler) { sysctl_sysctl_debug_dump_node( - oidp->oid_arg1, i+2); + oidp->oid_arg1, i+2, &Giant); } break; case CTLTYPE_INT: printf(" Int\n"); break; @@ -513,12 +602,14 @@ error = suser(req->td); if (error) return error; - sysctl_sysctl_debug_dump_node(&sysctl__children, 0); + SYSCTL_SLOCK(); + sysctl_sysctl_debug_dump_node(&sysctl__children, 0, &Giant); + SYSCTL_SUNLOCK(); return ENOENT; } SYSCTL_PROC(_sysctl, 0, debug, CTLTYPE_STRING|CTLFLAG_RD, - 0, 0, sysctl_sysctl_debug, "-", ""); + 0, 0, sysctl_sysctl_debug, "-", "", &Giant); #endif static int @@ -531,6 +622,7 @@ struct sysctl_oid_list *lsp = &sysctl__children, *lsp2; char buf[10]; + SYSCTL_SLOCK(); while (namelen) { if (!lsp) { snprintf(buf,sizeof(buf),"%d",*name); @@ -553,14 +645,14 @@ error = SYSCTL_OUT(req, ".", 1); if (!error) error = SYSCTL_OUT(req, oid->oid_name, - strlen(oid->oid_name)); + strlen(oid->oid_name)); if (error) return (error); namelen--; name++; - if ((oid->oid_kind & CTLTYPE) != CTLTYPE_NODE) + if ((oid->oid_kind & CTLTYPE) != CTLTYPE_NODE) break; if (oid->oid_handler) @@ -571,10 +663,12 @@ } lsp = lsp2; } - return (SYSCTL_OUT(req, "", 1)); + error = SYSCTL_OUT(req, "", 1); + SYSCTL_SUNLOCK(); + return (error); } -SYSCTL_NODE(_sysctl, 1, name, CTLFLAG_RD, sysctl_sysctl_name, ""); +SYSCTL_NODE(_sysctl, 1, name, CTLFLAG_RD, sysctl_sysctl_name, "", NULL); static int sysctl_sysctl_next_ls(struct sysctl_oid_list *lsp, int *name, u_int namelen, @@ -583,23 +677,28 @@ struct sysctl_oid *oidp; *len = level; + SYSCTL_SLOCK(); SLIST_FOREACH(oidp, lsp, oid_link) { *next = oidp->oid_number; *oidpp = oidp; - if (oidp->oid_kind & CTLFLAG_SKIP) continue; - if (!namelen) { - if ((oidp->oid_kind & CTLTYPE) != CTLTYPE_NODE) + if ((oidp->oid_kind & CTLTYPE) != CTLTYPE_NODE) { + SYSCTL_SUNLOCK(); return 0; - if (oidp->oid_handler) + } + if (oidp->oid_handler) { /* We really should call the handler here...*/ + SYSCTL_SUNLOCK(); return 0; + } lsp = (struct sysctl_oid_list *)oidp->oid_arg1; if (!sysctl_sysctl_next_ls(lsp, 0, 0, next+1, - len, level+1, oidpp)) + len, level+1, oidpp)) { + SYSCTL_SUNLOCK(, &Giant); return 0; + } goto emptynode; } @@ -607,14 +706,20 @@ continue; if (oidp->oid_number > *name) { - if ((oidp->oid_kind & CTLTYPE) != CTLTYPE_NODE) + if ((oidp->oid_kind & CTLTYPE) != CTLTYPE_NODE) { + SYSCTL_SUNLOCK(); return 0; - if (oidp->oid_handler) + } + if (oidp->oid_handler) { + SYSCTL_SUNLOCK(); return 0; + } lsp = (struct sysctl_oid_list *)oidp->oid_arg1; if (!sysctl_sysctl_next_ls(lsp, name+1, namelen-1, - next+1, len, level+1, oidpp)) + next+1, len, level+1, oidpp)) { + SYSCTL_SUNLOCK(, &Giant); return (0); + } goto next; } if ((oidp->oid_kind & CTLTYPE) != CTLTYPE_NODE) @@ -625,13 +730,17 @@ lsp = (struct sysctl_oid_list *)oidp->oid_arg1; if (!sysctl_sysctl_next_ls(lsp, name+1, namelen-1, next+1, - len, level+1, oidpp)) + len, level+1, oidpp)) { + SYSCTL_SUNLOCK(, &Giant); return (0); + } + next: namelen = 1; emptynode: *len = level; } + SYSCTL_SUNLOCK(); return 1; } @@ -644,15 +753,15 @@ struct sysctl_oid *oid; struct sysctl_oid_list *lsp = &sysctl__children; int newoid[CTL_MAXNAME]; - - i = sysctl_sysctl_next_ls(lsp, name, namelen, newoid, &j, 1, &oid); + + i = sysctl_sysctl_next_ls(lsp, name, namelen, newoid, &j, 1, &oid, &Giant); if (i) return ENOENT; error = SYSCTL_OUT(req, newoid, j * sizeof (int)); return (error); } -SYSCTL_NODE(_sysctl, 2, next, CTLFLAG_RD, sysctl_sysctl_next, ""); +SYSCTL_NODE(_sysctl, 2, next, CTLFLAG_RD, sysctl_sysctl_next, "", NULL); static int name2oid (char *name, int *oid, int *len, struct sysctl_oid **oidpp) @@ -677,6 +786,7 @@ if (i == '.') *p = '\0'; + SYSCTL_SLOCK(); oidp = SLIST_FIRST(lsp); while (oidp && *len < CTL_MAXNAME) { @@ -690,6 +800,7 @@ if (!i) { if (oidpp) *oidpp = oidp; + SYSCTL_SUNLOCK(); return (0); } @@ -708,6 +819,7 @@ if (i == '.') *p = '\0'; } + SYSCTL_SUNLOCK(); return ENOENT; } @@ -745,7 +857,7 @@ } SYSCTL_PROC(_sysctl, 3, name2oid, CTLFLAG_RW|CTLFLAG_ANYBODY, 0, 0, - sysctl_sysctl_name2oid, "I", ""); + sysctl_sysctl_name2oid, "I", "", &Giant); static int sysctl_sysctl_oidfmt(SYSCTL_HANDLER_ARGS) @@ -753,39 +865,50 @@ struct sysctl_oid *oid; int error; - error = sysctl_find_oid(arg1, arg2, &oid, NULL, req); + SYSCTL_SLOCK(); + error = sysctl_find_oid(arg1, arg2, &oid, NULL, req, &Giant); if (error) - return (error); + goto done; - if (!oid->oid_fmt) - return (ENOENT); + if (!oid->oid_fmt) { + error = ENOENT; + goto done; + } error = SYSCTL_OUT(req, &oid->oid_kind, sizeof(oid->oid_kind)); if (error) - return (error); + goto done; error = SYSCTL_OUT(req, oid->oid_fmt, strlen(oid->oid_fmt) + 1); +done: + SYSCTL_SUNLOCK(); return (error); } -SYSCTL_NODE(_sysctl, 4, oidfmt, CTLFLAG_RD, sysctl_sysctl_oidfmt, ""); +SYSCTL_NODE(_sysctl, 4, oidfmt, CTLFLAG_RD, sysctl_sysctl_oidfmt, "", NULL); static int sysctl_sysctl_oiddescr(SYSCTL_HANDLER_ARGS) { struct sysctl_oid *oid; int error; - - error = sysctl_find_oid(arg1, arg2, &oid, NULL, req); - if (error) + + SYSCTL_SLOCK(); + error = sysctl_find_oid(arg1, arg2, &oid, NULL, req, &Giant); + if (error) { + SYSCTL_SUNLOCK(); return (error); + } - if (!oid->descr) + if (!oid->descr) { + SYSCTL_SUNLOCK(); return (ENOENT); + } error = SYSCTL_OUT(req, oid->descr, strlen(oid->descr) + 1); + SYSCTL_SUNLOCK(); return (error); } -SYSCTL_NODE(_sysctl, 5, oiddescr, CTLFLAG_RD, sysctl_sysctl_oiddescr, ""); +SYSCTL_NODE(_sysctl, 5, oiddescr, CTLFLAG_RD, sysctl_sysctl_oiddescr, "", NULL); /* * Default "handler" functions. @@ -1010,15 +1133,11 @@ req.newfunc = sysctl_new_kernel; req.lock = REQ_LOCKED; - SYSCTL_LOCK(); - - error = sysctl_root(0, name, namelen, &req); + error = sysctl_root(0, name, namelen, &req, &Giant); if (req.lock == REQ_WIRED && req.validlen > 0) vsunlock(req.oldptr, req.validlen); - SYSCTL_UNLOCK(); - if (error && error != ENOMEM) return (error); @@ -1068,7 +1187,7 @@ return (0); if (req->lock == REQ_LOCKED) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, - "sysctl_old_user()"); + "sysctl_old_user()", &Giant); i = l; len = req->validlen; if (len <= origidx) @@ -1118,7 +1237,7 @@ if (req->lock == REQ_LOCKED && req->oldptr && req->oldfunc == sysctl_old_user) { if (wiredlen != 0) { - ret = vslock(req->oldptr, wiredlen); + ret = vslock(req->oldptr, wiredlen, &Giant); if (ret != 0) { if (ret != ENOMEM) return (ret); @@ -1131,14 +1250,21 @@ return (0); } +/* + * If succesful, the returned oid will be already owned. + */ int sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid, int *nindx, struct sysctl_req *req) { struct sysctl_oid *oid; + struct sysctl_oid_list *lsp = &sysctl__children; + struct sysctl_oid_list *parent; int indx; - oid = SLIST_FIRST(&sysctl__children); + sx_assert(&sysctl_sx, SX_LOCKED); + + oid = SLIST_FIRST(lsp); indx = 0; while (oid && indx < CTL_MAXNAME) { if (oid->oid_number == name[indx]) { @@ -1153,8 +1279,8 @@ *nindx = indx; return (0); } - oid = SLIST_FIRST( - (struct sysctl_oid_list *)oid->oid_arg1); + lsp = (struct sysctl_oid_list *)oid->oid_arg1; + oid = SLIST_FIRST(lsp); } else if (indx == namelen) { *noid = oid; if (nindx != NULL) @@ -1164,7 +1290,10 @@ return (ENOTDIR); } } else { + parent = oid->oid_parent; oid = SLIST_NEXT(oid, oid_link); + if (!oid) + return (ENOENT); } } return (ENOENT); @@ -1180,10 +1309,11 @@ { struct sysctl_oid *oid; int error, indx, lvl; - - error = sysctl_find_oid(arg1, arg2, &oid, &indx, req); + + SYSCTL_SLOCK(); + error = sysctl_find_oid(arg1, arg2, &oid, &indx, req, &Giant); if (error) - return (error); + goto done; if ((oid->oid_kind & CTLTYPE) == CTLTYPE_NODE) { /* @@ -1191,22 +1321,26 @@ * no handler. Inform the user that it's a node. * The indx may or may not be the same as namelen. */ - if (oid->oid_handler == NULL) - return (EISDIR); + if (oid->oid_handler == NULL) { + error = EISDIR; + goto done; + } } /* Is this sysctl writable? */ - if (req->newptr && !(oid->oid_kind & CTLFLAG_WR)) - return (EPERM); + if (req->newptr && !(oid->oid_kind & CTLFLAG_WR)) { + error = EPERM; + goto done; + } - KASSERT(req->td != NULL, ("sysctl_root(): req->td == NULL")); + KASSERT(req->td != NULL, ("sysctl_root(): req->td == NULL"), &Giant); /* Is this sysctl sensitive to securelevels? */ if (req->newptr && (oid->oid_kind & CTLFLAG_SECURE)) { lvl = (oid->oid_kind & CTLMASK_SECURE) >> CTLSHIFT_SECURE; error = securelevel_gt(req->td->td_ucred, lvl); if (error) - return (error); + goto done; } /* Is this sysctl writable by only privileged users? */ @@ -1219,11 +1353,13 @@ flags = 0; error = suser_cred(req->td->td_ucred, flags); if (error) - return (error); + goto done; } - if (!oid->oid_handler) - return EINVAL; + if (!oid->oid_handler) { + error = EINVAL; + goto done; + } if ((oid->oid_kind & CTLTYPE) == CTLTYPE_NODE) { arg1 = (int *)arg1 + indx; @@ -1236,10 +1372,17 @@ error = mac_check_system_sysctl(req->td->td_ucred, oid, arg1, arg2, req); if (error != 0) - return (error); + goto done; + #endif + if (oid->oid_mtx) + mtx_lock(oid->oid_mtx); error = oid->oid_handler(oid, arg1, arg2, req); + if (oid->oid_mtx) + mtx_unlock(oid->oid_mtx); +done: + SYSCTL_SUNLOCK(); return (error); } @@ -1270,8 +1413,6 @@ if (error) return (error); - mtx_lock(&Giant); - error = userland_sysctl(td, name, uap->namelen, uap->old, uap->oldlenp, 0, uap->new, uap->newlen, &j, 0); @@ -1283,7 +1424,6 @@ error = i; } done2: - mtx_unlock(&Giant); return (error); } @@ -1332,18 +1472,14 @@ req.newfunc = sysctl_new_user; req.lock = REQ_LOCKED; - SYSCTL_LOCK(); - do { req.oldidx = 0; req.newidx = 0; - error = sysctl_root(0, name, namelen, &req); + error = sysctl_root(0, name, namelen, &req, &Giant); } while (error == EAGAIN); if (req.lock == REQ_WIRED && req.validlen > 0) vsunlock(req.oldptr, req.validlen); - - SYSCTL_UNLOCK(); if (error && error != ENOMEM) return (error); Only in repl/kern: kern_sysctl.c.orig diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_tc.c repl/kern/kern_tc.c --- /home/refugee/freebsd/current/src/sys/kern/kern_tc.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_tc.c Tue Dec 14 00:49:41 2004 @@ -92,22 +92,22 @@ static struct bintime boottimebin; struct timeval boottime; -static int sysctl_kern_boottime(SYSCTL_HANDLER_ARGS); +static int sysctl_kern_boottime(SYSCTL_HANDLER_ARGS, &Giant); SYSCTL_PROC(_kern, KERN_BOOTTIME, boottime, CTLTYPE_STRUCT|CTLFLAG_RD, - NULL, 0, sysctl_kern_boottime, "S,timeval", "System boottime"); + NULL, 0, sysctl_kern_boottime, "S,timeval", "System boottime", &Giant); -SYSCTL_NODE(_kern, OID_AUTO, timecounter, CTLFLAG_RW, 0, ""); +SYSCTL_NODE(_kern, OID_AUTO, timecounter, CTLFLAG_RW, 0, "", NULL); static int timestepwarnings; SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW, - ×tepwarnings, 0, ""); + ×tepwarnings, 0, "", &Giant); #define TC_STATS(foo) \ static u_int foo; \ SYSCTL_UINT(_kern_timecounter, OID_AUTO, foo, CTLFLAG_RD, &foo, 0, "");\ struct __hack -TC_STATS(nbinuptime); TC_STATS(nnanouptime); TC_STATS(nmicrouptime); +TC_STATS(nbinuptime); TC_STATS(nnanouptime); TC_STATS(nmicrouptime, &Giant); TC_STATS(nbintime); TC_STATS(nnanotime); TC_STATS(nmicrotime); TC_STATS(ngetbinuptime); TC_STATS(ngetnanouptime); TC_STATS(ngetmicrouptime); TC_STATS(ngetbintime); TC_STATS(ngetnanotime); TC_STATS(ngetmicrotime); @@ -516,7 +516,7 @@ tc = timecounter; strlcpy(newname, tc->tc_name, sizeof(newname)); - error = sysctl_handle_string(oidp, &newname[0], sizeof(newname), req); + error = sysctl_handle_string(oidp, &newname[0], sizeof(newname), req, &Giant); if (error != 0 || req->newptr == NULL || strcmp(newname, tc->tc_name) == 0) return (error); @@ -535,7 +535,7 @@ } SYSCTL_PROC(_kern_timecounter, OID_AUTO, hardware, CTLTYPE_STRING | CTLFLAG_RW, - 0, 0, sysctl_kern_timecounter_hardware, "A", ""); + 0, 0, sysctl_kern_timecounter_hardware, "A", "", &Giant); /* Report or change the active timecounter hardware. */ @@ -558,7 +558,7 @@ } SYSCTL_PROC(_kern_timecounter, OID_AUTO, choice, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, sysctl_kern_timecounter_choice, "A", ""); + 0, 0, sysctl_kern_timecounter_choice, "A", "", &Giant); /* * RFC 2783 PPS-API implementation. @@ -743,7 +743,7 @@ */ static int tc_tick; -SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, ""); +SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, "", &Giant); void tc_ticktock(void) diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_thr.c repl/kern/kern_thr.c --- /home/refugee/freebsd/current/src/sys/kern/kern_thr.c Wed Dec 8 20:41:04 2004 +++ repl/kern/kern_thr.c Tue Dec 14 00:49:40 2004 @@ -51,11 +51,11 @@ SYSCTL_DECL(_kern_threads); static int thr_scope_sys = 0; SYSCTL_INT(_kern_threads, OID_AUTO, thr_scope_sys, CTLFLAG_RW, - &thr_scope_sys, 0, "sys or proc scope scheduling"); + &thr_scope_sys, 0, "sys or proc scope scheduling", &Giant); static int thr_concurrency = 0; SYSCTL_INT(_kern_threads, OID_AUTO, thr_concurrency, CTLFLAG_RW, - &thr_concurrency, 0, "a concurrency value if not default"); + &thr_concurrency, 0, "a concurrency value if not default", &Giant); /* * System call interface. diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_thread.c repl/kern/kern_thread.c --- /home/refugee/freebsd/current/src/sys/kern/kern_thread.c Sun Nov 21 00:03:32 2004 +++ repl/kern/kern_thread.c Tue Dec 14 00:49:40 2004 @@ -53,22 +53,22 @@ static uma_zone_t thread_zone; /* DEBUG ONLY */ -SYSCTL_NODE(_kern, OID_AUTO, threads, CTLFLAG_RW, 0, "thread allocation"); +SYSCTL_NODE(_kern, OID_AUTO, threads, CTLFLAG_RW, 0, "thread allocation", NULL); static int thread_debug = 0; SYSCTL_INT(_kern_threads, OID_AUTO, debug, CTLFLAG_RW, - &thread_debug, 0, "thread debug"); + &thread_debug, 0, "thread debug", &Giant); int max_threads_per_proc = 1500; SYSCTL_INT(_kern_threads, OID_AUTO, max_threads_per_proc, CTLFLAG_RW, - &max_threads_per_proc, 0, "Limit on threads per proc"); + &max_threads_per_proc, 0, "Limit on threads per proc", &Giant); int max_groups_per_proc = 1500; SYSCTL_INT(_kern_threads, OID_AUTO, max_groups_per_proc, CTLFLAG_RW, - &max_groups_per_proc, 0, "Limit on thread groups per proc"); + &max_groups_per_proc, 0, "Limit on thread groups per proc", &Giant); int max_threads_hits; SYSCTL_INT(_kern_threads, OID_AUTO, max_threads_hits, CTLFLAG_RD, - &max_threads_hits, 0, ""); + &max_threads_hits, 0, "", &Giant); int virtual_cpu; @@ -88,7 +88,7 @@ new_val = def_val; else new_val = virtual_cpu; - error = sysctl_handle_int(oidp, &new_val, 0, req); + error = sysctl_handle_int(oidp, &new_val, 0, req, &Giant); if (error != 0 || req->newptr == NULL) return (error); if (new_val < 0) @@ -100,7 +100,7 @@ /* DEBUG ONLY */ SYSCTL_PROC(_kern_threads, OID_AUTO, virtual_cpu, CTLTYPE_INT|CTLFLAG_RW, 0, sizeof(virtual_cpu), sysctl_kse_virtual_cpu, "I", - "debug virtual cpus"); + "debug virtual cpus", &Giant); /* * Thread ID allocator. The allocator keeps track of assigned IDs by diff -ur /home/refugee/freebsd/current/src/sys/kern/kern_timeout.c repl/kern/kern_timeout.c --- /home/refugee/freebsd/current/src/sys/kern/kern_timeout.c Sun Oct 31 04:50:26 2004 +++ repl/kern/kern_timeout.c Tue Dec 14 00:49:40 2004 @@ -49,13 +49,13 @@ static int avg_depth; SYSCTL_INT(_debug, OID_AUTO, to_avg_depth, CTLFLAG_RD, &avg_depth, 0, - "Average number of items examined per softclock call. Units = 1/1000"); + "Average number of items examined per softclock call. Units = 1/1000", &Giant); static int avg_gcalls; SYSCTL_INT(_debug, OID_AUTO, to_avg_gcalls, CTLFLAG_RD, &avg_gcalls, 0, - "Average number of Giant callouts made per softclock call. Units = 1/1000"); + "Average number of Giant callouts made per softclock call. Units = 1/1000", &Giant); static int avg_mpcalls; SYSCTL_INT(_debug, OID_AUTO, to_avg_mpcalls, CTLFLAG_RD, &avg_mpcalls, 0, - "Average number of MP callouts made per softclock call. Units = 1/1000"); + "Average number of MP callouts made per softclock call. Units = 1/1000", &Giant); /* * TODO: * allocate more timeout table slots when table overflows. diff -ur /home/refugee/freebsd/current/src/sys/kern/sched_4bsd.c repl/kern/sched_4bsd.c --- /home/refugee/freebsd/current/src/sys/kern/sched_4bsd.c Wed Dec 8 20:41:04 2004 +++ repl/kern/sched_4bsd.c Tue Dec 14 00:49:41 2004 @@ -211,7 +211,7 @@ int error, new_val; new_val = sched_quantum * tick; - error = sysctl_handle_int(oidp, &new_val, 0, req); + error = sysctl_handle_int(oidp, &new_val, 0, req, &Giant); if (error != 0 || req->newptr == NULL) return (error); if (new_val < tick) @@ -221,69 +221,69 @@ return (0); } -SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RD, 0, "Scheduler"); +SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RD, 0, "Scheduler", NULL); SYSCTL_STRING(_kern_sched, OID_AUTO, name, CTLFLAG_RD, "4BSD", 0, - "Scheduler name"); + "Scheduler name", &Giant); SYSCTL_PROC(_kern_sched, OID_AUTO, quantum, CTLTYPE_INT | CTLFLAG_RW, 0, sizeof sched_quantum, sysctl_kern_quantum, "I", - "Roundrobin scheduling quantum in microseconds"); + "Roundrobin scheduling quantum in microseconds", &Giant); #ifdef SMP /* Enable forwarding of wakeups to all other cpus */ -SYSCTL_NODE(_kern_sched, OID_AUTO, ipiwakeup, CTLFLAG_RD, NULL, "Kernel SMP"); +SYSCTL_NODE(_kern_sched, OID_AUTO, ipiwakeup, CTLFLAG_RD, NULL, "Kernel SMP", NULL); static int forward_wakeup_enabled = 1; SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, enabled, CTLFLAG_RW, &forward_wakeup_enabled, 0, - "Forwarding of wakeup to idle CPUs"); + "Forwarding of wakeup to idle CPUs", &Giant); static int forward_wakeups_requested = 0; SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, requested, CTLFLAG_RD, &forward_wakeups_requested, 0, - "Requests for Forwarding of wakeup to idle CPUs"); + "Requests for Forwarding of wakeup to idle CPUs", &Giant); static int forward_wakeups_delivered = 0; SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, delivered, CTLFLAG_RD, &forward_wakeups_delivered, 0, - "Completed Forwarding of wakeup to idle CPUs"); + "Completed Forwarding of wakeup to idle CPUs", &Giant); static int forward_wakeup_use_mask = 1; SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, usemask, CTLFLAG_RW, &forward_wakeup_use_mask, 0, - "Use the mask of idle cpus"); + "Use the mask of idle cpus", &Giant); static int forward_wakeup_use_loop = 0; SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, useloop, CTLFLAG_RW, &forward_wakeup_use_loop, 0, - "Use a loop to find idle cpus"); + "Use a loop to find idle cpus", &Giant); static int forward_wakeup_use_single = 0; SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, onecpu, CTLFLAG_RW, &forward_wakeup_use_single, 0, - "Only signal one idle cpu"); + "Only signal one idle cpu", &Giant); static int forward_wakeup_use_htt = 0; SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, htt2, CTLFLAG_RW, &forward_wakeup_use_htt, 0, - "account for htt"); + "account for htt", &Giant); #endif static int sched_followon = 0; SYSCTL_INT(_kern_sched, OID_AUTO, followon, CTLFLAG_RW, &sched_followon, 0, - "allow threads to share a quantum"); + "allow threads to share a quantum", &Giant); static int sched_pfollowons = 0; SYSCTL_INT(_kern_sched, OID_AUTO, pfollowons, CTLFLAG_RD, &sched_pfollowons, 0, - "number of followons done to a different ksegrp"); + "number of followons done to a different ksegrp", &Giant); static int sched_kgfollowons = 0; SYSCTL_INT(_kern_sched, OID_AUTO, kgfollowons, CTLFLAG_RD, &sched_kgfollowons, 0, - "number of followons done in a ksegrp"); + "number of followons done in a ksegrp", &Giant); /* * Arrange to reschedule if necessary, taking the priorities and @@ -389,7 +389,7 @@ /* decay 95% of `ke_pctcpu' in 60 seconds; see CCPU_SHIFT before changing */ static fixpt_t ccpu = 0.95122942450071400909 * FSCALE; /* exp(-1/20) */ -SYSCTL_INT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, "", &Giant); /* * If `ccpu' is not equal to `exp(-1/20)' and you still want to use the diff -ur /home/refugee/freebsd/current/src/sys/kern/sched_ule.c repl/kern/sched_ule.c --- /home/refugee/freebsd/current/src/sys/kern/sched_ule.c Sun Nov 14 03:56:24 2004 +++ repl/kern/sched_ule.c Tue Dec 14 00:49:40 2004 @@ -60,21 +60,21 @@ /* decay 95% of `p_pctcpu' in 60 seconds; see CCPU_SHIFT before changing */ /* XXX This is bogus compatability crap for ps */ static fixpt_t ccpu = 0.95122942450071400909 * FSCALE; /* exp(-1/20) */ -SYSCTL_INT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, "", &Giant); static void sched_setup(void *dummy); SYSINIT(sched_setup, SI_SUB_RUN_QUEUE, SI_ORDER_FIRST, sched_setup, NULL) -static SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RW, 0, "Scheduler"); +static SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RW, 0, "Scheduler", NULL); SYSCTL_STRING(_kern_sched, OID_AUTO, name, CTLFLAG_RD, "ule", 0, - "Scheduler name"); + "Scheduler name", &Giant); static int slice_min = 1; -SYSCTL_INT(_kern_sched, OID_AUTO, slice_min, CTLFLAG_RW, &slice_min, 0, ""); +SYSCTL_INT(_kern_sched, OID_AUTO, slice_min, CTLFLAG_RW, &slice_min, 0, "", &Giant); static int slice_max = 10; -SYSCTL_INT(_kern_sched, OID_AUTO, slice_max, CTLFLAG_RW, &slice_max, 0, ""); +SYSCTL_INT(_kern_sched, OID_AUTO, slice_max, CTLFLAG_RW, &slice_max, 0, "", &Giant); int realstathz; int tickincr = 1; diff -ur /home/refugee/freebsd/current/src/sys/kern/subr_bus.c repl/kern/subr_bus.c --- /home/refugee/freebsd/current/src/sys/kern/subr_bus.c Wed Dec 8 20:41:04 2004 +++ repl/kern/subr_bus.c Tue Dec 14 00:49:41 2004 @@ -56,8 +56,8 @@ #include -SYSCTL_NODE(_hw, OID_AUTO, bus, CTLFLAG_RW, NULL, NULL); -SYSCTL_NODE(, OID_AUTO, dev, CTLFLAG_RW, NULL, NULL); +SYSCTL_NODE(_hw, OID_AUTO, bus, CTLFLAG_RW, NULL, NULL, NULL); +SYSCTL_NODE(, OID_AUTO, dev, CTLFLAG_RW, NULL, NULL, NULL); /* * Used to attach drivers to devclasses. @@ -142,7 +142,7 @@ static int bus_debug = 1; TUNABLE_INT("bus.debug", &bus_debug); SYSCTL_INT(_debug, OID_AUTO, bus_debug, CTLFLAG_RW, &bus_debug, 0, - "Debug bus code"); + "Debug bus code", &Giant); #define PDEBUG(a) if (bus_debug) {printf("%s:%d: ", __func__, __LINE__), printf a; printf("\n");} #define DEVICENAME(d) ((d)? device_get_name(d): "no device") @@ -223,14 +223,14 @@ if (dc->sysctl_tree != NULL) return; - sysctl_ctx_init(&dc->sysctl_ctx); + sysctl_ctx_init(&dc->sysctl_ctx, &Giant); dc->sysctl_tree = SYSCTL_ADD_NODE(&dc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_dev), OID_AUTO, dc->name, - CTLFLAG_RD, 0, ""); + CTLFLAG_RD, 0, "", &Giant); SYSCTL_ADD_PROC(&dc->sysctl_ctx, SYSCTL_CHILDREN(dc->sysctl_tree), OID_AUTO, "%parent", CTLFLAG_RD, dc, DEVCLASS_SYSCTL_PARENT, devclass_sysctl_handler, "A", - "parent class"); + "parent class", &Giant); } enum { @@ -258,11 +258,11 @@ value = dev->driver ? dev->driver->name : ""; break; case DEVICE_SYSCTL_LOCATION: - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); + value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO, &Giant); bus_child_location_str(dev, buf, 1024); break; case DEVICE_SYSCTL_PNPINFO: - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); + value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO, &Giant); bus_child_pnpinfo_str(dev, buf, 1024); break; case DEVICE_SYSCTL_PARENT: @@ -284,32 +284,32 @@ if (dev->sysctl_tree != NULL) return; - devclass_sysctl_init(dc); - sysctl_ctx_init(&dev->sysctl_ctx); + devclass_sysctl_init(dc, &Giant); + sysctl_ctx_init(&dev->sysctl_ctx, &Giant); dev->sysctl_tree = SYSCTL_ADD_NODE(&dev->sysctl_ctx, SYSCTL_CHILDREN(dc->sysctl_tree), OID_AUTO, dev->nameunit + strlen(dc->name), - CTLFLAG_RD, 0, ""); + CTLFLAG_RD, 0, "", &Giant); SYSCTL_ADD_PROC(&dev->sysctl_ctx, SYSCTL_CHILDREN(dev->sysctl_tree), OID_AUTO, "%desc", CTLFLAG_RD, dev, DEVICE_SYSCTL_DESC, device_sysctl_handler, "A", - "device description"); + "device description", &Giant); SYSCTL_ADD_PROC(&dev->sysctl_ctx, SYSCTL_CHILDREN(dev->sysctl_tree), OID_AUTO, "%driver", CTLFLAG_RD, dev, DEVICE_SYSCTL_DRIVER, device_sysctl_handler, "A", - "device driver name"); + "device driver name", &Giant); SYSCTL_ADD_PROC(&dev->sysctl_ctx, SYSCTL_CHILDREN(dev->sysctl_tree), OID_AUTO, "%location", CTLFLAG_RD, dev, DEVICE_SYSCTL_LOCATION, device_sysctl_handler, "A", - "device location relative to parent"); + "device location relative to parent", &Giant); SYSCTL_ADD_PROC(&dev->sysctl_ctx, SYSCTL_CHILDREN(dev->sysctl_tree), OID_AUTO, "%pnpinfo", CTLFLAG_RD, dev, DEVICE_SYSCTL_PNPINFO, device_sysctl_handler, "A", - "device identification"); + "device identification", &Giant); SYSCTL_ADD_PROC(&dev->sysctl_ctx, SYSCTL_CHILDREN(dev->sysctl_tree), OID_AUTO, "%parent", CTLFLAG_RD, dev, DEVICE_SYSCTL_PARENT, device_sysctl_handler, "A", - "parent device"); + "parent device", &Giant); } static void @@ -317,7 +317,7 @@ { if (dev->sysctl_tree == NULL) return; - sysctl_ctx_free(&dev->sysctl_ctx); + sysctl_ctx_free(&dev->sysctl_ctx, &Giant); dev->sysctl_tree = NULL; } @@ -342,11 +342,11 @@ * tested since 3.4 or 2.2.8! */ -static int sysctl_devctl_disable(SYSCTL_HANDLER_ARGS); +static int sysctl_devctl_disable(SYSCTL_HANDLER_ARGS, &Giant); static int devctl_disable = 0; TUNABLE_INT("hw.bus.devctl_disable", &devctl_disable); SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_disable, CTLTYPE_INT | CTLFLAG_RW, 0, 0, - sysctl_devctl_disable, "I", "devctl disable"); + sysctl_devctl_disable, "I", "devctl disable", &Giant); static d_open_t devopen; static d_close_t devclose; @@ -707,7 +707,7 @@ int dis, error; dis = devctl_disable; - error = sysctl_handle_int(oidp, &dis, 0, req); + error = sysctl_handle_int(oidp, &dis, 0, req, &Giant); if (error || !req->newptr) return (error); mtx_lock(&devsoftc.mtx); @@ -1152,13 +1152,13 @@ struct sysctl_ctx_list * devclass_get_sysctl_ctx(devclass_t dc) { - return (&dc->sysctl_ctx); + return (&dc->sysctl_ctx, &Giant); } struct sysctl_oid * devclass_get_sysctl_tree(devclass_t dc) { - return (dc->sysctl_tree); + return (dc->sysctl_tree, &Giant); } /** @@ -1821,13 +1821,13 @@ struct sysctl_ctx_list * device_get_sysctl_ctx(device_t dev) { - return (&dev->sysctl_ctx); + return (&dev->sysctl_ctx, &Giant); } struct sysctl_oid * device_get_sysctl_tree(device_t dev) { - return (dev->sysctl_tree); + return (dev->sysctl_tree, &Giant); } /** @@ -2247,7 +2247,7 @@ { int error; - device_sysctl_init(dev); + device_sysctl_init(dev, &Giant); if (!device_is_quiet(dev)) device_print_child(dev->parent, dev); if ((error = DEVICE_ATTACH(dev)) != 0) { @@ -2257,7 +2257,7 @@ if (dev->devclass == 0) device_set_devclass(dev, 0); device_set_driver(dev, NULL); - device_sysctl_fini(dev); + device_sysctl_fini(dev, &Giant); dev->state = DS_NOTPRESENT; return (error); } @@ -2308,7 +2308,7 @@ dev->state = DS_NOTPRESENT; device_set_driver(dev, NULL); device_set_desc(dev, NULL); - device_sysctl_fini(dev); + device_sysctl_fini(dev, &Giant); return (0); } diff -ur /home/refugee/freebsd/current/src/sys/kern/subr_clock.c repl/kern/subr_clock.c --- /home/refugee/freebsd/current/src/sys/kern/subr_clock.c Sun Oct 31 04:50:26 2004 +++ repl/kern/subr_clock.c Tue Dec 14 00:49:41 2004 @@ -70,7 +70,7 @@ #include "clock_if.h" static __inline int leapyear(int year); -static int sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS); +static int sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS, &Giant); #define FEBRUARY 2 #define days_in_year(y) (leapyear(y) ? 366 : 365) @@ -95,20 +95,20 @@ * kern. */ SYSCTL_PROC(_machdep, CPU_ADJKERNTZ, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", ""); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "", &Giant); SYSCTL_INT(_machdep, CPU_DISRTCSET, disable_rtc_set, - CTLFLAG_RW, &disable_rtc_set, 0, ""); + CTLFLAG_RW, &disable_rtc_set, 0, "", &Giant); SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, - CTLFLAG_RW, &wall_cmos_clock, 0, ""); + CTLFLAG_RW, &wall_cmos_clock, 0, "", &Giant); static int sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS) { int error; error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, - req); + req, &Giant); if (!error && req->newptr) resettodr(); return (error); diff -ur /home/refugee/freebsd/current/src/sys/kern/subr_devstat.c repl/kern/subr_devstat.c --- /home/refugee/freebsd/current/src/sys/kern/subr_devstat.c Sun Oct 31 04:50:26 2004 +++ repl/kern/subr_devstat.c Tue Dec 14 00:49:40 2004 @@ -411,20 +411,20 @@ * Sysctl entries for devstat. The first one is a node that all the rest * hang off of. */ -SYSCTL_NODE(_kern, OID_AUTO, devstat, CTLFLAG_RD, 0, "Device Statistics"); +SYSCTL_NODE(_kern, OID_AUTO, devstat, CTLFLAG_RD, 0, "Device Statistics", NULL); SYSCTL_PROC(_kern_devstat, OID_AUTO, all, CTLFLAG_RD|CTLTYPE_OPAQUE, - 0, 0, sysctl_devstat, "S,devstat", "All devices in the devstat list"); + 0, 0, sysctl_devstat, "S,devstat", "All devices in the devstat list", &Giant); /* * Export the number of devices in the system so that userland utilities * can determine how much memory to allocate to hold all the devices. */ SYSCTL_INT(_kern_devstat, OID_AUTO, numdevs, CTLFLAG_RD, - &devstat_num_devs, 0, "Number of devices in the devstat list"); + &devstat_num_devs, 0, "Number of devices in the devstat list", &Giant); SYSCTL_LONG(_kern_devstat, OID_AUTO, generation, CTLFLAG_RD, - &devstat_generation, 0, "Devstat list generation"); + &devstat_generation, 0, "Devstat list generation", &Giant); SYSCTL_INT(_kern_devstat, OID_AUTO, version, CTLFLAG_RD, - &devstat_version, 0, "Devstat list version number"); + &devstat_version, 0, "Devstat list version number", &Giant); /* * Allocator for struct devstat structures. We sub-allocate these from pages @@ -538,4 +538,4 @@ } SYSCTL_INT(_debug_sizeof, OID_AUTO, devstat, CTLFLAG_RD, - 0, sizeof(struct devstat), "sizeof(struct devstat)"); + 0, sizeof(struct devstat), "sizeof(struct devstat)", &Giant); diff -ur /home/refugee/freebsd/current/src/sys/kern/subr_kdb.c repl/kern/subr_kdb.c --- /home/refugee/freebsd/current/src/sys/kern/subr_kdb.c Sun Oct 31 04:50:26 2004 +++ repl/kern/subr_kdb.c Tue Dec 14 00:49:40 2004 @@ -51,20 +51,20 @@ KDB_BACKEND(null, NULL, NULL, NULL); SET_DECLARE(kdb_dbbe_set, struct kdb_dbbe); -static int kdb_sysctl_available(SYSCTL_HANDLER_ARGS); -static int kdb_sysctl_current(SYSCTL_HANDLER_ARGS); -static int kdb_sysctl_enter(SYSCTL_HANDLER_ARGS); +static int kdb_sysctl_available(SYSCTL_HANDLER_ARGS, &Giant); +static int kdb_sysctl_current(SYSCTL_HANDLER_ARGS, &Giant); +static int kdb_sysctl_enter(SYSCTL_HANDLER_ARGS, &Giant); -SYSCTL_NODE(_debug, OID_AUTO, kdb, CTLFLAG_RW, NULL, "KDB nodes"); +SYSCTL_NODE(_debug, OID_AUTO, kdb, CTLFLAG_RW, NULL, "KDB nodes", NULL); SYSCTL_PROC(_debug_kdb, OID_AUTO, available, CTLTYPE_STRING | CTLFLAG_RD, 0, 0, - kdb_sysctl_available, "A", "list of available KDB backends"); + kdb_sysctl_available, "A", "list of available KDB backends", &Giant); SYSCTL_PROC(_debug_kdb, OID_AUTO, current, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, - kdb_sysctl_current, "A", "currently selected KDB backend"); + kdb_sysctl_current, "A", "currently selected KDB backend", &Giant); SYSCTL_PROC(_debug_kdb, OID_AUTO, enter, CTLTYPE_INT | CTLFLAG_RW, 0, 0, - kdb_sysctl_enter, "I", "set to enter the debugger"); + kdb_sysctl_enter, "I", "set to enter the debugger", &Giant); /* * Flag indicating whether or not to IPI the other CPUs to stop them on @@ -75,7 +75,7 @@ #ifdef SMP static int kdb_stop_cpus = 1; SYSCTL_INT(_debug_kdb, OID_AUTO, stop_cpus, CTLTYPE_INT | CTLFLAG_RW, - &kdb_stop_cpus, 0, ""); + &kdb_stop_cpus, 0, "", &Giant); TUNABLE_INT("debug.kdb.stop_cpus", &kdb_stop_cpus); #endif @@ -107,7 +107,7 @@ } } KASSERT(sz >= 0, ("%s", __func__)); - error = sysctl_handle_string(oidp, avail, 0, req); + error = sysctl_handle_string(oidp, avail, 0, req, &Giant); free(avail, M_TEMP); return (error); } @@ -123,7 +123,7 @@ buf[sizeof(buf) - 1] = '\0'; } else *buf = '\0'; - error = sysctl_handle_string(oidp, buf, sizeof(buf), req); + error = sysctl_handle_string(oidp, buf, sizeof(buf), req, &Giant); if (error != 0 || req->newptr == NULL) return (error); if (kdb_active) @@ -136,10 +136,10 @@ { int error, i; - error = sysctl_wire_old_buffer(req, sizeof(int)); + error = sysctl_wire_old_buffer(req, sizeof(int), &Giant); if (error == 0) { i = 0; - error = sysctl_handle_int(oidp, &i, 0, req); + error = sysctl_handle_int(oidp, &i, 0, req, &Giant); } if (error != 0 || req->newptr == NULL) return (error); diff -ur /home/refugee/freebsd/current/src/sys/kern/subr_kobj.c repl/kern/subr_kobj.c --- /home/refugee/freebsd/current/src/sys/kern/subr_kobj.c Sun Oct 31 04:50:26 2004 +++ repl/kern/subr_kobj.c Tue Dec 14 00:49:40 2004 @@ -50,9 +50,9 @@ u_int kobj_lookup_misses; SYSCTL_UINT(_kern, OID_AUTO, kobj_hits, CTLFLAG_RD, - &kobj_lookup_hits, 0, ""); + &kobj_lookup_hits, 0, "", &Giant); SYSCTL_UINT(_kern, OID_AUTO, kobj_misses, CTLFLAG_RD, - &kobj_lookup_misses, 0, ""); + &kobj_lookup_misses, 0, "", &Giant); #endif @@ -60,7 +60,7 @@ static int kobj_next_id = 1; SYSCTL_UINT(_kern, OID_AUTO, kobj_methodcount, CTLFLAG_RD, - &kobj_next_id, 0, ""); + &kobj_next_id, 0, "", &Giant); static void kobj_init_mutex(void *arg) diff -ur /home/refugee/freebsd/current/src/sys/kern/subr_log.c repl/kern/subr_log.c --- /home/refugee/freebsd/current/src/sys/kern/subr_log.c Sun Oct 31 04:50:26 2004 +++ repl/kern/subr_log.c Tue Dec 14 00:49:40 2004 @@ -88,7 +88,7 @@ /* Times per second to check for a pending syslog wakeup. */ static int log_wakeups_per_second = 5; SYSCTL_INT(_kern, OID_AUTO, log_wakeups_per_second, CTLFLAG_RW, - &log_wakeups_per_second, 0, ""); + &log_wakeups_per_second, 0, "", &Giant); /*ARGSUSED*/ static int diff -ur /home/refugee/freebsd/current/src/sys/kern/subr_prf.c repl/kern/subr_prf.c --- /home/refugee/freebsd/current/src/sys/kern/subr_prf.c Sun Oct 31 04:50:26 2004 +++ repl/kern/subr_prf.c Tue Dec 14 00:49:42 2004 @@ -98,12 +98,12 @@ static int log_console_output = 1; TUNABLE_INT("kern.log_console_output", &log_console_output); SYSCTL_INT(_kern, OID_AUTO, log_console_output, CTLFLAG_RW, - &log_console_output, 0, "Duplicate console output to the syslog."); + &log_console_output, 0, "Duplicate console output to the syslog.", &Giant); static int always_console_output = 0; TUNABLE_INT("kern.always_console_output", &always_console_output); SYSCTL_INT(_kern, OID_AUTO, always_console_output, CTLFLAG_RW, - &always_console_output, 0, "Always output to console despite TIOCCONS."); + &always_console_output, 0, "Always output to console despite TIOCCONS.", &Giant); /* * Warn that a system table is full. @@ -845,7 +845,7 @@ static int unprivileged_read_msgbuf = 1; SYSCTL_INT(_security_bsd, OID_AUTO, unprivileged_read_msgbuf, CTLFLAG_RW, &unprivileged_read_msgbuf, 0, - "Unprivileged processes may read the kernel message buffer"); + "Unprivileged processes may read the kernel message buffer", &Giant); /* Sysctls for accessing/clearing the msgbuf */ static int @@ -864,7 +864,7 @@ /* Read the whole buffer, one chunk at a time. */ msgbuf_peekbytes(msgbufp, NULL, 0, &seq); while ((len = msgbuf_peekbytes(msgbufp, buf, sizeof(buf), &seq)) > 0) { - error = sysctl_handle_opaque(oidp, buf, len, req); + error = sysctl_handle_opaque(oidp, buf, len, req, &Giant); if (error) return (error); } @@ -872,7 +872,7 @@ } SYSCTL_PROC(_kern, OID_AUTO, msgbuf, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, sysctl_kern_msgbuf, "A", "Contents of kernel message buffer"); + 0, 0, sysctl_kern_msgbuf, "A", "Contents of kernel message buffer", &Giant); static int msgbuf_clearflag; @@ -880,7 +880,7 @@ sysctl_kern_msgbuf_clear(SYSCTL_HANDLER_ARGS) { int error; - error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); + error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req, &Giant); if (!error && req->newptr) { msgbuf_clear(msgbufp); msgbuf_clearflag = 0; @@ -890,7 +890,7 @@ SYSCTL_PROC(_kern, OID_AUTO, msgbuf_clear, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE, &msgbuf_clearflag, 0, - sysctl_kern_msgbuf_clear, "I", "Clear kernel message buffer"); + sysctl_kern_msgbuf_clear, "I", "Clear kernel message buffer", &Giant); #ifdef DDB diff -ur /home/refugee/freebsd/current/src/sys/kern/subr_prof.c repl/kern/subr_prof.c --- /home/refugee/freebsd/current/src/sys/kern/subr_prof.c Sun Oct 31 04:50:26 2004 +++ repl/kern/subr_prof.c Tue Dec 14 00:49:41 2004 @@ -337,7 +337,7 @@ switch (name[0]) { case GPROF_STATE: state = gp->state; - error = sysctl_handle_int(oidp, &state, 0, req); + error = sysctl_handle_int(oidp, &state, 0, req, &Giant); if (error) return (error); if (!req->newptr) @@ -370,22 +370,22 @@ return (0); case GPROF_COUNT: return (sysctl_handle_opaque(oidp, - gp->kcount, gp->kcountsize, req)); + gp->kcount, gp->kcountsize, req), &Giant); case GPROF_FROMS: return (sysctl_handle_opaque(oidp, - gp->froms, gp->fromssize, req)); + gp->froms, gp->fromssize, req), &Giant); case GPROF_TOS: return (sysctl_handle_opaque(oidp, - gp->tos, gp->tossize, req)); + gp->tos, gp->tossize, req), &Giant); case GPROF_GMONPARAM: - return (sysctl_handle_opaque(oidp, gp, sizeof *gp, req)); + return (sysctl_handle_opaque(oidp, gp, sizeof *gp, req), &Giant); default: return (EOPNOTSUPP); } /* NOTREACHED */ } -SYSCTL_NODE(_kern, KERN_PROF, prof, CTLFLAG_RW, sysctl_kern_prof, ""); +SYSCTL_NODE(_kern, KERN_PROF, prof, CTLFLAG_RW, sysctl_kern_prof, "", NULL); #endif /* GPROF */ /* diff -ur /home/refugee/freebsd/current/src/sys/kern/subr_rman.c repl/kern/subr_rman.c --- /home/refugee/freebsd/current/src/sys/kern/subr_rman.c Sun Oct 31 04:50:26 2004 +++ repl/kern/subr_rman.c Tue Dec 14 00:49:40 2004 @@ -73,7 +73,7 @@ int rman_debug = 0; TUNABLE_INT("debug.rman_debug", &rman_debug); SYSCTL_INT(_debug, OID_AUTO, rman_debug, CTLFLAG_RW, - &rman_debug, 0, "rman debug"); + &rman_debug, 0, "rman debug", &Giant); #define DPRINTF(params) if (rman_debug) printf params diff -ur /home/refugee/freebsd/current/src/sys/kern/subr_sleepqueue.c repl/kern/subr_sleepqueue.c --- /home/refugee/freebsd/current/src/sys/kern/subr_sleepqueue.c Sun Nov 14 03:56:28 2004 +++ repl/kern/subr_sleepqueue.c Tue Dec 14 00:49:41 2004 @@ -130,11 +130,11 @@ #ifdef SLEEPQUEUE_PROFILING u_int sleepq_max_depth; -SYSCTL_NODE(_debug, OID_AUTO, sleepq, CTLFLAG_RD, 0, "sleepq profiling"); +SYSCTL_NODE(_debug, OID_AUTO, sleepq, CTLFLAG_RD, 0, "sleepq profiling", NULL); SYSCTL_NODE(_debug_sleepq, OID_AUTO, chains, CTLFLAG_RD, 0, "sleepq chain stats"); SYSCTL_UINT(_debug_sleepq, OID_AUTO, max_depth, CTLFLAG_RD, &sleepq_max_depth, - 0, "maxmimum depth achieved of a single chain"); + 0, "maxmimum depth achieved of a single chain", &Giant); #endif static struct sleepqueue_chain sleepq_chains[SC_TABLESIZE]; @@ -170,12 +170,12 @@ snprintf(chain_name, sizeof(chain_name), "%d", i); chain_oid = SYSCTL_ADD_NODE(NULL, SYSCTL_STATIC_CHILDREN(_debug_sleepq_chains), OID_AUTO, - chain_name, CTLFLAG_RD, NULL, "sleepq chain stats"); + chain_name, CTLFLAG_RD, NULL, "sleepq chain stats", &Giant); SYSCTL_ADD_UINT(NULL, SYSCTL_CHILDREN(chain_oid), OID_AUTO, - "depth", CTLFLAG_RD, &sleepq_chains[i].sc_depth, 0, NULL); + "depth", CTLFLAG_RD, &sleepq_chains[i].sc_depth, 0, NULL, &Giant); SYSCTL_ADD_UINT(NULL, SYSCTL_CHILDREN(chain_oid), OID_AUTO, "max_depth", CTLFLAG_RD, &sleepq_chains[i].sc_max_depth, 0, - NULL); + NULL, &Giant); #endif } thread0.td_sleepqueue = sleepq_alloc(); diff -ur /home/refugee/freebsd/current/src/sys/kern/subr_smp.c repl/kern/subr_smp.c --- /home/refugee/freebsd/current/src/sys/kern/subr_smp.c Sun Oct 31 04:50:26 2004 +++ repl/kern/subr_smp.c Tue Dec 14 00:49:40 2004 @@ -71,36 +71,36 @@ volatile int smp_started; u_int mp_maxid; -SYSCTL_NODE(_kern, OID_AUTO, smp, CTLFLAG_RD, NULL, "Kernel SMP"); +SYSCTL_NODE(_kern, OID_AUTO, smp, CTLFLAG_RD, NULL, "Kernel SMP", NULL); SYSCTL_INT(_kern_smp, OID_AUTO, maxcpus, CTLFLAG_RD, &mp_maxcpus, 0, - "Max number of CPUs that the system was compiled for."); + "Max number of CPUs that the system was compiled for.", &Giant); int smp_active = 0; /* are the APs allowed to run? */ SYSCTL_INT(_kern_smp, OID_AUTO, active, CTLFLAG_RW, &smp_active, 0, - "Number of Auxillary Processors (APs) that were successfully started"); + "Number of Auxillary Processors (APs) that were successfully started", &Giant); int smp_disabled = 0; /* has smp been disabled? */ SYSCTL_INT(_kern_smp, OID_AUTO, disabled, CTLFLAG_RDTUN, &smp_disabled, 0, - "SMP has been disabled from the loader"); + "SMP has been disabled from the loader", &Giant); TUNABLE_INT("kern.smp.disabled", &smp_disabled); int smp_cpus = 1; /* how many cpu's running */ SYSCTL_INT(_kern_smp, OID_AUTO, cpus, CTLFLAG_RD, &smp_cpus, 0, - "Number of CPUs online"); + "Number of CPUs online", &Giant); #ifdef SMP /* Enable forwarding of a signal to a process running on a different CPU */ static int forward_signal_enabled = 1; SYSCTL_INT(_kern_smp, OID_AUTO, forward_signal_enabled, CTLFLAG_RW, &forward_signal_enabled, 0, - "Forwarding of a signal to a process on a different CPU"); + "Forwarding of a signal to a process on a different CPU", &Giant); /* Enable forwarding of roundrobin to all other cpus */ static int forward_roundrobin_enabled = 1; SYSCTL_INT(_kern_smp, OID_AUTO, forward_roundrobin_enabled, CTLFLAG_RW, &forward_roundrobin_enabled, 0, - "Forwarding of roundrobin to all other CPUs"); + "Forwarding of roundrobin to all other CPUs", &Giant); /* Variables needed for SMP rendezvous. */ static void (*smp_rv_setup_func)(void *arg); diff -ur /home/refugee/freebsd/current/src/sys/kern/subr_turnstile.c repl/kern/subr_turnstile.c --- /home/refugee/freebsd/current/src/sys/kern/subr_turnstile.c Sun Oct 31 04:50:26 2004 +++ repl/kern/subr_turnstile.c Tue Dec 14 00:49:40 2004 @@ -127,11 +127,11 @@ #ifdef TURNSTILE_PROFILING u_int turnstile_max_depth; -SYSCTL_NODE(_debug, OID_AUTO, turnstile, CTLFLAG_RD, 0, "turnstile profiling"); +SYSCTL_NODE(_debug, OID_AUTO, turnstile, CTLFLAG_RD, 0, "turnstile profiling", NULL); SYSCTL_NODE(_debug_turnstile, OID_AUTO, chains, CTLFLAG_RD, 0, "turnstile chain stats"); SYSCTL_UINT(_debug_turnstile, OID_AUTO, max_depth, CTLFLAG_RD, - &turnstile_max_depth, 0, "maxmimum depth achieved of a single chain"); + &turnstile_max_depth, 0, "maxmimum depth achieved of a single chain", &Giant); #endif static struct mtx td_contested_lock; static struct turnstile_chain turnstile_chains[TC_TABLESIZE]; @@ -333,13 +333,13 @@ snprintf(chain_name, sizeof(chain_name), "%d", i); chain_oid = SYSCTL_ADD_NODE(NULL, SYSCTL_STATIC_CHILDREN(_debug_turnstile_chains), OID_AUTO, - chain_name, CTLFLAG_RD, NULL, "turnstile chain stats"); + chain_name, CTLFLAG_RD, NULL, "turnstile chain stats", &Giant); SYSCTL_ADD_UINT(NULL, SYSCTL_CHILDREN(chain_oid), OID_AUTO, "depth", CTLFLAG_RD, &turnstile_chains[i].tc_depth, 0, - NULL); + NULL, &Giant); SYSCTL_ADD_UINT(NULL, SYSCTL_CHILDREN(chain_oid), OID_AUTO, "max_depth", CTLFLAG_RD, &turnstile_chains[i].tc_max_depth, - 0, NULL); + 0, NULL, &Giant); } } SYSINIT(turnstile_profiling, SI_SUB_LOCK, SI_ORDER_ANY, diff -ur /home/refugee/freebsd/current/src/sys/kern/subr_witness.c repl/kern/subr_witness.c --- /home/refugee/freebsd/current/src/sys/kern/subr_witness.c Sun Nov 14 03:56:28 2004 +++ repl/kern/subr_witness.c Tue Dec 14 00:49:42 2004 @@ -169,7 +169,7 @@ static void removechild(struct witness *parent, struct witness *child); static int reparentchildren(struct witness *newparent, struct witness *oldparent); -static int sysctl_debug_witness_watch(SYSCTL_HANDLER_ARGS); +static int sysctl_debug_witness_watch(SYSCTL_HANDLER_ARGS, &Giant); static void witness_displaydescendants(void(*)(const char *fmt, ...), struct witness *, int indent); static const char *fixup_filename(const char *file); @@ -192,7 +192,7 @@ #endif MALLOC_DEFINE(M_WITNESS, "witness", "witness structure"); -SYSCTL_NODE(_debug, OID_AUTO, witness, CTLFLAG_RW, 0, "Witness Locking"); +SYSCTL_NODE(_debug, OID_AUTO, witness, CTLFLAG_RW, 0, "Witness Locking", NULL); /* * If set to 0, witness is disabled. If set to 1, witness performs full lock @@ -206,7 +206,7 @@ static int witness_watch = 1; TUNABLE_INT("debug.witness.watch", &witness_watch); SYSCTL_PROC(_debug_witness, OID_AUTO, watch, CTLFLAG_RW | CTLTYPE_INT, NULL, 0, - sysctl_debug_witness_watch, "I", "witness is watching lock operations"); + sysctl_debug_witness_watch, "I", "witness is watching lock operations", &Giant); #ifdef KDB /* @@ -221,7 +221,7 @@ int witness_kdb = 0; #endif TUNABLE_INT("debug.witness.kdb", &witness_kdb); -SYSCTL_INT(_debug_witness, OID_AUTO, kdb, CTLFLAG_RW, &witness_kdb, 0, ""); +SYSCTL_INT(_debug_witness, OID_AUTO, kdb, CTLFLAG_RW, &witness_kdb, 0, "", &Giant); /* * When KDB is enabled and witness_trace is set to 1, it will cause the system @@ -231,7 +231,7 @@ */ int witness_trace = 1; TUNABLE_INT("debug.witness.trace", &witness_trace); -SYSCTL_INT(_debug_witness, OID_AUTO, trace, CTLFLAG_RW, &witness_trace, 0, ""); +SYSCTL_INT(_debug_witness, OID_AUTO, trace, CTLFLAG_RW, &witness_trace, 0, "", &Giant); #endif /* KDB */ #ifdef WITNESS_SKIPSPIN @@ -241,7 +241,7 @@ #endif TUNABLE_INT("debug.witness.skipspin", &witness_skipspin); SYSCTL_INT(_debug_witness, OID_AUTO, skipspin, CTLFLAG_RDTUN, - &witness_skipspin, 0, ""); + &witness_skipspin, 0, "", &Giant); static struct mtx w_mtx; static struct witness_list w_free = STAILQ_HEAD_INITIALIZER(w_free); @@ -485,7 +485,7 @@ int error, value; value = witness_watch; - error = sysctl_handle_int(oidp, &value, 0, req); + error = sysctl_handle_int(oidp, &value, 0, req, &Giant); if (error != 0 || req->newptr == NULL) return (error); error = suser(req->td); diff -ur /home/refugee/freebsd/current/src/sys/kern/sys_generic.c repl/kern/sys_generic.c --- /home/refugee/freebsd/current/src/sys/kern/sys_generic.c Sun Nov 21 00:03:32 2004 +++ repl/kern/sys_generic.c Tue Dec 14 00:49:41 2004 @@ -564,7 +564,7 @@ struct mtx sellock; struct cv selwait; u_int nselcoll; /* Select collisions since boot */ -SYSCTL_UINT(_kern, OID_AUTO, nselcoll, CTLFLAG_RD, &nselcoll, 0, ""); +SYSCTL_UINT(_kern, OID_AUTO, nselcoll, CTLFLAG_RD, &nselcoll, 0, "", &Giant); /* * Select system call. diff -ur /home/refugee/freebsd/current/src/sys/kern/sys_pipe.c repl/kern/sys_pipe.c --- /home/refugee/freebsd/current/src/sys/kern/sys_pipe.c Wed Dec 8 20:41:04 2004 +++ repl/kern/sys_pipe.c Tue Dec 14 00:49:41 2004 @@ -184,19 +184,19 @@ SYSCTL_DECL(_kern_ipc); SYSCTL_INT(_kern_ipc, OID_AUTO, maxpipekva, CTLFLAG_RDTUN, - &maxpipekva, 0, "Pipe KVA limit"); + &maxpipekva, 0, "Pipe KVA limit", &Giant); SYSCTL_INT(_kern_ipc, OID_AUTO, pipes, CTLFLAG_RD, - &amountpipes, 0, "Current # of pipes"); + &amountpipes, 0, "Current # of pipes", &Giant); SYSCTL_INT(_kern_ipc, OID_AUTO, pipekva, CTLFLAG_RD, - &amountpipekva, 0, "Pipe KVA usage"); + &amountpipekva, 0, "Pipe KVA usage", &Giant); SYSCTL_INT(_kern_ipc, OID_AUTO, pipefragretry, CTLFLAG_RD, - &pipefragretry, 0, "Pipe allocation retries due to fragmentation"); + &pipefragretry, 0, "Pipe allocation retries due to fragmentation", &Giant); SYSCTL_INT(_kern_ipc, OID_AUTO, pipeallocfail, CTLFLAG_RD, - &pipeallocfail, 0, "Pipe allocation failures"); + &pipeallocfail, 0, "Pipe allocation failures", &Giant); SYSCTL_INT(_kern_ipc, OID_AUTO, piperesizefail, CTLFLAG_RD, - &piperesizefail, 0, "Pipe resize failures"); + &piperesizefail, 0, "Pipe resize failures", &Giant); SYSCTL_INT(_kern_ipc, OID_AUTO, piperesizeallowed, CTLFLAG_RW, - &piperesizeallowed, 0, "Pipe resizing allowed"); + &piperesizeallowed, 0, "Pipe resizing allowed", &Giant); static void pipeinit(void *dummy __unused); static void pipeclose(struct pipe *cpipe); diff -ur /home/refugee/freebsd/current/src/sys/kern/sysv_msg.c repl/kern/sysv_msg.c --- /home/refugee/freebsd/current/src/sys/kern/sysv_msg.c Sun Nov 14 03:56:28 2004 +++ repl/kern/sysv_msg.c Tue Dec 14 00:49:40 2004 @@ -1130,15 +1130,15 @@ { return (SYSCTL_OUT(req, msqids, - sizeof(struct msqid_kernel) * msginfo.msgmni)); + sizeof(struct msqid_kernel) * msginfo.msgmni), &Giant); } SYSCTL_DECL(_kern_ipc); -SYSCTL_INT(_kern_ipc, OID_AUTO, msgmax, CTLFLAG_RD, &msginfo.msgmax, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, msgmni, CTLFLAG_RDTUN, &msginfo.msgmni, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, msgmnb, CTLFLAG_RD, &msginfo.msgmnb, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, msgtql, CTLFLAG_RD, &msginfo.msgtql, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, msgssz, CTLFLAG_RDTUN, &msginfo.msgssz, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, msgseg, CTLFLAG_RDTUN, &msginfo.msgseg, 0, ""); +SYSCTL_INT(_kern_ipc, OID_AUTO, msgmax, CTLFLAG_RD, &msginfo.msgmax, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, msgmni, CTLFLAG_RDTUN, &msginfo.msgmni, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, msgmnb, CTLFLAG_RD, &msginfo.msgmnb, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, msgtql, CTLFLAG_RD, &msginfo.msgtql, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, msgssz, CTLFLAG_RDTUN, &msginfo.msgssz, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, msgseg, CTLFLAG_RDTUN, &msginfo.msgseg, 0, "", &Giant); SYSCTL_PROC(_kern_ipc, OID_AUTO, msqids, CTLFLAG_RD, - NULL, 0, sysctl_msqids, "", "Message queue IDs"); + NULL, 0, sysctl_msqids, "", "Message queue IDs", &Giant); diff -ur /home/refugee/freebsd/current/src/sys/kern/sysv_sem.c repl/kern/sysv_sem.c --- /home/refugee/freebsd/current/src/sys/kern/sysv_sem.c Sun Nov 14 03:56:28 2004 +++ repl/kern/sysv_sem.c Tue Dec 14 00:49:41 2004 @@ -39,7 +39,7 @@ static int sysvsem_modload(struct module *, int, void *); static int semunload(void); static void semexit_myhook(void *arg, struct proc *p); -static int sysctl_sema(SYSCTL_HANDLER_ARGS); +static int sysctl_sema(SYSCTL_HANDLER_ARGS, &Giant); static int semvalid(int semid, struct semid_kernel *semakptr); #ifndef _SYS_SYSPROTO_H_ @@ -160,18 +160,18 @@ }; SYSCTL_DECL(_kern_ipc); -SYSCTL_INT(_kern_ipc, OID_AUTO, semmap, CTLFLAG_RW, &seminfo.semmap, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, semmni, CTLFLAG_RDTUN, &seminfo.semmni, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, semmns, CTLFLAG_RDTUN, &seminfo.semmns, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, semmnu, CTLFLAG_RDTUN, &seminfo.semmnu, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, semmsl, CTLFLAG_RW, &seminfo.semmsl, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, semopm, CTLFLAG_RDTUN, &seminfo.semopm, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, semume, CTLFLAG_RDTUN, &seminfo.semume, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, semusz, CTLFLAG_RDTUN, &seminfo.semusz, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, semvmx, CTLFLAG_RW, &seminfo.semvmx, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, semaem, CTLFLAG_RW, &seminfo.semaem, 0, ""); +SYSCTL_INT(_kern_ipc, OID_AUTO, semmap, CTLFLAG_RW, &seminfo.semmap, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, semmni, CTLFLAG_RDTUN, &seminfo.semmni, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, semmns, CTLFLAG_RDTUN, &seminfo.semmns, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, semmnu, CTLFLAG_RDTUN, &seminfo.semmnu, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, semmsl, CTLFLAG_RW, &seminfo.semmsl, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, semopm, CTLFLAG_RDTUN, &seminfo.semopm, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, semume, CTLFLAG_RDTUN, &seminfo.semume, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, semusz, CTLFLAG_RDTUN, &seminfo.semusz, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, semvmx, CTLFLAG_RW, &seminfo.semvmx, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, semaem, CTLFLAG_RW, &seminfo.semaem, 0, "", &Giant); SYSCTL_PROC(_kern_ipc, OID_AUTO, sema, CTLFLAG_RD, - NULL, 0, sysctl_sema, "", ""); + NULL, 0, sysctl_sema, "", "", &Giant); static void seminit(void) @@ -1244,5 +1244,5 @@ { return (SYSCTL_OUT(req, sema, - sizeof(struct semid_kernel) * seminfo.semmni)); + sizeof(struct semid_kernel) * seminfo.semmni), &Giant); } diff -ur /home/refugee/freebsd/current/src/sys/kern/sysv_shm.c repl/kern/sysv_shm.c --- /home/refugee/freebsd/current/src/sys/kern/sysv_shm.c Sun Nov 14 03:56:28 2004 +++ repl/kern/sysv_shm.c Tue Dec 14 00:49:41 2004 @@ -103,7 +103,7 @@ static int shmunload(void); static void shmexit_myhook(struct vmspace *vm); static void shmfork_myhook(struct proc *p1, struct proc *p2); -static int sysctl_shmsegs(SYSCTL_HANDLER_ARGS); +static int sysctl_shmsegs(SYSCTL_HANDLER_ARGS, &Giant); /* * Tuneable values. @@ -139,17 +139,17 @@ static int shm_allow_removed; SYSCTL_DECL(_kern_ipc); -SYSCTL_INT(_kern_ipc, OID_AUTO, shmmax, CTLFLAG_RW, &shminfo.shmmax, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, shmmin, CTLFLAG_RW, &shminfo.shmmin, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, shmmni, CTLFLAG_RDTUN, &shminfo.shmmni, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, shmseg, CTLFLAG_RDTUN, &shminfo.shmseg, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, shmall, CTLFLAG_RW, &shminfo.shmall, 0, ""); +SYSCTL_INT(_kern_ipc, OID_AUTO, shmmax, CTLFLAG_RW, &shminfo.shmmax, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, shmmin, CTLFLAG_RW, &shminfo.shmmin, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, shmmni, CTLFLAG_RDTUN, &shminfo.shmmni, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, shmseg, CTLFLAG_RDTUN, &shminfo.shmseg, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, OID_AUTO, shmall, CTLFLAG_RW, &shminfo.shmall, 0, "", &Giant); SYSCTL_INT(_kern_ipc, OID_AUTO, shm_use_phys, CTLFLAG_RW, - &shm_use_phys, 0, ""); + &shm_use_phys, 0, "", &Giant); SYSCTL_INT(_kern_ipc, OID_AUTO, shm_allow_removed, CTLFLAG_RW, - &shm_allow_removed, 0, ""); + &shm_allow_removed, 0, "", &Giant); SYSCTL_PROC(_kern_ipc, OID_AUTO, shmsegs, CTLFLAG_RD, - NULL, 0, sysctl_shmsegs, "", ""); + NULL, 0, sysctl_shmsegs, "", "", &Giant); static int shm_find_segment_by_key(key) @@ -906,7 +906,7 @@ sysctl_shmsegs(SYSCTL_HANDLER_ARGS) { - return (SYSCTL_OUT(req, shmsegs, shmalloced * sizeof(shmsegs[0]))); + return (SYSCTL_OUT(req, shmsegs, shmalloced * sizeof(shmsegs[0])), &Giant); } static int diff -ur /home/refugee/freebsd/current/src/sys/kern/tty.c repl/kern/tty.c --- /home/refugee/freebsd/current/src/sys/kern/tty.c Sun Nov 21 00:03:32 2004 +++ repl/kern/tty.c Tue Dec 14 00:49:41 2004 @@ -258,7 +258,7 @@ static int drainwait = 5*60; SYSCTL_INT(_kern, OID_AUTO, drainwait, CTLFLAG_RW, &drainwait, - 0, "Output drain timeout in seconds"); + 0, "Output drain timeout in seconds", &Giant); static struct tty * tty_gettp(struct cdev *dev) @@ -3068,11 +3068,11 @@ } SYSCTL_PROC(_kern, OID_AUTO, ttys, CTLTYPE_OPAQUE|CTLFLAG_RD, - 0, 0, sysctl_kern_ttys, "S,xtty", "All ttys"); + 0, 0, sysctl_kern_ttys, "S,xtty", "All ttys", &Giant); SYSCTL_LONG(_kern, OID_AUTO, tty_nin, CTLFLAG_RD, - &tk_nin, 0, "Total TTY in characters"); + &tk_nin, 0, "Total TTY in characters", &Giant); SYSCTL_LONG(_kern, OID_AUTO, tty_nout, CTLFLAG_RD, - &tk_nout, 0, "Total TTY out characters"); + &tk_nout, 0, "Total TTY out characters", &Giant); void nottystop(struct tty *tp, int rw) diff -ur /home/refugee/freebsd/current/src/sys/kern/tty_compat.c repl/kern/tty_compat.c --- /home/refugee/freebsd/current/src/sys/kern/tty_compat.c Sun Oct 31 04:50:26 2004 +++ repl/kern/tty_compat.c Tue Dec 14 00:49:41 2004 @@ -53,7 +53,7 @@ static int ttcompatspeedtab(int speed, struct speedtab *table); static int ttydebug = 0; -SYSCTL_INT(_debug, OID_AUTO, ttydebug, CTLFLAG_RW, &ttydebug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, ttydebug, CTLFLAG_RW, &ttydebug, 0, "", &Giant); static struct speedtab compatspeeds[] = { #define MAX_SPEED 17 diff -ur /home/refugee/freebsd/current/src/sys/kern/tty_cons.c repl/kern/tty_cons.c --- /home/refugee/freebsd/current/src/sys/kern/tty_cons.c Wed Dec 8 20:41:04 2004 +++ repl/kern/tty_cons.c Tue Dec 14 00:49:41 2004 @@ -106,7 +106,7 @@ static dev_t cn_udev_t; SYSCTL_OPAQUE(_machdep, CPU_CONSDEV, consdev, CTLFLAG_RD, - &cn_udev_t, sizeof cn_udev_t, "T,struct cdev *", ""); + &cn_udev_t, sizeof cn_udev_t, "T,struct cdev *", "", &Giant); int cons_avail_mask = 0; /* Bit mask. Each registered low level console * which is currently unavailable for inpit @@ -325,7 +325,7 @@ if (cp->cn_name[0] != '\0') p += sprintf(p, "%s,", cp->cn_name); } - error = sysctl_handle_string(oidp, name, len, req); + error = sysctl_handle_string(oidp, name, len, req, &Giant); if (error == 0 && req->newptr != NULL) { p = name; error = ENXIO; @@ -354,7 +354,7 @@ } SYSCTL_PROC(_kern, OID_AUTO, console, CTLTYPE_STRING|CTLFLAG_RW, - 0, 0, sysctl_kern_console, "A", "Console device control"); + 0, 0, sysctl_kern_console, "A", "Console device control", &Giant); /* * User has changed the state of the console muting. @@ -367,7 +367,7 @@ int ocn_mute; ocn_mute = cn_mute; - error = sysctl_handle_int(oidp, &cn_mute, 0, req); + error = sysctl_handle_int(oidp, &cn_mute, 0, req, &Giant); if (error != 0 || req->newptr == NULL) return (error); if (ocn_mute && !cn_mute && cn_is_open) @@ -380,7 +380,7 @@ } SYSCTL_PROC(_kern, OID_AUTO, consmute, CTLTYPE_INT|CTLFLAG_RW, - 0, sizeof(cn_mute), sysctl_kern_consmute, "I", ""); + 0, sizeof(cn_mute), sysctl_kern_consmute, "I", "", &Giant); static int cn_devopen(struct cn_device *cnd, struct thread *td, int forceopen) @@ -662,7 +662,7 @@ static int consmsgbuf_size = 8192; SYSCTL_INT(_kern, OID_AUTO, consmsgbuf_size, CTLFLAG_RW, &consmsgbuf_size, 0, - ""); + "", &Giant); /* * Redirect console output to a tty. @@ -704,7 +704,7 @@ /* Times per second to check for pending console tty messages. */ static int constty_wakeups_per_second = 5; SYSCTL_INT(_kern, OID_AUTO, constty_wakeups_per_second, CTLFLAG_RW, - &constty_wakeups_per_second, 0, ""); + &constty_wakeups_per_second, 0, "", &Giant); static void constty_timeout(void *arg) diff -ur /home/refugee/freebsd/current/src/sys/kern/uipc_accf.c repl/kern/uipc_accf.c --- /home/refugee/freebsd/current/src/sys/kern/uipc_accf.c Sun Oct 31 04:50:26 2004 +++ repl/kern/uipc_accf.c Tue Dec 14 00:49:42 2004 @@ -60,9 +60,9 @@ static int unloadable = 0; SYSCTL_DECL(_net_inet); /* XXX: some header should do this for me */ -SYSCTL_NODE(_net_inet, OID_AUTO, accf, CTLFLAG_RW, 0, "Accept filters"); +SYSCTL_NODE(_net_inet, OID_AUTO, accf, CTLFLAG_RW, 0, "Accept filters", NULL); SYSCTL_INT(_net_inet_accf, OID_AUTO, unloadable, CTLFLAG_RW, &unloadable, 0, - "Allow unload of accept filters (not recommended)"); + "Allow unload of accept filters (not recommended)", &Giant); /* * must be passed a malloc'd structure so we don't explode if the kld diff -ur /home/refugee/freebsd/current/src/sys/kern/uipc_mbuf.c repl/kern/uipc_mbuf.c --- /home/refugee/freebsd/current/src/sys/kern/uipc_mbuf.c Wed Dec 8 20:41:04 2004 +++ repl/kern/uipc_mbuf.c Tue Dec 14 00:49:41 2004 @@ -66,23 +66,23 @@ */ SYSCTL_DECL(_kern_ipc); SYSCTL_INT(_kern_ipc, KIPC_MAX_LINKHDR, max_linkhdr, CTLFLAG_RW, - &max_linkhdr, 0, ""); + &max_linkhdr, 0, "", &Giant); SYSCTL_INT(_kern_ipc, KIPC_MAX_PROTOHDR, max_protohdr, CTLFLAG_RW, - &max_protohdr, 0, ""); -SYSCTL_INT(_kern_ipc, KIPC_MAX_HDR, max_hdr, CTLFLAG_RW, &max_hdr, 0, ""); + &max_protohdr, 0, "", &Giant); +SYSCTL_INT(_kern_ipc, KIPC_MAX_HDR, max_hdr, CTLFLAG_RW, &max_hdr, 0, "", &Giant); SYSCTL_INT(_kern_ipc, KIPC_MAX_DATALEN, max_datalen, CTLFLAG_RW, - &max_datalen, 0, ""); + &max_datalen, 0, "", &Giant); #ifdef MBUF_STRESS_TEST SYSCTL_INT(_kern_ipc, OID_AUTO, m_defragpackets, CTLFLAG_RD, - &m_defragpackets, 0, ""); + &m_defragpackets, 0, "", &Giant); SYSCTL_INT(_kern_ipc, OID_AUTO, m_defragbytes, CTLFLAG_RD, - &m_defragbytes, 0, ""); + &m_defragbytes, 0, "", &Giant); SYSCTL_INT(_kern_ipc, OID_AUTO, m_defraguseless, CTLFLAG_RD, - &m_defraguseless, 0, ""); + &m_defraguseless, 0, "", &Giant); SYSCTL_INT(_kern_ipc, OID_AUTO, m_defragfailure, CTLFLAG_RD, - &m_defragfailure, 0, ""); + &m_defragfailure, 0, "", &Giant); SYSCTL_INT(_kern_ipc, OID_AUTO, m_defragrandomfailures, CTLFLAG_RW, - &m_defragrandomfailures, 0, ""); + &m_defragrandomfailures, 0, "", &Giant); #endif /* diff -ur /home/refugee/freebsd/current/src/sys/kern/uipc_proto.c repl/kern/uipc_proto.c --- /home/refugee/freebsd/current/src/sys/kern/uipc_proto.c Sun Oct 31 04:50:26 2004 +++ repl/kern/uipc_proto.c Tue Dec 14 00:49:42 2004 @@ -73,6 +73,6 @@ localsw, &localsw[sizeof(localsw)/sizeof(localsw[0])] }; DOMAIN_SET(local); -SYSCTL_NODE(_net, PF_LOCAL, local, CTLFLAG_RW, 0, "Local domain"); -SYSCTL_NODE(_net_local, SOCK_STREAM, stream, CTLFLAG_RW, 0, "SOCK_STREAM"); -SYSCTL_NODE(_net_local, SOCK_DGRAM, dgram, CTLFLAG_RW, 0, "SOCK_DGRAM"); +SYSCTL_NODE(_net, PF_LOCAL, local, CTLFLAG_RW, 0, "Local domain", NULL); +SYSCTL_NODE(_net_local, SOCK_STREAM, stream, CTLFLAG_RW, 0, "SOCK_STREAM", NULL); +SYSCTL_NODE(_net_local, SOCK_DGRAM, dgram, CTLFLAG_RW, 0, "SOCK_DGRAM", NULL); diff -ur /home/refugee/freebsd/current/src/sys/kern/uipc_sem.c repl/kern/uipc_sem.c --- /home/refugee/freebsd/current/src/sys/kern/uipc_sem.c Sun Oct 31 04:50:26 2004 +++ repl/kern/uipc_sem.c Tue Dec 14 00:49:41 2004 @@ -116,7 +116,7 @@ static int nsems = 0; SYSCTL_DECL(_p1003_1b); -SYSCTL_INT(_p1003_1b, OID_AUTO, nsems, CTLFLAG_RD, &nsems, 0, ""); +SYSCTL_INT(_p1003_1b, OID_AUTO, nsems, CTLFLAG_RD, &nsems, 0, "", &Giant); static eventhandler_tag sem_exit_tag, sem_exec_tag; diff -ur /home/refugee/freebsd/current/src/sys/kern/uipc_socket.c repl/kern/uipc_socket.c --- /home/refugee/freebsd/current/src/sys/kern/uipc_socket.c Wed Dec 8 20:41:04 2004 +++ repl/kern/uipc_socket.c Tue Dec 14 00:49:41 2004 @@ -95,10 +95,10 @@ static int somaxconn = SOMAXCONN; SYSCTL_INT(_kern_ipc, KIPC_SOMAXCONN, somaxconn, CTLFLAG_RW, - &somaxconn, 0, "Maximum pending socket connection queue size"); + &somaxconn, 0, "Maximum pending socket connection queue size", &Giant); static int numopensockets; SYSCTL_INT(_kern_ipc, OID_AUTO, numopensockets, CTLFLAG_RD, - &numopensockets, 0, "Number of open sockets"); + &numopensockets, 0, "Number of open sockets", &Giant); #ifdef ZERO_COPY_SOCKETS /* These aren't static because they're used in other files. */ int so_zero_copy_send = 1; @@ -106,9 +106,9 @@ SYSCTL_NODE(_kern_ipc, OID_AUTO, zero_copy, CTLFLAG_RD, 0, "Zero copy controls"); SYSCTL_INT(_kern_ipc_zero_copy, OID_AUTO, receive, CTLFLAG_RW, - &so_zero_copy_receive, 0, "Enable zero copy receive"); + &so_zero_copy_receive, 0, "Enable zero copy receive", &Giant); SYSCTL_INT(_kern_ipc_zero_copy, OID_AUTO, send, CTLFLAG_RW, - &so_zero_copy_send, 0, "Enable zero copy send"); + &so_zero_copy_send, 0, "Enable zero copy send", &Giant); #endif /* ZERO_COPY_SOCKETS */ /* diff -ur /home/refugee/freebsd/current/src/sys/kern/uipc_syscalls.c repl/kern/uipc_syscalls.c --- /home/refugee/freebsd/current/src/sys/kern/uipc_syscalls.c Sun Nov 14 03:56:29 2004 +++ repl/kern/uipc_syscalls.c Tue Dec 14 00:49:40 2004 @@ -94,11 +94,11 @@ SYSCTL_DECL(_kern_ipc); SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, - "Maximum number of sendfile(2) sf_bufs available"); + "Maximum number of sendfile(2) sf_bufs available", &Giant); SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, - "Number of sendfile(2) sf_bufs at peak usage"); + "Number of sendfile(2) sf_bufs at peak usage", &Giant); SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, - "Number of sendfile(2) sf_bufs in use"); + "Number of sendfile(2) sf_bufs in use", &Giant); /* * Convert a user file descriptor to a kernel file entry. A reference on the diff -ur /home/refugee/freebsd/current/src/sys/kern/uipc_usrreq.c repl/kern/uipc_usrreq.c --- /home/refugee/freebsd/current/src/sys/kern/uipc_usrreq.c Wed Dec 8 20:41:04 2004 +++ repl/kern/uipc_usrreq.c Tue Dec 14 00:49:41 2004 @@ -662,16 +662,16 @@ SYSCTL_DECL(_net_local_stream); SYSCTL_INT(_net_local_stream, OID_AUTO, sendspace, CTLFLAG_RW, - &unpst_sendspace, 0, ""); + &unpst_sendspace, 0, "", &Giant); SYSCTL_INT(_net_local_stream, OID_AUTO, recvspace, CTLFLAG_RW, - &unpst_recvspace, 0, ""); + &unpst_recvspace, 0, "", &Giant); SYSCTL_DECL(_net_local_dgram); SYSCTL_INT(_net_local_dgram, OID_AUTO, maxdgram, CTLFLAG_RW, - &unpdg_sendspace, 0, ""); + &unpdg_sendspace, 0, "", &Giant); SYSCTL_INT(_net_local_dgram, OID_AUTO, recvspace, CTLFLAG_RW, - &unpdg_recvspace, 0, ""); + &unpdg_recvspace, 0, "", &Giant); SYSCTL_DECL(_net_local); -SYSCTL_INT(_net_local, OID_AUTO, inflight, CTLFLAG_RD, &unp_rights, 0, ""); +SYSCTL_INT(_net_local, OID_AUTO, inflight, CTLFLAG_RD, &unp_rights, 0, "", &Giant); static int unp_attach(so) @@ -1176,10 +1176,10 @@ SYSCTL_PROC(_net_local_dgram, OID_AUTO, pcblist, CTLFLAG_RD, (caddr_t)(long)SOCK_DGRAM, 0, unp_pcblist, "S,xunpcb", - "List of active local datagram sockets"); + "List of active local datagram sockets", &Giant); SYSCTL_PROC(_net_local_stream, OID_AUTO, pcblist, CTLFLAG_RD, (caddr_t)(long)SOCK_STREAM, 0, unp_pcblist, "S,xunpcb", - "List of active local stream sockets"); + "List of active local stream sockets", &Giant); static void unp_shutdown(unp) diff -ur /home/refugee/freebsd/current/src/sys/kern/vfs_aio.c repl/kern/vfs_aio.c --- /home/refugee/freebsd/current/src/sys/kern/vfs_aio.c Sun Nov 14 03:56:29 2004 +++ repl/kern/vfs_aio.c Tue Dec 14 00:49:41 2004 @@ -108,17 +108,17 @@ #define AIOD_LIFETIME_DEFAULT (30 * hz) #endif -SYSCTL_NODE(_vfs, OID_AUTO, aio, CTLFLAG_RW, 0, "Async IO management"); +SYSCTL_NODE(_vfs, OID_AUTO, aio, CTLFLAG_RW, 0, "Async IO management", NULL); static int max_aio_procs = MAX_AIO_PROCS; SYSCTL_INT(_vfs_aio, OID_AUTO, max_aio_procs, CTLFLAG_RW, &max_aio_procs, 0, - "Maximum number of kernel threads to use for handling async IO "); + "Maximum number of kernel threads to use for handling async IO ", &Giant); static int num_aio_procs = 0; SYSCTL_INT(_vfs_aio, OID_AUTO, num_aio_procs, CTLFLAG_RD, &num_aio_procs, 0, - "Number of presently active kernel threads for async IO"); + "Number of presently active kernel threads for async IO", &Giant); /* * The code will adjust the actual number of AIO processes towards this @@ -126,19 +126,19 @@ */ static int target_aio_procs = TARGET_AIO_PROCS; SYSCTL_INT(_vfs_aio, OID_AUTO, target_aio_procs, CTLFLAG_RW, &target_aio_procs, - 0, "Preferred number of ready kernel threads for async IO"); + 0, "Preferred number of ready kernel threads for async IO", &Giant); static int max_queue_count = MAX_AIO_QUEUE; SYSCTL_INT(_vfs_aio, OID_AUTO, max_aio_queue, CTLFLAG_RW, &max_queue_count, 0, - "Maximum number of aio requests to queue, globally"); + "Maximum number of aio requests to queue, globally", &Giant); static int num_queue_count = 0; SYSCTL_INT(_vfs_aio, OID_AUTO, num_queue_count, CTLFLAG_RD, &num_queue_count, 0, - "Number of queued aio requests"); + "Number of queued aio requests", &Giant); static int num_buf_aio = 0; SYSCTL_INT(_vfs_aio, OID_AUTO, num_buf_aio, CTLFLAG_RD, &num_buf_aio, 0, - "Number of aio requests presently handled by the buf subsystem"); + "Number of aio requests presently handled by the buf subsystem", &Giant); /* Number of async I/O thread in the process of being started */ /* XXX This should be local to _aio_aqueue() */ @@ -146,29 +146,29 @@ static int aiod_timeout; SYSCTL_INT(_vfs_aio, OID_AUTO, aiod_timeout, CTLFLAG_RW, &aiod_timeout, 0, - "Timeout value for synchronous aio operations"); + "Timeout value for synchronous aio operations", &Giant); static int aiod_lifetime; SYSCTL_INT(_vfs_aio, OID_AUTO, aiod_lifetime, CTLFLAG_RW, &aiod_lifetime, 0, - "Maximum lifetime for idle aiod"); + "Maximum lifetime for idle aiod", &Giant); static int unloadable = 0; SYSCTL_INT(_vfs_aio, OID_AUTO, unloadable, CTLFLAG_RW, &unloadable, 0, - "Allow unload of aio (not recommended)"); + "Allow unload of aio (not recommended)", &Giant); static int max_aio_per_proc = MAX_AIO_PER_PROC; SYSCTL_INT(_vfs_aio, OID_AUTO, max_aio_per_proc, CTLFLAG_RW, &max_aio_per_proc, - 0, "Maximum active aio requests per process (stored in the process)"); + 0, "Maximum active aio requests per process (stored in the process)", &Giant); static int max_aio_queue_per_proc = MAX_AIO_QUEUE_PER_PROC; SYSCTL_INT(_vfs_aio, OID_AUTO, max_aio_queue_per_proc, CTLFLAG_RW, &max_aio_queue_per_proc, 0, - "Maximum queued aio requests per process (stored in the process)"); + "Maximum queued aio requests per process (stored in the process)", &Giant); static int max_buf_aio = MAX_BUF_AIO; SYSCTL_INT(_vfs_aio, OID_AUTO, max_buf_aio, CTLFLAG_RW, &max_buf_aio, 0, - "Maximum buf aio requests per process (stored in the process)"); + "Maximum buf aio requests per process (stored in the process)", &Giant); struct aiocblist { TAILQ_ENTRY(aiocblist) list; /* List of jobs */ diff -ur /home/refugee/freebsd/current/src/sys/kern/vfs_bio.c repl/kern/vfs_bio.c --- /home/refugee/freebsd/current/src/sys/kern/vfs_bio.c Sun Nov 21 00:03:32 2004 +++ repl/kern/vfs_bio.c Tue Dec 14 00:49:41 2004 @@ -108,82 +108,82 @@ int vmiodirenable = TRUE; SYSCTL_INT(_vfs, OID_AUTO, vmiodirenable, CTLFLAG_RW, &vmiodirenable, 0, - "Use the VM system for directory writes"); + "Use the VM system for directory writes", &Giant); int runningbufspace; SYSCTL_INT(_vfs, OID_AUTO, runningbufspace, CTLFLAG_RD, &runningbufspace, 0, - "Amount of presently outstanding async buffer io"); + "Amount of presently outstanding async buffer io", &Giant); static int bufspace; SYSCTL_INT(_vfs, OID_AUTO, bufspace, CTLFLAG_RD, &bufspace, 0, - "KVA memory used for bufs"); + "KVA memory used for bufs", &Giant); static int maxbufspace; SYSCTL_INT(_vfs, OID_AUTO, maxbufspace, CTLFLAG_RD, &maxbufspace, 0, - "Maximum allowed value of bufspace (including buf_daemon)"); + "Maximum allowed value of bufspace (including buf_daemon)", &Giant); static int bufmallocspace; SYSCTL_INT(_vfs, OID_AUTO, bufmallocspace, CTLFLAG_RD, &bufmallocspace, 0, - "Amount of malloced memory for buffers"); + "Amount of malloced memory for buffers", &Giant); static int maxbufmallocspace; SYSCTL_INT(_vfs, OID_AUTO, maxmallocbufspace, CTLFLAG_RW, &maxbufmallocspace, 0, - "Maximum amount of malloced memory for buffers"); + "Maximum amount of malloced memory for buffers", &Giant); static int lobufspace; SYSCTL_INT(_vfs, OID_AUTO, lobufspace, CTLFLAG_RD, &lobufspace, 0, - "Minimum amount of buffers we want to have"); + "Minimum amount of buffers we want to have", &Giant); static int hibufspace; SYSCTL_INT(_vfs, OID_AUTO, hibufspace, CTLFLAG_RD, &hibufspace, 0, - "Maximum allowed value of bufspace (excluding buf_daemon)"); + "Maximum allowed value of bufspace (excluding buf_daemon)", &Giant); static int bufreusecnt; SYSCTL_INT(_vfs, OID_AUTO, bufreusecnt, CTLFLAG_RW, &bufreusecnt, 0, - "Number of times we have reused a buffer"); + "Number of times we have reused a buffer", &Giant); static int buffreekvacnt; SYSCTL_INT(_vfs, OID_AUTO, buffreekvacnt, CTLFLAG_RW, &buffreekvacnt, 0, - "Number of times we have freed the KVA space from some buffer"); + "Number of times we have freed the KVA space from some buffer", &Giant); static int bufdefragcnt; SYSCTL_INT(_vfs, OID_AUTO, bufdefragcnt, CTLFLAG_RW, &bufdefragcnt, 0, - "Number of times we have had to repeat buffer allocation to defragment"); + "Number of times we have had to repeat buffer allocation to defragment", &Giant); static int lorunningspace; SYSCTL_INT(_vfs, OID_AUTO, lorunningspace, CTLFLAG_RW, &lorunningspace, 0, - "Minimum preferred space used for in-progress I/O"); + "Minimum preferred space used for in-progress I/O", &Giant); static int hirunningspace; SYSCTL_INT(_vfs, OID_AUTO, hirunningspace, CTLFLAG_RW, &hirunningspace, 0, - "Maximum amount of space to use for in-progress I/O"); + "Maximum amount of space to use for in-progress I/O", &Giant); static int dirtybufferflushes; SYSCTL_INT(_vfs, OID_AUTO, dirtybufferflushes, CTLFLAG_RW, &dirtybufferflushes, - 0, "Number of bdwrite to bawrite conversions to limit dirty buffers"); + 0, "Number of bdwrite to bawrite conversions to limit dirty buffers", &Giant); static int altbufferflushes; SYSCTL_INT(_vfs, OID_AUTO, altbufferflushes, CTLFLAG_RW, &altbufferflushes, - 0, "Number of fsync flushes to limit dirty buffers"); + 0, "Number of fsync flushes to limit dirty buffers", &Giant); static int recursiveflushes; SYSCTL_INT(_vfs, OID_AUTO, recursiveflushes, CTLFLAG_RW, &recursiveflushes, - 0, "Number of flushes skipped due to being recursive"); + 0, "Number of flushes skipped due to being recursive", &Giant); static int numdirtybuffers; SYSCTL_INT(_vfs, OID_AUTO, numdirtybuffers, CTLFLAG_RD, &numdirtybuffers, 0, - "Number of buffers that are dirty (has unwritten changes) at the moment"); + "Number of buffers that are dirty (has unwritten changes) at the moment", &Giant); static int lodirtybuffers; SYSCTL_INT(_vfs, OID_AUTO, lodirtybuffers, CTLFLAG_RW, &lodirtybuffers, 0, - "How many buffers we want to have free before bufdaemon can sleep"); + "How many buffers we want to have free before bufdaemon can sleep", &Giant); static int hidirtybuffers; SYSCTL_INT(_vfs, OID_AUTO, hidirtybuffers, CTLFLAG_RW, &hidirtybuffers, 0, - "When the number of dirty buffers is considered severe"); + "When the number of dirty buffers is considered severe", &Giant); static int dirtybufthresh; SYSCTL_INT(_vfs, OID_AUTO, dirtybufthresh, CTLFLAG_RW, &dirtybufthresh, - 0, "Number of bdwrite to bawrite conversions to clear dirty buffers"); + 0, "Number of bdwrite to bawrite conversions to clear dirty buffers", &Giant); static int numfreebuffers; SYSCTL_INT(_vfs, OID_AUTO, numfreebuffers, CTLFLAG_RD, &numfreebuffers, 0, - "Number of free buffers"); + "Number of free buffers", &Giant); static int lofreebuffers; SYSCTL_INT(_vfs, OID_AUTO, lofreebuffers, CTLFLAG_RW, &lofreebuffers, 0, - "XXX Unused"); + "XXX Unused", &Giant); static int hifreebuffers; SYSCTL_INT(_vfs, OID_AUTO, hifreebuffers, CTLFLAG_RW, &hifreebuffers, 0, - "XXX Complicatedly unused"); + "XXX Complicatedly unused", &Giant); static int getnewbufcalls; SYSCTL_INT(_vfs, OID_AUTO, getnewbufcalls, CTLFLAG_RW, &getnewbufcalls, 0, - "Number of calls to getnewbuf"); + "Number of calls to getnewbuf", &Giant); static int getnewbufrestarts; SYSCTL_INT(_vfs, OID_AUTO, getnewbufrestarts, CTLFLAG_RW, &getnewbufrestarts, 0, - "Number of times getnewbuf has had to restart a buffer aquisition"); + "Number of times getnewbuf has had to restart a buffer aquisition", &Giant); static int dobkgrdwrite = 1; SYSCTL_INT(_debug, OID_AUTO, dobkgrdwrite, CTLFLAG_RW, &dobkgrdwrite, 0, - "Do background writes (honoring the BV_BKGRDWRITE flag)?"); + "Do background writes (honoring the BV_BKGRDWRITE flag)?", &Giant); /* * Wakeup point for bufdaemon, as well as indicator of whether it is already @@ -2170,7 +2170,7 @@ */ int flushwithdeps = 0; SYSCTL_INT(_vfs, OID_AUTO, flushwithdeps, CTLFLAG_RW, &flushwithdeps, - 0, "Number of buffers flushed with dependecies that require rollbacks"); + 0, "Number of buffers flushed with dependecies that require rollbacks", &Giant); static int flushbufqueues(int flushdeps) diff -ur /home/refugee/freebsd/current/src/sys/kern/vfs_cache.c repl/kern/vfs_cache.c --- /home/refugee/freebsd/current/src/sys/kern/vfs_cache.c Sun Oct 31 04:50:26 2004 +++ repl/kern/vfs_cache.c Tue Dec 14 00:49:42 2004 @@ -94,18 +94,18 @@ static LIST_HEAD(nchashhead, namecache) *nchashtbl; /* Hash Table */ static TAILQ_HEAD(, namecache) ncneg; /* Hash Table */ static u_long nchash; /* size of hash table */ -SYSCTL_ULONG(_debug, OID_AUTO, nchash, CTLFLAG_RD, &nchash, 0, ""); +SYSCTL_ULONG(_debug, OID_AUTO, nchash, CTLFLAG_RD, &nchash, 0, "", &Giant); static u_long ncnegfactor = 16; /* ratio of negative entries */ -SYSCTL_ULONG(_debug, OID_AUTO, ncnegfactor, CTLFLAG_RW, &ncnegfactor, 0, ""); +SYSCTL_ULONG(_debug, OID_AUTO, ncnegfactor, CTLFLAG_RW, &ncnegfactor, 0, "", &Giant); static u_long numneg; /* number of cache entries allocated */ -SYSCTL_ULONG(_debug, OID_AUTO, numneg, CTLFLAG_RD, &numneg, 0, ""); +SYSCTL_ULONG(_debug, OID_AUTO, numneg, CTLFLAG_RD, &numneg, 0, "", &Giant); static u_long numcache; /* number of cache entries allocated */ -SYSCTL_ULONG(_debug, OID_AUTO, numcache, CTLFLAG_RD, &numcache, 0, ""); +SYSCTL_ULONG(_debug, OID_AUTO, numcache, CTLFLAG_RD, &numcache, 0, "", &Giant); static u_long numcachehv; /* number of cache entries with vnodes held */ -SYSCTL_ULONG(_debug, OID_AUTO, numcachehv, CTLFLAG_RD, &numcachehv, 0, ""); +SYSCTL_ULONG(_debug, OID_AUTO, numcachehv, CTLFLAG_RD, &numcachehv, 0, "", &Giant); #if 0 static u_long numcachepl; /* number of cache purge for leaf entries */ -SYSCTL_ULONG(_debug, OID_AUTO, numcachepl, CTLFLAG_RD, &numcachepl, 0, ""); +SYSCTL_ULONG(_debug, OID_AUTO, numcachepl, CTLFLAG_RD, &numcachepl, 0, "", &Giant); #endif struct nchstats nchstats; /* cache effectiveness statistics */ @@ -138,18 +138,18 @@ } while (0) static int doingcache = 1; /* 1 => enable the cache */ -SYSCTL_INT(_debug, OID_AUTO, vfscache, CTLFLAG_RW, &doingcache, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, vfscache, CTLFLAG_RW, &doingcache, 0, "", &Giant); /* Export size information to userland */ -SYSCTL_INT(_debug, OID_AUTO, vnsize, CTLFLAG_RD, 0, sizeof(struct vnode), ""); -SYSCTL_INT(_debug, OID_AUTO, ncsize, CTLFLAG_RD, 0, sizeof(struct namecache), ""); +SYSCTL_INT(_debug, OID_AUTO, vnsize, CTLFLAG_RD, 0, sizeof(struct vnode), "", &Giant); +SYSCTL_INT(_debug, OID_AUTO, ncsize, CTLFLAG_RD, 0, sizeof(struct namecache), "", &Giant); /* * The new name cache statistics */ -SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, "Name cache statistics"); +SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, "Name cache statistics", NULL); #define STATNODE(mode, name, var) \ - SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, ""); + SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, "", &Giant); STATNODE(CTLFLAG_RD, numneg, &numneg); STATNODE(CTLFLAG_RD, numcache, &numcache); static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls); @@ -164,7 +164,7 @@ static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, &numneghits); SYSCTL_OPAQUE(_vfs_cache, OID_AUTO, nchstats, CTLFLAG_RD, &nchstats, - sizeof(nchstats), "LU", "VFS cache effectiveness statistics"); + sizeof(nchstats), "LU", "VFS cache effectiveness statistics", &Giant); @@ -180,7 +180,7 @@ /* * Grab an atomic snapshot of the name cache hash chain lengths */ -SYSCTL_NODE(_debug, OID_AUTO, hashstat, CTLFLAG_RW, NULL, "hash table stats"); +SYSCTL_NODE(_debug, OID_AUTO, hashstat, CTLFLAG_RW, NULL, "hash table stats", NULL); static int sysctl_debug_hashstat_rawnchash(SYSCTL_HANDLER_ARGS) @@ -208,7 +208,7 @@ return (0); } SYSCTL_PROC(_debug_hashstat, OID_AUTO, rawnchash, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_debug_hashstat_rawnchash, "S,int", "nchash chain lengths"); + 0, 0, sysctl_debug_hashstat_rawnchash, "S,int", "nchash chain lengths", &Giant); static int sysctl_debug_hashstat_nchash(SYSCTL_HANDLER_ARGS) @@ -254,7 +254,7 @@ return (0); } SYSCTL_PROC(_debug_hashstat, OID_AUTO, nchash, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_debug_hashstat_nchash, "I", "nchash chain lengths"); + 0, 0, sysctl_debug_hashstat_nchash, "I", "nchash chain lengths", &Giant); /* * cache_zap(): @@ -783,7 +783,7 @@ */ static int disablecwd; SYSCTL_INT(_debug, OID_AUTO, disablecwd, CTLFLAG_RW, &disablecwd, 0, - "Disable the getcwd syscall"); + "Disable the getcwd syscall", &Giant); /* Various statistics for the getcwd syscall */ static u_long numcwdcalls; STATNODE(CTLFLAG_RD, numcwdcalls, &numcwdcalls); @@ -909,7 +909,7 @@ static int disablefullpath; SYSCTL_INT(_debug, OID_AUTO, disablefullpath, CTLFLAG_RW, &disablefullpath, 0, - "Disable the vn_fullpath function"); + "Disable the vn_fullpath function", &Giant); STATNODE(numfullpathcalls); STATNODE(numfullpathfail1); diff -ur /home/refugee/freebsd/current/src/sys/kern/vfs_cluster.c repl/kern/vfs_cluster.c --- /home/refugee/freebsd/current/src/sys/kern/vfs_cluster.c Sun Nov 21 00:03:32 2004 +++ repl/kern/vfs_cluster.c Tue Dec 14 00:49:41 2004 @@ -55,7 +55,7 @@ #if defined(CLUSTERDEBUG) static int rcluster= 0; SYSCTL_INT(_debug, OID_AUTO, rcluster, CTLFLAG_RW, &rcluster, 0, - "Debug VFS clustering code"); + "Debug VFS clustering code", &Giant); #endif static MALLOC_DEFINE(M_SEGMENT, "cluster_save buffer", "cluster_save buffer"); @@ -68,11 +68,11 @@ static int write_behind = 1; SYSCTL_INT(_vfs, OID_AUTO, write_behind, CTLFLAG_RW, &write_behind, 0, - "Cluster write-behind; 0: disable, 1: enable, 2: backed off"); + "Cluster write-behind; 0: disable, 1: enable, 2: backed off", &Giant); static int read_max = 8; SYSCTL_INT(_vfs, OID_AUTO, read_max, CTLFLAG_RW, &read_max, 0, - "Cluster read-ahead max block count"); + "Cluster read-ahead max block count", &Giant); /* Page expended to mark partially backed buffers */ extern vm_page_t bogus_page; diff -ur /home/refugee/freebsd/current/src/sys/kern/vfs_init.c repl/kern/vfs_init.c --- /home/refugee/freebsd/current/src/sys/kern/vfs_init.c Wed Dec 8 20:41:05 2004 +++ repl/kern/vfs_init.c Tue Dec 14 00:49:41 2004 @@ -199,9 +199,9 @@ */ SLIST_FOREACH(oidp, &sysctl__vfs_children, oid_link) if (strcmp(oidp->oid_name, vfc->vfc_name) == 0) { - sysctl_unregister_oid(oidp); + sysctl_unregister_oid(oidp, &Giant); oidp->oid_number = vfc->vfc_typenum; - sysctl_register_oid(oidp); + sysctl_register_oid(oidp, &Giant); } /* diff -ur /home/refugee/freebsd/current/src/sys/kern/vfs_mount.c repl/kern/vfs_mount.c --- /home/refugee/freebsd/current/src/sys/kern/vfs_mount.c Wed Dec 8 20:41:05 2004 +++ repl/kern/vfs_mount.c Tue Dec 14 00:49:41 2004 @@ -86,7 +86,7 @@ static int usermount = 0; SYSCTL_INT(_vfs, OID_AUTO, usermount, CTLFLAG_RW, &usermount, 0, - "Unprivileged users may mount and unmount file systems"); + "Unprivileged users may mount and unmount file systems", &Giant); MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount structure"); diff -ur /home/refugee/freebsd/current/src/sys/kern/vfs_subr.c repl/kern/vfs_subr.c --- /home/refugee/freebsd/current/src/sys/kern/vfs_subr.c Wed Dec 8 20:41:05 2004 +++ repl/kern/vfs_subr.c Tue Dec 14 00:49:42 2004 @@ -98,7 +98,7 @@ */ static unsigned long numvnodes; -SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, ""); +SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, "", &Giant); /* * Conversion tables for conversion from vnode types to inode formats @@ -123,10 +123,10 @@ * getnewvnode() will return a newly allocated vnode. */ static u_long wantfreevnodes = 25; -SYSCTL_LONG(_vfs, OID_AUTO, wantfreevnodes, CTLFLAG_RW, &wantfreevnodes, 0, ""); +SYSCTL_LONG(_vfs, OID_AUTO, wantfreevnodes, CTLFLAG_RW, &wantfreevnodes, 0, "", &Giant); /* Number of vnodes in the free list. */ static u_long freevnodes; -SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, ""); +SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, "", &Giant); /* * Various variables used for debugging the new implementation of @@ -134,9 +134,9 @@ * XXX these are probably of (very) limited utility now. */ static int reassignbufcalls; -SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, &reassignbufcalls, 0, ""); +SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, &reassignbufcalls, 0, "", &Giant); static int nameileafonly; -SYSCTL_INT(_vfs, OID_AUTO, nameileafonly, CTLFLAG_RW, &nameileafonly, 0, ""); +SYSCTL_INT(_vfs, OID_AUTO, nameileafonly, CTLFLAG_RW, &nameileafonly, 0, "", &Giant); /* * Cache for the mount type id assigned to NFS. This is used for @@ -210,14 +210,14 @@ static int syncer_maxdelay = SYNCER_MAXDELAY; /* maximum delay time */ static int syncdelay = 30; /* max time to delay syncing data */ static int filedelay = 30; /* time to delay syncing files */ -SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, "", &Giant); static int dirdelay = 29; /* time to delay syncing directories */ -SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, &dirdelay, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, &dirdelay, 0, "", &Giant); static int metadelay = 28; /* time to delay syncing metadata */ -SYSCTL_INT(_kern, OID_AUTO, metadelay, CTLFLAG_RW, &metadelay, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, metadelay, CTLFLAG_RW, &metadelay, 0, "", &Giant); static int rushjob; /* number of slots to run ASAP */ static int stat_rush_requests; /* number of times I/O speeded up */ -SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW, &stat_rush_requests, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW, &stat_rush_requests, 0, "", &Giant); /* * When shutting down the syncer, run it at four times normal speed. @@ -237,13 +237,13 @@ */ int desiredvnodes; SYSCTL_INT(_kern, KERN_MAXVNODES, maxvnodes, CTLFLAG_RW, - &desiredvnodes, 0, "Maximum number of vnodes"); + &desiredvnodes, 0, "Maximum number of vnodes", &Giant); static int minvnodes; SYSCTL_INT(_kern, OID_AUTO, minvnodes, CTLFLAG_RW, - &minvnodes, 0, "Minimum number of vnodes"); + &minvnodes, 0, "Minimum number of vnodes", &Giant); static int vnlru_nowhere; SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW, - &vnlru_nowhere, 0, "Number of times the vnlru process ran without success"); + &vnlru_nowhere, 0, "Number of times the vnlru process ran without success", &Giant); /* Hook for calling soft updates. */ int (*softdep_process_worklist_hook)(struct mount *); @@ -424,7 +424,7 @@ static int timestamp_precision = TSP_SEC; SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, - ×tamp_precision, 0, ""); + ×tamp_precision, 0, "", &Giant); /* * Get a current timestamp. @@ -1453,7 +1453,7 @@ } SYSCTL_PROC(_vfs, OID_AUTO, worklist_len, CTLTYPE_INT | CTLFLAG_RD, NULL, 0, - sysctl_vfs_worklist_len, "I", "Syncer thread worklist length"); + sysctl_vfs_worklist_len, "I", "Syncer thread worklist length", &Giant); struct proc *updateproc; static void sched_sync(void); @@ -2043,7 +2043,7 @@ */ #ifdef DIAGNOSTIC static int busyprt = 0; /* print out busy vnodes */ -SYSCTL_INT(_debug, OID_AUTO, busyprt, CTLFLAG_RW, &busyprt, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, busyprt, CTLFLAG_RW, &busyprt, 0, "", &Giant); #endif int @@ -2637,10 +2637,10 @@ } SYSCTL_PROC(_vfs, OID_AUTO, conflist, CTLFLAG_RD, NULL, 0, sysctl_vfs_conflist, - "S,xvfsconf", "List of all configured filesystems"); + "S,xvfsconf", "List of all configured filesystems", &Giant); #ifndef BURN_BRIDGES -static int sysctl_ovfs_conf(SYSCTL_HANDLER_ARGS); +static int sysctl_ovfs_conf(SYSCTL_HANDLER_ARGS, &Giant); static int vfs_sysctl(SYSCTL_HANDLER_ARGS) @@ -2656,7 +2656,7 @@ #if 1 || defined(COMPAT_PRELITE2) /* Resolve ambiguity between VFS_VFSCONF and VFS_GENERIC. */ if (namelen == 1) - return (sysctl_ovfs_conf(oidp, arg1, arg2, req)); + return (sysctl_ovfs_conf(oidp, arg1, arg2, req), &Giant); #endif switch (name[1]) { @@ -2730,7 +2730,7 @@ /* Make an estimate */ return (SYSCTL_OUT(req, 0, len)); - error = sysctl_wire_old_buffer(req, 0); + error = sysctl_wire_old_buffer(req, 0, &Giant); if (error != 0) return (error); xvn = malloc(len, M_TEMP, M_ZERO | M_WAITOK); @@ -2800,7 +2800,7 @@ } SYSCTL_PROC(_kern, KERN_VNODE, vnode, CTLTYPE_OPAQUE|CTLFLAG_RD, - 0, 0, sysctl_vnode, "S,xvnode", ""); + 0, 0, sysctl_vnode, "S,xvnode", "", &Giant); #endif /* @@ -3466,17 +3466,17 @@ #define IGNORE_LOCK(vp) ((vp)->v_type == VCHR || (vp)->v_type == VBAD) int vfs_badlock_ddb = 1; /* Drop into debugger on violation. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, &vfs_badlock_ddb, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, &vfs_badlock_ddb, 0, "", &Giant); int vfs_badlock_mutex = 1; /* Check for interlock across VOPs. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_mutex, CTLFLAG_RW, &vfs_badlock_mutex, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_mutex, CTLFLAG_RW, &vfs_badlock_mutex, 0, "", &Giant); int vfs_badlock_print = 1; /* Print lock violations. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_print, CTLFLAG_RW, &vfs_badlock_print, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_print, CTLFLAG_RW, &vfs_badlock_print, 0, "", &Giant); #ifdef KDB int vfs_badlock_backtrace = 1; /* Print backtrace at lock violations. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_backtrace, CTLFLAG_RW, &vfs_badlock_backtrace, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_backtrace, CTLFLAG_RW, &vfs_badlock_backtrace, 0, "", &Giant); #endif static void @@ -3760,7 +3760,7 @@ } SYSCTL_PROC(_vfs, OID_AUTO, ctl, CTLFLAG_WR, - NULL, 0, sysctl_vfs_ctl, "", "Sysctl by fsid"); + NULL, 0, sysctl_vfs_ctl, "", "Sysctl by fsid", &Giant); /* * Function to initialize a va_filerev field sensibly. diff -ur /home/refugee/freebsd/current/src/sys/kern/vfs_syscalls.c repl/kern/vfs_syscalls.c --- /home/refugee/freebsd/current/src/sys/kern/vfs_syscalls.c Sun Nov 21 00:03:32 2004 +++ repl/kern/vfs_syscalls.c Tue Dec 14 00:49:40 2004 @@ -110,7 +110,7 @@ #ifdef DEBUG static int syncprt = 0; -SYSCTL_INT(_debug, OID_AUTO, syncprt, CTLFLAG_RW, &syncprt, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, syncprt, CTLFLAG_RW, &syncprt, 0, "", &Giant); #endif /* ARGSUSED */ @@ -159,7 +159,7 @@ /* XXX PRISON: could be per prison flag */ static int prison_quotas; #if 0 -SYSCTL_INT(_kern_prison, OID_AUTO, quotas, CTLFLAG_RW, &prison_quotas, 0, ""); +SYSCTL_INT(_kern_prison, OID_AUTO, quotas, CTLFLAG_RW, &prison_quotas, 0, "", &Giant); #endif /* @@ -792,7 +792,7 @@ static int chroot_allow_open_directories = 1; SYSCTL_INT(_kern, OID_AUTO, chroot_allow_open_directories, CTLFLAG_RW, - &chroot_allow_open_directories, 0, ""); + &chroot_allow_open_directories, 0, "", &Giant); /* * Change notion of root (``/'') directory. @@ -1336,12 +1336,12 @@ SYSCTL_INT(_security_bsd, OID_AUTO, hardlink_check_uid, CTLFLAG_RW, &hardlink_check_uid, 0, "Unprivileged processes cannot create hard links to files owned by other " - "users"); + "users", &Giant); static int hardlink_check_gid = 0; SYSCTL_INT(_security_bsd, OID_AUTO, hardlink_check_gid, CTLFLAG_RW, &hardlink_check_gid, 0, "Unprivileged processes cannot create hard links to files owned by other " - "groups"); + "groups", &Giant); static int can_hardlink(struct vnode *vp, struct thread *td, struct ucred *cred) diff -ur /home/refugee/freebsd/current/src/sys/libkern/iconv.c repl/libkern/iconv.c --- /home/refugee/freebsd/current/src/sys/libkern/iconv.c Sun Oct 31 04:52:33 2004 +++ repl/libkern/iconv.c Tue Dec 14 00:49:53 2004 @@ -45,7 +45,7 @@ SYSCTL_DECL(_kern_iconv); -SYSCTL_NODE(_kern, OID_AUTO, iconv, CTLFLAG_RW, NULL, "kernel iconv interface"); +SYSCTL_NODE(_kern, OID_AUTO, iconv, CTLFLAG_RW, NULL, "kernel iconv interface", NULL); MALLOC_DEFINE(M_ICONV, "ICONV", "ICONV structures"); MALLOC_DEFINE(M_ICONVDATA, "ICONV data", "ICONV data"); @@ -328,7 +328,7 @@ } SYSCTL_PROC(_kern_iconv, OID_AUTO, drvlist, CTLFLAG_RD | CTLTYPE_OPAQUE, - NULL, 0, iconv_sysctl_drvlist, "S,xlat", "registered converters"); + NULL, 0, iconv_sysctl_drvlist, "S,xlat", "registered converters", &Giant); /* * List all available charset pairs. @@ -358,7 +358,7 @@ } SYSCTL_PROC(_kern_iconv, OID_AUTO, cslist, CTLFLAG_RD | CTLTYPE_OPAQUE, - NULL, 0, iconv_sysctl_cslist, "S,xlat", "registered charset pairs"); + NULL, 0, iconv_sysctl_cslist, "S,xlat", "registered charset pairs", &Giant); /* * Add new charset pair @@ -402,7 +402,7 @@ } SYSCTL_PROC(_kern_iconv, OID_AUTO, add, CTLFLAG_RW | CTLTYPE_OPAQUE, - NULL, 0, iconv_sysctl_add, "S,xlat", "register charset pair"); + NULL, 0, iconv_sysctl_add, "S,xlat", "register charset pair", &Giant); /* * Default stubs for converters diff -ur /home/refugee/freebsd/current/src/sys/net/bpf.c repl/net/bpf.c --- /home/refugee/freebsd/current/src/sys/net/bpf.c Wed Dec 8 20:41:05 2004 +++ repl/net/bpf.c Tue Dec 14 00:49:53 2004 @@ -83,10 +83,10 @@ */ static int bpf_bufsize = 4096; SYSCTL_INT(_debug, OID_AUTO, bpf_bufsize, CTLFLAG_RW, - &bpf_bufsize, 0, ""); + &bpf_bufsize, 0, "", &Giant); static int bpf_maxbufsize = BPF_MAXBUFSIZE; SYSCTL_INT(_debug, OID_AUTO, bpf_maxbufsize, CTLFLAG_RW, - &bpf_maxbufsize, 0, ""); + &bpf_maxbufsize, 0, "", &Giant); /* * bpf_iflist is the list of interfaces; each corresponds to an ifnet diff -ur /home/refugee/freebsd/current/src/sys/net/bridge.c repl/net/bridge.c --- /home/refugee/freebsd/current/src/sys/net/bridge.c Sun Oct 31 04:52:31 2004 +++ repl/net/bridge.c Tue Dec 14 00:49:53 2004 @@ -199,13 +199,13 @@ "Bridge parameters"); static char bridge_version[] = "031224"; SYSCTL_STRING(_net_link_ether_bridge, OID_AUTO, version, CTLFLAG_RD, - bridge_version, 0, "software version"); + bridge_version, 0, "software version", &Giant); #define BRIDGE_DEBUG #ifdef BRIDGE_DEBUG int bridge_debug = 0; SYSCTL_INT(_net_link_ether_bridge, OID_AUTO, debug, CTLFLAG_RW, &bridge_debug, - 0, "control debugging printfs"); + 0, "control debugging printfs", &Giant); #define DPRINTF(X) if (bridge_debug) printf X #else #define DPRINTF(X) @@ -227,13 +227,13 @@ static int bdg_fw_avg; SYSCTL_INT(_net_link_ether_bridge, OID_AUTO, fw_avg, CTLFLAG_RW, - &bdg_fw_avg, 0,"Cycle counter avg"); + &bdg_fw_avg, 0,"Cycle counter avg", &Giant); static int bdg_fw_ticks; SYSCTL_INT(_net_link_ether_bridge, OID_AUTO, fw_ticks, CTLFLAG_RW, - &bdg_fw_ticks, 0,"Cycle counter item"); + &bdg_fw_ticks, 0,"Cycle counter item", &Giant); static int bdg_fw_count; SYSCTL_INT(_net_link_ether_bridge, OID_AUTO, fw_count, CTLFLAG_RW, - &bdg_fw_count, 0,"Cycle counter count"); + &bdg_fw_count, 0,"Cycle counter count", &Giant); #else #define DDB(x) #endif @@ -244,31 +244,31 @@ static int bdg_ipf; /* IPFilter enabled in bridge */ SYSCTL_INT(_net_link_ether_bridge, OID_AUTO, ipf, CTLFLAG_RW, - &bdg_ipf, 0,"Pass bridged pkts through IPFilter"); + &bdg_ipf, 0,"Pass bridged pkts through IPFilter", &Giant); static int bdg_ipfw; SYSCTL_INT(_net_link_ether_bridge, OID_AUTO, ipfw, CTLFLAG_RW, - &bdg_ipfw,0,"Pass bridged pkts through firewall"); + &bdg_ipfw,0,"Pass bridged pkts through firewall", &Giant); static int bdg_copy; SYSCTL_INT(_net_link_ether_bridge, OID_AUTO, copy, CTLFLAG_RW, - &bdg_copy, 0, "Force packet copy in bdg_forward"); + &bdg_copy, 0, "Force packet copy in bdg_forward", &Giant); int bdg_ipfw_drops; SYSCTL_INT(_net_link_ether_bridge, OID_AUTO, ipfw_drop, - CTLFLAG_RW, &bdg_ipfw_drops,0,""); + CTLFLAG_RW, &bdg_ipfw_drops,0,"", &Giant); int bdg_ipfw_colls; SYSCTL_INT(_net_link_ether_bridge, OID_AUTO, ipfw_collisions, - CTLFLAG_RW, &bdg_ipfw_colls,0,""); + CTLFLAG_RW, &bdg_ipfw_colls,0,"", &Giant); static int bdg_thru; SYSCTL_INT(_net_link_ether_bridge, OID_AUTO, packets, CTLFLAG_RW, - &bdg_thru, 0, "Packets through bridge"); + &bdg_thru, 0, "Packets through bridge", &Giant); static int bdg_dropped; SYSCTL_INT(_net_link_ether_bridge, OID_AUTO, dropped, CTLFLAG_RW, - &bdg_dropped, 0, "Packets dropped in bdg_forward"); + &bdg_dropped, 0, "Packets dropped in bdg_forward", &Giant); static int bdg_predict; SYSCTL_INT(_net_link_ether_bridge, OID_AUTO, predict, CTLFLAG_RW, - &bdg_predict, 0, "Correctly predicted header location"); + &bdg_predict, 0, "Correctly predicted header location", &Giant); #ifdef BRIDGE_DEBUG static char *bdg_dst_names[] = { @@ -288,7 +288,7 @@ */ static struct bdg_stats bdg_stats ; SYSCTL_STRUCT(_net_link_ether_bridge, OID_AUTO, stats, CTLFLAG_RD, - &bdg_stats, bdg_stats, "bridge statistics"); + &bdg_stats, bdg_stats, "bridge statistics", &Giant); static struct callout bdg_callout; @@ -561,7 +561,7 @@ int enable = do_bridge; int error; - error = sysctl_handle_int(oidp, &enable, 0, req); + error = sysctl_handle_int(oidp, &enable, 0, req, &Giant); enable = (enable) ? 1 : 0; BDG_LOCK(); if (enable != do_bridge) { @@ -572,7 +572,7 @@ return error ; } SYSCTL_PROC(_net_link_ether_bridge, OID_AUTO, enable, CTLTYPE_INT|CTLFLAG_RW, - &do_bridge, 0, &sysctl_bdg, "I", "Bridging"); + &do_bridge, 0, &sysctl_bdg, "I", "Bridging", &Giant); /* * handler for net.link.ether.bridge_cfg @@ -586,7 +586,7 @@ new_cfg = malloc(sizeof(bridge_cfg), M_TEMP, M_WAITOK); bcopy(bridge_cfg, new_cfg, sizeof(bridge_cfg)); - error = sysctl_handle_string(oidp, new_cfg, oidp->oid_arg2, req); + error = sysctl_handle_string(oidp, new_cfg, oidp->oid_arg2, req, &Giant); if (error == 0) { BDG_LOCK(); if (strcmp(new_cfg, bridge_cfg)) { @@ -602,18 +602,18 @@ } SYSCTL_PROC(_net_link_ether_bridge, OID_AUTO, config, CTLTYPE_STRING|CTLFLAG_RW, &bridge_cfg, sizeof(bridge_cfg), &sysctl_bdg_cfg, "A", - "Bridge configuration"); + "Bridge configuration", &Giant); static int sysctl_refresh(SYSCTL_HANDLER_ARGS) { if (req->newptr) - reconfigure_bridge(); + reconfigure_bridge(, &Giant); return 0; } SYSCTL_PROC(_net_link_ether_bridge, OID_AUTO, refresh, CTLTYPE_INT|CTLFLAG_WR, - NULL, 0, &sysctl_refresh, "I", "iface refresh"); + NULL, 0, &sysctl_refresh, "I", "iface refresh", &Giant); #ifndef BURN_BRIDGES #define SYSCTL_OID_COMPAT(parent, nbr, name, kind, a1, a2, handler, fmt, descr)\ @@ -633,18 +633,18 @@ ptr, arg, handler, fmt, descr) SYSCTL_INT_COMPAT(_net_link_ether, OID_AUTO, bridge_ipf, CTLFLAG_RW, - &bdg_ipf, 0,"Pass bridged pkts through IPFilter"); + &bdg_ipf, 0,"Pass bridged pkts through IPFilter", &Giant); SYSCTL_INT_COMPAT(_net_link_ether, OID_AUTO, bridge_ipfw, CTLFLAG_RW, - &bdg_ipfw,0,"Pass bridged pkts through firewall"); + &bdg_ipfw,0,"Pass bridged pkts through firewall", &Giant); SYSCTL_STRUCT_COMPAT(_net_link_ether, PF_BDG, bdgstats, CTLFLAG_RD, - &bdg_stats, bdg_stats, "bridge statistics"); + &bdg_stats, bdg_stats, "bridge statistics", &Giant); SYSCTL_PROC_COMPAT(_net_link_ether, OID_AUTO, bridge_cfg, CTLTYPE_STRING|CTLFLAG_RW, &bridge_cfg, sizeof(bridge_cfg), &sysctl_bdg_cfg, "A", - "Bridge configuration"); + "Bridge configuration", &Giant); SYSCTL_PROC_COMPAT(_net_link_ether, OID_AUTO, bridge_refresh, CTLTYPE_INT|CTLFLAG_WR, - NULL, 0, &sysctl_refresh, "I", "iface refresh"); + NULL, 0, &sysctl_refresh, "I", "iface refresh", &Giant); #endif static int bdg_loops; diff -ur /home/refugee/freebsd/current/src/sys/net/if.c repl/net/if.c --- /home/refugee/freebsd/current/src/sys/net/if.c Wed Dec 8 20:41:05 2004 +++ repl/net/if.c Tue Dec 14 00:49:53 2004 @@ -2000,5 +2000,5 @@ return (1); } -SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG_RW, 0, "Link layers"); -SYSCTL_NODE(_net_link, 0, generic, CTLFLAG_RW, 0, "Generic link-management"); +SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG_RW, 0, "Link layers", NULL); +SYSCTL_NODE(_net_link, 0, generic, CTLFLAG_RW, 0, "Generic link-management", NULL); diff -ur /home/refugee/freebsd/current/src/sys/net/if_atmsubr.c repl/net/if_atmsubr.c --- /home/refugee/freebsd/current/src/sys/net/if_atmsubr.c Sun Oct 31 04:52:31 2004 +++ repl/net/if_atmsubr.c Tue Dec 14 00:49:53 2004 @@ -96,7 +96,7 @@ void (*atm_harp_detach_p)(struct ifnet *); void (*atm_harp_event_p)(struct ifnet *, uint32_t, void *); -SYSCTL_NODE(_hw, OID_AUTO, atm, CTLFLAG_RW, 0, "ATM hardware"); +SYSCTL_NODE(_hw, OID_AUTO, atm, CTLFLAG_RW, 0, "ATM hardware", NULL); #ifndef ETHERTYPE_IPV6 #define ETHERTYPE_IPV6 0x86dd diff -ur /home/refugee/freebsd/current/src/sys/net/if_ethersubr.c repl/net/if_ethersubr.c --- /home/refugee/freebsd/current/src/sys/net/if_ethersubr.c Sun Oct 31 04:52:31 2004 +++ repl/net/if_ethersubr.c Tue Dec 14 00:49:53 2004 @@ -863,10 +863,10 @@ } SYSCTL_DECL(_net_link); -SYSCTL_NODE(_net_link, IFT_ETHER, ether, CTLFLAG_RW, 0, "Ethernet"); +SYSCTL_NODE(_net_link, IFT_ETHER, ether, CTLFLAG_RW, 0, "Ethernet", NULL); #if defined(INET) || defined(INET6) SYSCTL_INT(_net_link_ether, OID_AUTO, ipfw, CTLFLAG_RW, - ðer_ipfw,0,"Pass ether pkts through firewall"); + ðer_ipfw,0,"Pass ether pkts through firewall", &Giant); #endif #if 0 diff -ur /home/refugee/freebsd/current/src/sys/net/if_gif.c repl/net/if_gif.c --- /home/refugee/freebsd/current/src/sys/net/if_gif.c Sun Oct 31 04:52:31 2004 +++ repl/net/if_gif.c Tue Dec 14 00:49:53 2004 @@ -121,7 +121,7 @@ #endif static int max_gif_nesting = MAX_GIF_NEST; SYSCTL_INT(_net_link_gif, OID_AUTO, max_nesting, CTLFLAG_RW, - &max_gif_nesting, 0, "Max nested tunnels"); + &max_gif_nesting, 0, "Max nested tunnels", &Giant); /* * By default, we disallow creation of multiple tunnels between the same @@ -134,7 +134,7 @@ static int parallel_tunnels = 0; #endif SYSCTL_INT(_net_link_gif, OID_AUTO, parallel_tunnels, CTLFLAG_RW, - ¶llel_tunnels, 0, "Allow parallel tunnels?"); + ¶llel_tunnels, 0, "Allow parallel tunnels?", &Giant); static int gif_clone_create(ifc, unit) diff -ur /home/refugee/freebsd/current/src/sys/net/if_gre.c repl/net/if_gre.c --- /home/refugee/freebsd/current/src/sys/net/if_gre.c Sun Oct 31 04:52:31 2004 +++ repl/net/if_gre.c Tue Dec 14 00:49:53 2004 @@ -148,7 +148,7 @@ #endif static int max_gre_nesting = MAX_GRE_NEST; SYSCTL_INT(_net_link_gre, OID_AUTO, max_nesting, CTLFLAG_RW, - &max_gre_nesting, 0, "Max nested tunnels"); + &max_gre_nesting, 0, "Max nested tunnels", &Giant); /* ARGSUSED */ static void diff -ur /home/refugee/freebsd/current/src/sys/net/if_mib.c repl/net/if_mib.c --- /home/refugee/freebsd/current/src/sys/net/if_mib.c Sun Oct 31 04:52:31 2004 +++ repl/net/if_mib.c Tue Dec 14 00:49:53 2004 @@ -65,7 +65,7 @@ SYSCTL_NODE(_net_link_generic, IFMIB_SYSTEM, system, CTLFLAG_RW, 0, "Variables global to all interfaces"); SYSCTL_INT(_net_link_generic_system, IFMIB_IFCOUNT, ifcount, CTLFLAG_RD, - &if_index, 0, "Number of configured interfaces"); + &if_index, 0, "Number of configured interfaces", &Giant); static int sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XXX bad syntax! */ diff -ur /home/refugee/freebsd/current/src/sys/net/if_tap.c repl/net/if_tap.c --- /home/refugee/freebsd/current/src/sys/net/if_tap.c Sun Nov 14 03:56:35 2004 +++ repl/net/if_tap.c Tue Dec 14 00:49:53 2004 @@ -121,7 +121,7 @@ MALLOC_DECLARE(M_TAP); MALLOC_DEFINE(M_TAP, CDEV_NAME, "Ethernet tunnel interface"); -SYSCTL_INT(_debug, OID_AUTO, if_tap_debug, CTLFLAG_RW, &tapdebug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, if_tap_debug, CTLFLAG_RW, &tapdebug, 0, "", &Giant); DEV_MODULE(if_tap, tapmodevent, NULL); /* diff -ur /home/refugee/freebsd/current/src/sys/net/if_tun.c repl/net/if_tun.c --- /home/refugee/freebsd/current/src/sys/net/if_tun.c Sun Nov 14 03:56:35 2004 +++ repl/net/if_tun.c Tue Dec 14 00:49:53 2004 @@ -103,7 +103,7 @@ static int tundebug = 0; static struct clonedevs *tunclones; static TAILQ_HEAD(,tun_softc) tunhead = TAILQ_HEAD_INITIALIZER(tunhead); -SYSCTL_INT(_debug, OID_AUTO, if_tun_debug, CTLFLAG_RW, &tundebug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, if_tun_debug, CTLFLAG_RW, &tundebug, 0, "", &Giant); static void tunclone(void *arg, char *name, int namelen, struct cdev **dev); static void tuncreate(struct cdev *dev); diff -ur /home/refugee/freebsd/current/src/sys/net/if_vlan.c repl/net/if_vlan.c --- /home/refugee/freebsd/current/src/sys/net/if_vlan.c Sun Oct 31 04:52:31 2004 +++ repl/net/if_vlan.c Tue Dec 14 00:49:53 2004 @@ -100,8 +100,8 @@ #define IFVF_PROMISC 0x01 /* promiscuous mode enabled */ SYSCTL_DECL(_net_link); -SYSCTL_NODE(_net_link, IFT_L2VLAN, vlan, CTLFLAG_RW, 0, "IEEE 802.1Q VLAN"); -SYSCTL_NODE(_net_link_vlan, PF_LINK, link, CTLFLAG_RW, 0, "for consistency"); +SYSCTL_NODE(_net_link, IFT_L2VLAN, vlan, CTLFLAG_RW, 0, "IEEE 802.1Q VLAN", NULL); +SYSCTL_NODE(_net_link_vlan, PF_LINK, link, CTLFLAG_RW, 0, "for consistency", NULL); static MALLOC_DEFINE(M_VLAN, VLANNAME, "802.1Q Virtual LAN Interface"); static LIST_HEAD(, ifvlan) ifv_list; diff -ur /home/refugee/freebsd/current/src/sys/net/netisr.c repl/net/netisr.c --- /home/refugee/freebsd/current/src/sys/net/netisr.c Sun Oct 31 04:52:31 2004 +++ repl/net/netisr.c Tue Dec 14 00:49:53 2004 @@ -71,7 +71,7 @@ TUNABLE_INT("debug.mpsafenet", &debug_mpsafenet); SYSCTL_INT(_debug, OID_AUTO, mpsafenet, CTLFLAG_RD, &debug_mpsafenet, 0, - "Enable/disable MPSAFE network support"); + "Enable/disable MPSAFE network support", &Giant); volatile unsigned int netisr; /* scheduling bits for network */ @@ -198,25 +198,25 @@ }; static struct isrstat isrstat; -SYSCTL_NODE(_net, OID_AUTO, isr, CTLFLAG_RW, 0, "netisr counters"); +SYSCTL_NODE(_net, OID_AUTO, isr, CTLFLAG_RW, 0, "netisr counters", NULL); static int netisr_enable = 0; SYSCTL_INT(_net_isr, OID_AUTO, enable, CTLFLAG_RW, - &netisr_enable, 0, "enable direct dispatch"); + &netisr_enable, 0, "enable direct dispatch", &Giant); TUNABLE_INT("net.isr.enable", &netisr_enable); SYSCTL_INT(_net_isr, OID_AUTO, count, CTLFLAG_RD, - &isrstat.isrs_count, 0, ""); + &isrstat.isrs_count, 0, "", &Giant); SYSCTL_INT(_net_isr, OID_AUTO, directed, CTLFLAG_RD, - &isrstat.isrs_directed, 0, ""); + &isrstat.isrs_directed, 0, "", &Giant); SYSCTL_INT(_net_isr, OID_AUTO, deferred, CTLFLAG_RD, - &isrstat.isrs_deferred, 0, ""); + &isrstat.isrs_deferred, 0, "", &Giant); SYSCTL_INT(_net_isr, OID_AUTO, queued, CTLFLAG_RD, - &isrstat.isrs_queued, 0, ""); + &isrstat.isrs_queued, 0, "", &Giant); SYSCTL_INT(_net_isr, OID_AUTO, drop, CTLFLAG_RD, - &isrstat.isrs_drop, 0, ""); + &isrstat.isrs_drop, 0, "", &Giant); SYSCTL_INT(_net_isr, OID_AUTO, swi_count, CTLFLAG_RD, - &isrstat.isrs_swi_count, 0, ""); + &isrstat.isrs_swi_count, 0, "", &Giant); /* * Process all packets currently present in a netisr queue. Used to diff -ur /home/refugee/freebsd/current/src/sys/net/rtsock.c repl/net/rtsock.c --- /home/refugee/freebsd/current/src/sys/net/rtsock.c Sun Nov 14 03:56:35 2004 +++ repl/net/rtsock.c Tue Dec 14 00:49:53 2004 @@ -74,9 +74,9 @@ static struct ifqueue rtsintrq; -SYSCTL_NODE(_net, OID_AUTO, route, CTLFLAG_RD, 0, ""); +SYSCTL_NODE(_net, OID_AUTO, route, CTLFLAG_RD, 0, "", NULL); SYSCTL_INT(_net_route, OID_AUTO, netisr_maxqlen, CTLFLAG_RW, - &rtsintrq.ifq_maxlen, 0, "maximum routing socket dispatch queue length"); + &rtsintrq.ifq_maxlen, 0, "maximum routing socket dispatch queue length", &Giant); struct walkarg { int w_tmemsize; @@ -91,9 +91,9 @@ caddr_t cp, struct walkarg *w); static int rt_xaddrs(caddr_t cp, caddr_t cplim, struct rt_addrinfo *rtinfo); -static int sysctl_dumpentry(struct radix_node *rn, void *vw); -static int sysctl_iflist(int af, struct walkarg *w); -static int sysctl_ifmalist(int af, struct walkarg *w); +static int sysctl_dumpentry(struct radix_node *rn, void *vw, &Giant); +static int sysctl_iflist(int af, struct walkarg *w, &Giant); +static int sysctl_ifmalist(int af, struct walkarg *w, &Giant); static int route_output(struct mbuf *m, struct socket *so); static void rt_setmetrics(u_long which, const struct rt_metrics *in, struct rt_metrics_lite *out); @@ -1230,11 +1230,11 @@ break; case NET_RT_IFLIST: - error = sysctl_iflist(af, &w); + error = sysctl_iflist(af, &w, &Giant); break; case NET_RT_IFMALIST: - error = sysctl_ifmalist(af, &w); + error = sysctl_ifmalist(af, &w, &Giant); break; } splx(s); @@ -1243,7 +1243,7 @@ return (error); } -SYSCTL_NODE(_net, PF_ROUTE, routetable, CTLFLAG_RD, sysctl_rtsock, ""); +SYSCTL_NODE(_net, PF_ROUTE, routetable, CTLFLAG_RD, sysctl_rtsock, "", NULL); /* * Definitions of protocols supported in the ROUTE domain. diff -ur /home/refugee/freebsd/current/src/sys/net80211/ieee80211_freebsd.c repl/net80211/ieee80211_freebsd.c --- /home/refugee/freebsd/current/src/sys/net80211/ieee80211_freebsd.c Wed Dec 8 17:34:07 2004 +++ repl/net80211/ieee80211_freebsd.c Tue Dec 14 00:49:52 2004 @@ -49,12 +49,12 @@ #include -SYSCTL_NODE(_net, OID_AUTO, wlan, CTLFLAG_RD, 0, "IEEE 80211 parameters"); +SYSCTL_NODE(_net, OID_AUTO, wlan, CTLFLAG_RD, 0, "IEEE 80211 parameters", NULL); #ifdef IEEE80211_DEBUG int ieee80211_debug = 0; SYSCTL_INT(_net_wlan, OID_AUTO, debug, CTLFLAG_RW, &ieee80211_debug, - 0, "debugging printfs"); + 0, "debugging printfs", &Giant); #endif static int @@ -63,7 +63,7 @@ int inact = (*(int *)arg1) * IEEE80211_INACT_WAIT; int error; - error = sysctl_handle_int(oidp, &inact, 0, req); + error = sysctl_handle_int(oidp, &inact, 0, req, &Giant); if (error || !req->newptr) return error; *(int *)arg1 = inact / IEEE80211_INACT_WAIT; @@ -87,42 +87,42 @@ char num[14]; /* sufficient for 32 bits */ MALLOC(ctx, struct sysctl_ctx_list *, sizeof(struct sysctl_ctx_list), - M_DEVBUF, M_NOWAIT | M_ZERO); + M_DEVBUF, M_NOWAIT | M_ZERO, &Giant); if (ctx == NULL) { if_printf(ic->ic_ifp, "%s: cannot allocate sysctl context!\n", __func__); return; } - sysctl_ctx_init(ctx); + sysctl_ctx_init(ctx, &Giant); snprintf(num, sizeof(num), "%u", ic->ic_vap); oid = SYSCTL_ADD_NODE(ctx, &SYSCTL_NODE_CHILDREN(_net, wlan), - OID_AUTO, num, CTLFLAG_RD, NULL, ""); + OID_AUTO, num, CTLFLAG_RD, NULL, "", &Giant); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "%parent", CTLFLAG_RD, ic, 0, ieee80211_sysctl_parent, "A", - "parent device"); + "parent device", &Giant); #ifdef IEEE80211_DEBUG ic->ic_debug = ieee80211_debug; SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "debug", CTLFLAG_RW, &ic->ic_debug, 0, - "control debugging printfs"); + "control debugging printfs", &Giant); #endif /* XXX inherit from tunables */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "inact", CTLTYPE_INT | CTLFLAG_RW, &ic->ic_inact_run, 0, ieee80211_sysctl_inact, "I", - "station inactivity timeout (sec)"); + "station inactivity timeout (sec)", &Giant); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "inact_probe", CTLTYPE_INT | CTLFLAG_RW, &ic->ic_inact_probe, 0, ieee80211_sysctl_inact, "I", - "station inactivity probe timeout (sec)"); + "station inactivity probe timeout (sec)", &Giant); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "inact_auth", CTLTYPE_INT | CTLFLAG_RW, &ic->ic_inact_auth, 0, ieee80211_sysctl_inact, "I", - "station authentication timeout (sec)"); + "station authentication timeout (sec)", &Giant); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "inact_init", CTLTYPE_INT | CTLFLAG_RW, &ic->ic_inact_init, 0, ieee80211_sysctl_inact, "I", - "station initial state timeout (sec)"); + "station initial state timeout (sec)", &Giant); ic->ic_sysctl = ctx; } @@ -131,7 +131,7 @@ { if (ic->ic_sysctl != NULL) { - sysctl_ctx_free(ic->ic_sysctl); + sysctl_ctx_free(ic->ic_sysctl, &Giant); ic->ic_sysctl = NULL; } } diff -ur /home/refugee/freebsd/current/src/sys/netatm/atm_proto.c repl/netatm/atm_proto.c --- /home/refugee/freebsd/current/src/sys/netatm/atm_proto.c Sun Oct 31 04:50:19 2004 +++ repl/netatm/atm_proto.c Tue Dec 14 00:49:40 2004 @@ -115,8 +115,8 @@ DOMAIN_SET(atm); -SYSCTL_NODE(_net, PF_ATM, harp, CTLFLAG_RW, 0, "HARP/ATM family"); -SYSCTL_NODE(_net_harp, OID_AUTO, atm, CTLFLAG_RW, 0, "ATM layer"); +SYSCTL_NODE(_net, PF_ATM, harp, CTLFLAG_RW, 0, "HARP/ATM family", NULL); +SYSCTL_NODE(_net_harp, OID_AUTO, atm, CTLFLAG_RW, 0, "ATM layer", NULL); /* * Protocol request not supported diff -ur /home/refugee/freebsd/current/src/sys/netatm/atm_subr.c repl/netatm/atm_subr.c --- /home/refugee/freebsd/current/src/sys/netatm/atm_subr.c Sun Oct 31 04:50:19 2004 +++ repl/netatm/atm_subr.c Tue Dec 14 00:49:40 2004 @@ -76,21 +76,21 @@ */ int atm_debug; SYSCTL_INT(_net_harp_atm, OID_AUTO, atm_debug, CTLFLAG_RW, - &atm_debug, 0, "HARP ATM layer debugging flag"); + &atm_debug, 0, "HARP ATM layer debugging flag", &Giant); /* * net.harp.atm.atm_dev_print */ int atm_dev_print; SYSCTL_INT(_net_harp_atm, OID_AUTO, atm_dev_print, CTLFLAG_RW, - &atm_dev_print, 0, "display ATM CPCS headers"); + &atm_dev_print, 0, "display ATM CPCS headers", &Giant); /* * net.harp.atm.atm_print_data */ int atm_print_data; SYSCTL_INT(_net_harp_atm, OID_AUTO, atm_print_data, CTLFLAG_RW, - &atm_print_data, 0, "display ATM CPCS payloads"); + &atm_print_data, 0, "display ATM CPCS payloads", &Giant); /* * Local functions diff -ur /home/refugee/freebsd/current/src/sys/netatm/ipatm/ipatm_load.c repl/netatm/ipatm/ipatm_load.c --- /home/refugee/freebsd/current/src/sys/netatm/ipatm/ipatm_load.c Sun Oct 31 04:50:19 2004 +++ repl/netatm/ipatm/ipatm_load.c Tue Dec 14 00:49:40 2004 @@ -103,14 +103,14 @@ /* * net.harp.ip */ -SYSCTL_NODE(_net_harp, OID_AUTO, ip, CTLFLAG_RW, 0, "IPv4 over ATM"); +SYSCTL_NODE(_net_harp, OID_AUTO, ip, CTLFLAG_RW, 0, "IPv4 over ATM", NULL); /* * net.harp.ip.ipatm_print */ int ipatm_print = 0; SYSCTL_INT(_net_harp_ip, OID_AUTO, ipatm_print, CTLFLAG_RW, - &ipatm_print, 0, "dump IPv4-over-ATM packets"); + &ipatm_print, 0, "dump IPv4-over-ATM packets", &Giant); /* diff -ur /home/refugee/freebsd/current/src/sys/netatm/spans/spans_cls.c repl/netatm/spans/spans_cls.c --- /home/refugee/freebsd/current/src/sys/netatm/spans/spans_cls.c Sun Oct 31 04:50:18 2004 +++ repl/netatm/spans/spans_cls.c Tue Dec 14 00:49:39 2004 @@ -71,7 +71,7 @@ */ int spanscls_print = 0; SYSCTL_INT(_net_harp_spans, OID_AUTO, spanscls_print, CTLFLAG_RW, - &spanscls_print, 0, "dump SPANS packets"); + &spanscls_print, 0, "dump SPANS packets", &Giant); struct spanscls *spanscls_head = NULL; diff -ur /home/refugee/freebsd/current/src/sys/netatm/spans/spans_proto.c repl/netatm/spans/spans_proto.c --- /home/refugee/freebsd/current/src/sys/netatm/spans/spans_proto.c Sun Oct 31 04:50:18 2004 +++ repl/netatm/spans/spans_proto.c Tue Dec 14 00:49:39 2004 @@ -184,7 +184,7 @@ { 0, 0, 0, 0 } /* diagnostics */ }; -SYSCTL_NODE(_net_harp, OID_AUTO, spans, CTLFLAG_RW, 0, "spans"); +SYSCTL_NODE(_net_harp, OID_AUTO, spans, CTLFLAG_RW, 0, "spans", NULL); /* * Process a SPANS timeout diff -ur /home/refugee/freebsd/current/src/sys/netatm/uni/uniarp.c repl/netatm/uni/uniarp.c --- /home/refugee/freebsd/current/src/sys/netatm/uni/uniarp.c Sun Oct 31 04:50:18 2004 +++ repl/netatm/uni/uniarp.c Tue Dec 14 00:49:40 2004 @@ -81,7 +81,7 @@ */ int uniarp_print = 0; SYSCTL_INT(_net_harp_uni, OID_AUTO, uniarp_print, CTLFLAG_RW, - &uniarp_print, 0, "dump UNI/ARP messages"); + &uniarp_print, 0, "dump UNI/ARP messages", &Giant); Atm_endpoint uniarp_endpt = { NULL, diff -ur /home/refugee/freebsd/current/src/sys/netatm/uni/unisig_msg.c repl/netatm/uni/unisig_msg.c --- /home/refugee/freebsd/current/src/sys/netatm/uni/unisig_msg.c Sun Oct 31 04:50:18 2004 +++ repl/netatm/uni/unisig_msg.c Tue Dec 14 00:49:40 2004 @@ -78,7 +78,7 @@ */ static int unisig_print_msg = 0; SYSCTL_INT(_net_harp_uni, OID_AUTO, unisig_print_msg, CTLFLAG_RW, - &unisig_print_msg, 0, "dump UNI messages"); + &unisig_print_msg, 0, "dump UNI messages", &Giant); /* * Set a Cause IE based on information in an ATM attribute block diff -ur /home/refugee/freebsd/current/src/sys/netatm/uni/unisig_proto.c repl/netatm/uni/unisig_proto.c --- /home/refugee/freebsd/current/src/sys/netatm/uni/unisig_proto.c Sun Oct 31 04:50:18 2004 +++ repl/netatm/uni/unisig_proto.c Tue Dec 14 00:49:40 2004 @@ -60,7 +60,7 @@ /* * net.harp.uni */ -SYSCTL_NODE(_net_harp, OID_AUTO, uni, CTLFLAG_RW, 0, "UNI"); +SYSCTL_NODE(_net_harp, OID_AUTO, uni, CTLFLAG_RW, 0, "UNI", NULL); /* * Process a UNISIG timeout diff -ur /home/refugee/freebsd/current/src/sys/netgraph/atm/ng_atm.c repl/netgraph/atm/ng_atm.c --- /home/refugee/freebsd/current/src/sys/netgraph/atm/ng_atm.c Sun Oct 31 04:50:45 2004 +++ repl/netgraph/atm/ng_atm.c Tue Dec 14 00:49:43 2004 @@ -72,13 +72,13 @@ /* * Sysctl stuff. */ -SYSCTL_NODE(_net_graph, OID_AUTO, atm, CTLFLAG_RW, 0, "atm related stuff"); +SYSCTL_NODE(_net_graph, OID_AUTO, atm, CTLFLAG_RW, 0, "atm related stuff", NULL); #ifdef NGATM_DEBUG static int allow_shutdown; SYSCTL_INT(_net_graph_atm, OID_AUTO, allow_shutdown, CTLFLAG_RW, - &allow_shutdown, 0, "allow ng_atm nodes to shutdown"); + &allow_shutdown, 0, "allow ng_atm nodes to shutdown", &Giant); #endif /* diff -ur /home/refugee/freebsd/current/src/sys/netgraph/bluetooth/common/ng_bluetooth.c repl/netgraph/bluetooth/common/ng_bluetooth.c --- /home/refugee/freebsd/current/src/sys/netgraph/bluetooth/common/ng_bluetooth.c Sun Oct 31 04:50:46 2004 +++ repl/netgraph/bluetooth/common/ng_bluetooth.c Tue Dec 14 00:49:43 2004 @@ -52,9 +52,9 @@ * Define sysctl tree that shared by other parts of Bluetooth stack */ -SYSCTL_NODE(_net, OID_AUTO, bluetooth, CTLFLAG_RW, 0, "Bluetooth family"); +SYSCTL_NODE(_net, OID_AUTO, bluetooth, CTLFLAG_RW, 0, "Bluetooth family", NULL); SYSCTL_INT(_net_bluetooth, OID_AUTO, version, - CTLFLAG_RD, 0, NG_BLUETOOTH_VERSION, ""); + CTLFLAG_RD, 0, NG_BLUETOOTH_VERSION, "", &Giant); /* * HCI @@ -70,7 +70,7 @@ int error; value = bluetooth_hci_command_timeout_value; - error = sysctl_handle_int(oidp, &value, sizeof(value), req); + error = sysctl_handle_int(oidp, &value, sizeof(value), req, &Giant); if (error == 0 && req->newptr != NULL) { if (value > 0) bluetooth_hci_command_timeout_value = value; @@ -85,7 +85,7 @@ CTLTYPE_INT | CTLFLAG_RW, &bluetooth_hci_command_timeout_value, 5, bluetooth_set_hci_command_timeout_value, - "I", "HCI command timeout (sec)"); + "I", "HCI command timeout (sec)", &Giant); static int bluetooth_set_hci_connect_timeout_value(SYSCTL_HANDLER_ARGS) @@ -94,7 +94,7 @@ int error; value = bluetooth_hci_connect_timeout_value; - error = sysctl_handle_int(oidp, &value, sizeof(value), req); + error = sysctl_handle_int(oidp, &value, sizeof(value), req, &Giant); if (error == 0 && req->newptr != NULL) { if (0 < value && value <= bluetooth_l2cap_rtx_timeout_value) bluetooth_hci_connect_timeout_value = value; @@ -109,11 +109,11 @@ CTLTYPE_INT | CTLFLAG_RW, &bluetooth_hci_connect_timeout_value, 60, bluetooth_set_hci_connect_timeout_value, - "I", "HCI connect timeout (sec)"); + "I", "HCI connect timeout (sec)", &Giant); SYSCTL_INT(_net_bluetooth_hci, OID_AUTO, max_neighbor_age, CTLFLAG_RW, &bluetooth_hci_max_neighbor_age_value, 600, - "Maximal HCI neighbor cache entry age (sec)"); + "Maximal HCI neighbor cache entry age (sec)", &Giant); /* * L2CAP @@ -129,7 +129,7 @@ int error; value = bluetooth_l2cap_rtx_timeout_value; - error = sysctl_handle_int(oidp, &value, sizeof(value), req); + error = sysctl_handle_int(oidp, &value, sizeof(value), req, &Giant); if (error == 0 && req->newptr != NULL) { if (bluetooth_hci_connect_timeout_value <= value && value <= bluetooth_l2cap_ertx_timeout_value) @@ -145,7 +145,7 @@ CTLTYPE_INT | CTLFLAG_RW, &bluetooth_l2cap_rtx_timeout_value, 60, bluetooth_set_l2cap_rtx_timeout_value, - "I", "L2CAP RTX timeout (sec)"); + "I", "L2CAP RTX timeout (sec)", &Giant); static int bluetooth_set_l2cap_ertx_timeout_value(SYSCTL_HANDLER_ARGS) @@ -154,7 +154,7 @@ int error; value = bluetooth_l2cap_ertx_timeout_value; - error = sysctl_handle_int(oidp, &value, sizeof(value), req); + error = sysctl_handle_int(oidp, &value, sizeof(value), req, &Giant); if (error == 0 && req->newptr != NULL) { if (value >= bluetooth_l2cap_rtx_timeout_value) bluetooth_l2cap_ertx_timeout_value = value; @@ -169,7 +169,7 @@ CTLTYPE_INT | CTLFLAG_RW, &bluetooth_l2cap_ertx_timeout_value, 300, bluetooth_set_l2cap_ertx_timeout_value, - "I", "L2CAP ERTX timeout (sec)"); + "I", "L2CAP ERTX timeout (sec)", &Giant); /* * Return various sysctl values diff -ur /home/refugee/freebsd/current/src/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c repl/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c --- /home/refugee/freebsd/current/src/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Sun Oct 31 04:50:47 2004 +++ repl/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Tue Dec 14 00:49:43 2004 @@ -123,19 +123,19 @@ 0, "Bluetooth raw HCI sockets family"); SYSCTL_INT(_net_bluetooth_hci_sockets_raw, OID_AUTO, debug_level, CTLFLAG_RW, &ng_btsocket_hci_raw_debug_level, NG_BTSOCKET_WARN_LEVEL, - "Bluetooth raw HCI sockets debug level"); + "Bluetooth raw HCI sockets debug level", &Giant); SYSCTL_INT(_net_bluetooth_hci_sockets_raw, OID_AUTO, ioctl_timeout, CTLFLAG_RW, &ng_btsocket_hci_raw_ioctl_timeout, 5, - "Bluetooth raw HCI sockets ioctl timeout"); + "Bluetooth raw HCI sockets ioctl timeout", &Giant); SYSCTL_INT(_net_bluetooth_hci_sockets_raw, OID_AUTO, queue_len, CTLFLAG_RD, &ng_btsocket_hci_raw_queue.len, 0, - "Bluetooth raw HCI sockets input queue length"); + "Bluetooth raw HCI sockets input queue length", &Giant); SYSCTL_INT(_net_bluetooth_hci_sockets_raw, OID_AUTO, queue_maxlen, CTLFLAG_RD, &ng_btsocket_hci_raw_queue.maxlen, 0, - "Bluetooth raw HCI sockets input queue max. length"); + "Bluetooth raw HCI sockets input queue max. length", &Giant); SYSCTL_INT(_net_bluetooth_hci_sockets_raw, OID_AUTO, queue_drops, CTLFLAG_RD, &ng_btsocket_hci_raw_queue.drops, 0, - "Bluetooth raw HCI sockets input queue drops"); + "Bluetooth raw HCI sockets input queue drops", &Giant); /* Debug */ #define NG_BTSOCKET_HCI_RAW_INFO \ diff -ur /home/refugee/freebsd/current/src/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c repl/netgraph/bluetooth/socket/ng_btsocket_l2cap.c --- /home/refugee/freebsd/current/src/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c Sun Oct 31 04:50:47 2004 +++ repl/netgraph/bluetooth/socket/ng_btsocket_l2cap.c Tue Dec 14 00:49:43 2004 @@ -109,19 +109,19 @@ SYSCTL_INT(_net_bluetooth_l2cap_sockets_seq, OID_AUTO, debug_level, CTLFLAG_RW, &ng_btsocket_l2cap_debug_level, NG_BTSOCKET_WARN_LEVEL, - "Bluetooth SEQPACKET L2CAP sockets debug level"); + "Bluetooth SEQPACKET L2CAP sockets debug level", &Giant); SYSCTL_INT(_net_bluetooth_l2cap_sockets_seq, OID_AUTO, queue_len, CTLFLAG_RD, &ng_btsocket_l2cap_queue.len, 0, - "Bluetooth SEQPACKET L2CAP sockets input queue length"); + "Bluetooth SEQPACKET L2CAP sockets input queue length", &Giant); SYSCTL_INT(_net_bluetooth_l2cap_sockets_seq, OID_AUTO, queue_maxlen, CTLFLAG_RD, &ng_btsocket_l2cap_queue.maxlen, 0, - "Bluetooth SEQPACKET L2CAP sockets input queue max. length"); + "Bluetooth SEQPACKET L2CAP sockets input queue max. length", &Giant); SYSCTL_INT(_net_bluetooth_l2cap_sockets_seq, OID_AUTO, queue_drops, CTLFLAG_RD, &ng_btsocket_l2cap_queue.drops, 0, - "Bluetooth SEQPACKET L2CAP sockets input queue drops"); + "Bluetooth SEQPACKET L2CAP sockets input queue drops", &Giant); /* Debug */ #define NG_BTSOCKET_L2CAP_INFO \ diff -ur /home/refugee/freebsd/current/src/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c repl/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c --- /home/refugee/freebsd/current/src/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c Sun Oct 31 04:50:47 2004 +++ repl/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c Tue Dec 14 00:49:43 2004 @@ -123,23 +123,23 @@ SYSCTL_INT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, debug_level, CTLFLAG_RW, &ng_btsocket_l2cap_raw_debug_level, NG_BTSOCKET_WARN_LEVEL, - "Bluetooth raw L2CAP sockets debug level"); + "Bluetooth raw L2CAP sockets debug level", &Giant); SYSCTL_INT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, ioctl_timeout, CTLFLAG_RW, &ng_btsocket_l2cap_raw_ioctl_timeout, 5, - "Bluetooth raw L2CAP sockets ioctl timeout"); + "Bluetooth raw L2CAP sockets ioctl timeout", &Giant); SYSCTL_INT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, queue_len, CTLFLAG_RD, &ng_btsocket_l2cap_raw_queue.len, 0, - "Bluetooth raw L2CAP sockets input queue length"); + "Bluetooth raw L2CAP sockets input queue length", &Giant); SYSCTL_INT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, queue_maxlen, CTLFLAG_RD, &ng_btsocket_l2cap_raw_queue.maxlen, 0, - "Bluetooth raw L2CAP sockets input queue max. length"); + "Bluetooth raw L2CAP sockets input queue max. length", &Giant); SYSCTL_INT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, queue_drops, CTLFLAG_RD, &ng_btsocket_l2cap_raw_queue.drops, 0, - "Bluetooth raw L2CAP sockets input queue drops"); + "Bluetooth raw L2CAP sockets input queue drops", &Giant); /* Debug */ #define NG_BTSOCKET_L2CAP_RAW_INFO \ diff -ur /home/refugee/freebsd/current/src/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c repl/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c --- /home/refugee/freebsd/current/src/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c Sun Oct 31 04:50:47 2004 +++ repl/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c Tue Dec 14 00:49:43 2004 @@ -199,11 +199,11 @@ SYSCTL_INT(_net_bluetooth_rfcomm_sockets_stream, OID_AUTO, debug_level, CTLFLAG_RW, &ng_btsocket_rfcomm_debug_level, NG_BTSOCKET_INFO_LEVEL, - "Bluetooth STREAM RFCOMM sockets debug level"); + "Bluetooth STREAM RFCOMM sockets debug level", &Giant); SYSCTL_INT(_net_bluetooth_rfcomm_sockets_stream, OID_AUTO, timeout, CTLFLAG_RW, &ng_btsocket_rfcomm_timo, 60, - "Bluetooth STREAM RFCOMM sockets timeout"); + "Bluetooth STREAM RFCOMM sockets timeout", &Giant); /***************************************************************************** ***************************************************************************** diff -ur /home/refugee/freebsd/current/src/sys/netgraph/ng_base.c repl/netgraph/ng_base.c --- /home/refugee/freebsd/current/src/sys/netgraph/ng_base.c Wed Dec 8 20:41:09 2004 +++ repl/netgraph/ng_base.c Tue Dec 14 00:49:44 2004 @@ -2989,9 +2989,9 @@ (NULL) }; DECLARE_MODULE(netgraph, netgraph_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); -SYSCTL_NODE(_net, OID_AUTO, graph, CTLFLAG_RW, 0, "netgraph Family"); -SYSCTL_INT(_net_graph, OID_AUTO, abi_version, CTLFLAG_RD, 0, NG_ABI_VERSION,""); -SYSCTL_INT(_net_graph, OID_AUTO, msg_version, CTLFLAG_RD, 0, NG_VERSION, ""); +SYSCTL_NODE(_net, OID_AUTO, graph, CTLFLAG_RW, 0, "netgraph Family", NULL); +SYSCTL_INT(_net_graph, OID_AUTO, abi_version, CTLFLAG_RD, 0, NG_ABI_VERSION,"", &Giant); +SYSCTL_INT(_net_graph, OID_AUTO, msg_version, CTLFLAG_RD, 0, NG_VERSION, "", &Giant); /************************************************************************ Queue element get/free routines @@ -3005,11 +3005,11 @@ TUNABLE_INT("net.graph.maxalloc", &maxalloc); SYSCTL_INT(_net_graph, OID_AUTO, maxalloc, CTLFLAG_RDTUN, &maxalloc, - 0, "Maximum number of queue items to allocate"); + 0, "Maximum number of queue items to allocate", &Giant); TUNABLE_INT("net.graph.ngqfreemax", &ngqfreemax); SYSCTL_INT(_net_graph, OID_AUTO, ngqfreemax, CTLFLAG_RDTUN, &ngqfreemax, - 0, "Maximum number of free queue items to cache"); + 0, "Maximum number of free queue items to cache", &Giant); static const int ngqfreelow = 4; /* try malloc if free < this */ static volatile int ngqfreesize; /* number of cached entries */ @@ -3236,7 +3236,7 @@ val = allocated; i = 1; - error = sysctl_handle_int(oidp, &val, sizeof(int), req); + error = sysctl_handle_int(oidp, &val, sizeof(int), req, &Giant); if (error != 0 || req->newptr == NULL) return (error); if (val == 42) { @@ -3248,7 +3248,7 @@ } SYSCTL_PROC(_debug, OID_AUTO, ng_dump_items, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(int), sysctl_debug_ng_dump_items, "I", "Number of allocated items"); + 0, sizeof(int), sysctl_debug_ng_dump_items, "I", "Number of allocated items", &Giant); #endif /* NETGRAPH_DEBUG */ diff -ur /home/refugee/freebsd/current/src/sys/netgraph/ng_pppoe.c repl/netgraph/ng_pppoe.c --- /home/refugee/freebsd/current/src/sys/netgraph/ng_pppoe.c Wed Dec 8 20:41:09 2004 +++ repl/netgraph/ng_pppoe.c Tue Dec 14 00:49:44 2004 @@ -294,7 +294,7 @@ int val; val = pppoe_mode; - error = sysctl_handle_int(oidp, &val, sizeof(int), req); + error = sysctl_handle_int(oidp, &val, sizeof(int), req, &Giant); if (error != 0 || req->newptr == NULL) return (error); switch (val) { @@ -315,7 +315,7 @@ } SYSCTL_PROC(_net_graph, OID_AUTO, nonstandard_pppoe, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(int), ngpppoe_set_ethertype, "I", "select normal or stupid ISP"); + 0, sizeof(int), ngpppoe_set_ethertype, "I", "select normal or stupid ISP", &Giant); union uniq { char bytes[sizeof(void *)]; diff -ur /home/refugee/freebsd/current/src/sys/netgraph/ng_socket.c repl/netgraph/ng_socket.c --- /home/refugee/freebsd/current/src/sys/netgraph/ng_socket.c Wed Dec 8 20:41:09 2004 +++ repl/netgraph/ng_socket.c Tue Dec 14 00:49:44 2004 @@ -148,10 +148,10 @@ /* Buffer space */ static u_long ngpdg_sendspace = 20 * 1024; /* really max datagram size */ SYSCTL_INT(_net_graph, OID_AUTO, maxdgram, CTLFLAG_RW, - &ngpdg_sendspace , 0, "Maximum outgoing Netgraph datagram size"); + &ngpdg_sendspace , 0, "Maximum outgoing Netgraph datagram size", &Giant); static u_long ngpdg_recvspace = 20 * 1024; SYSCTL_INT(_net_graph, OID_AUTO, recvspace, CTLFLAG_RW, - &ngpdg_recvspace , 0, "Maximum space for incoming Netgraph datagrams"); + &ngpdg_recvspace , 0, "Maximum space for incoming Netgraph datagrams", &Giant); /* List of all sockets */ static LIST_HEAD(, ngpcb) ngsocklist; @@ -1113,9 +1113,9 @@ return (error); } -SYSCTL_INT(_net_graph, OID_AUTO, family, CTLFLAG_RD, 0, AF_NETGRAPH, ""); -SYSCTL_NODE(_net_graph, OID_AUTO, data, CTLFLAG_RW, 0, "DATA"); -SYSCTL_INT(_net_graph_data, OID_AUTO, proto, CTLFLAG_RD, 0, NG_DATA, ""); -SYSCTL_NODE(_net_graph, OID_AUTO, control, CTLFLAG_RW, 0, "CONTROL"); -SYSCTL_INT(_net_graph_control, OID_AUTO, proto, CTLFLAG_RD, 0, NG_CONTROL, ""); +SYSCTL_INT(_net_graph, OID_AUTO, family, CTLFLAG_RD, 0, AF_NETGRAPH, "", &Giant); +SYSCTL_NODE(_net_graph, OID_AUTO, data, CTLFLAG_RW, 0, "DATA", NULL); +SYSCTL_INT(_net_graph_data, OID_AUTO, proto, CTLFLAG_RD, 0, NG_DATA, "", &Giant); +SYSCTL_NODE(_net_graph, OID_AUTO, control, CTLFLAG_RW, 0, "CONTROL", NULL); +SYSCTL_INT(_net_graph_control, OID_AUTO, proto, CTLFLAG_RD, 0, NG_CONTROL, "", &Giant); diff -ur /home/refugee/freebsd/current/src/sys/netinet/accf_http.c repl/netinet/accf_http.c --- /home/refugee/freebsd/current/src/sys/netinet/accf_http.c Sun Oct 31 04:50:44 2004 +++ repl/netinet/accf_http.c Tue Dec 14 00:49:43 2004 @@ -72,7 +72,7 @@ "HTTP accept filter"); SYSCTL_INT(_net_inet_accf_http, OID_AUTO, parsehttpversion, CTLFLAG_RW, &parse_http_version, 1, -"Parse http version so that non 1.x requests work"); +"Parse http version so that non 1.x requests work", &Giant); #ifdef ACCF_HTTP_DEBUG #define DPRINT(fmt, args...) \ diff -ur /home/refugee/freebsd/current/src/sys/netinet/if_ether.c repl/netinet/if_ether.c --- /home/refugee/freebsd/current/src/sys/netinet/if_ether.c Wed Dec 8 20:41:09 2004 +++ repl/netinet/if_ether.c Tue Dec 14 00:49:43 2004 @@ -71,7 +71,7 @@ #define SDL(s) ((struct sockaddr_dl *)s) SYSCTL_DECL(_net_link_ether); -SYSCTL_NODE(_net_link_ether, PF_INET, inet, CTLFLAG_RW, 0, ""); +SYSCTL_NODE(_net_link_ether, PF_INET, inet, CTLFLAG_RW, 0, "", NULL); /* timer values */ static int arpt_prune = (5*60*1); /* walk list every 5 minutes */ @@ -79,11 +79,11 @@ static int arpt_down = 20; /* once declared down, don't send for 20 sec */ SYSCTL_INT(_net_link_ether_inet, OID_AUTO, prune_intvl, CTLFLAG_RW, - &arpt_prune, 0, ""); + &arpt_prune, 0, "", &Giant); SYSCTL_INT(_net_link_ether_inet, OID_AUTO, max_age, CTLFLAG_RW, - &arpt_keep, 0, ""); + &arpt_keep, 0, "", &Giant); SYSCTL_INT(_net_link_ether_inet, OID_AUTO, host_down_time, CTLFLAG_RW, - &arpt_down, 0, ""); + &arpt_down, 0, "", &Giant); #define rt_expire rt_rmx.rmx_expire @@ -107,11 +107,11 @@ static struct callout arp_callout; SYSCTL_INT(_net_link_ether_inet, OID_AUTO, maxtries, CTLFLAG_RW, - &arp_maxtries, 0, ""); + &arp_maxtries, 0, "", &Giant); SYSCTL_INT(_net_link_ether_inet, OID_AUTO, useloopback, CTLFLAG_RW, - &useloopback, 0, ""); + &useloopback, 0, "", &Giant); SYSCTL_INT(_net_link_ether_inet, OID_AUTO, proxyall, CTLFLAG_RW, - &arp_proxyall, 0, ""); + &arp_proxyall, 0, "", &Giant); static void arp_init(void); static void arp_rtrequest(int, struct rtentry *, struct rt_addrinfo *); @@ -524,10 +524,10 @@ SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_wrong_iface, CTLFLAG_RW, &log_arp_wrong_iface, 0, - "log arp packets arriving on the wrong interface"); + "log arp packets arriving on the wrong interface", &Giant); SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_movements, CTLFLAG_RW, &log_arp_movements, 0, - "log arp replies from MACs different than the one in the cache"); + "log arp replies from MACs different than the one in the cache", &Giant); static void diff -ur /home/refugee/freebsd/current/src/sys/netinet/igmp.c repl/netinet/igmp.c --- /home/refugee/freebsd/current/src/sys/netinet/igmp.c Sun Oct 31 04:50:44 2004 +++ repl/netinet/igmp.c Tue Dec 14 00:49:43 2004 @@ -78,7 +78,7 @@ static struct igmpstat igmpstat; SYSCTL_STRUCT(_net_inet_igmp, IGMPCTL_STATS, stats, CTLFLAG_RW, &igmpstat, - igmpstat, ""); + igmpstat, "", &Giant); /* * igmp_mtx protects all mutable global variables in igmp.c, as well as diff -ur /home/refugee/freebsd/current/src/sys/netinet/in.c repl/netinet/in.c --- /home/refugee/freebsd/current/src/sys/netinet/in.c Sun Nov 21 00:03:52 2004 +++ repl/netinet/in.c Tue Dec 14 00:49:43 2004 @@ -64,7 +64,7 @@ static int subnetsarelocal = 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, - &subnetsarelocal, 0, "Treat all subnets as directly connected"); + &subnetsarelocal, 0, "Treat all subnets as directly connected", &Giant); struct in_multihead in_multihead; /* XXX BSS initialization */ diff -ur /home/refugee/freebsd/current/src/sys/netinet/in_gif.c repl/netinet/in_gif.c --- /home/refugee/freebsd/current/src/sys/netinet/in_gif.c Wed Dec 8 20:41:09 2004 +++ repl/netinet/in_gif.c Tue Dec 14 00:49:43 2004 @@ -84,7 +84,7 @@ static int ip_gif_ttl = GIF_TTL; SYSCTL_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_RW, - &ip_gif_ttl, 0, ""); + &ip_gif_ttl, 0, "", &Giant); int in_gif_output(ifp, family, m) diff -ur /home/refugee/freebsd/current/src/sys/netinet/in_pcb.c repl/netinet/in_pcb.c --- /home/refugee/freebsd/current/src/sys/netinet/in_pcb.c Sun Oct 31 04:50:44 2004 +++ repl/netinet/in_pcb.c Tue Dec 14 00:49:43 2004 @@ -109,7 +109,7 @@ { int error; - error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); + error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req, &Giant); if (error == 0) { RANGECHK(ipport_lowfirstauto, 1, IPPORT_RESERVED - 1); RANGECHK(ipport_lowlastauto, 1, IPPORT_RESERVED - 1); @@ -123,26 +123,26 @@ #undef RANGECHK -SYSCTL_NODE(_net_inet_ip, IPPROTO_IP, portrange, CTLFLAG_RW, 0, "IP Ports"); +SYSCTL_NODE(_net_inet_ip, IPPROTO_IP, portrange, CTLFLAG_RW, 0, "IP Ports", NULL); SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, lowfirst, CTLTYPE_INT|CTLFLAG_RW, - &ipport_lowfirstauto, 0, &sysctl_net_ipport_check, "I", ""); + &ipport_lowfirstauto, 0, &sysctl_net_ipport_check, "I", "", &Giant); SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, lowlast, CTLTYPE_INT|CTLFLAG_RW, - &ipport_lowlastauto, 0, &sysctl_net_ipport_check, "I", ""); + &ipport_lowlastauto, 0, &sysctl_net_ipport_check, "I", "", &Giant); SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, first, CTLTYPE_INT|CTLFLAG_RW, - &ipport_firstauto, 0, &sysctl_net_ipport_check, "I", ""); + &ipport_firstauto, 0, &sysctl_net_ipport_check, "I", "", &Giant); SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, last, CTLTYPE_INT|CTLFLAG_RW, - &ipport_lastauto, 0, &sysctl_net_ipport_check, "I", ""); + &ipport_lastauto, 0, &sysctl_net_ipport_check, "I", "", &Giant); SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, hifirst, CTLTYPE_INT|CTLFLAG_RW, - &ipport_hifirstauto, 0, &sysctl_net_ipport_check, "I", ""); + &ipport_hifirstauto, 0, &sysctl_net_ipport_check, "I", "", &Giant); SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, hilast, CTLTYPE_INT|CTLFLAG_RW, - &ipport_hilastauto, 0, &sysctl_net_ipport_check, "I", ""); + &ipport_hilastauto, 0, &sysctl_net_ipport_check, "I", "", &Giant); SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, reservedhigh, - CTLFLAG_RW|CTLFLAG_SECURE, &ipport_reservedhigh, 0, ""); + CTLFLAG_RW|CTLFLAG_SECURE, &ipport_reservedhigh, 0, "", &Giant); SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, reservedlow, - CTLFLAG_RW|CTLFLAG_SECURE, &ipport_reservedlow, 0, ""); + CTLFLAG_RW|CTLFLAG_SECURE, &ipport_reservedlow, 0, "", &Giant); SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, randomized, - CTLFLAG_RW, &ipport_randomized, 0, ""); + CTLFLAG_RW, &ipport_randomized, 0, "", &Giant); /* * in_pcb.c: manage the Protocol Control Blocks. diff -ur /home/refugee/freebsd/current/src/sys/netinet/in_proto.c repl/netinet/in_proto.c --- /home/refugee/freebsd/current/src/sys/netinet/in_proto.c Sun Oct 31 04:50:44 2004 +++ repl/netinet/in_proto.c Tue Dec 14 00:49:43 2004 @@ -269,24 +269,24 @@ SYSCTL_NODE(_net, PF_INET, inet, CTLFLAG_RW, 0, "Internet Family"); -SYSCTL_NODE(_net_inet, IPPROTO_IP, ip, CTLFLAG_RW, 0, "IP"); -SYSCTL_NODE(_net_inet, IPPROTO_ICMP, icmp, CTLFLAG_RW, 0, "ICMP"); -SYSCTL_NODE(_net_inet, IPPROTO_UDP, udp, CTLFLAG_RW, 0, "UDP"); -SYSCTL_NODE(_net_inet, IPPROTO_TCP, tcp, CTLFLAG_RW, 0, "TCP"); -SYSCTL_NODE(_net_inet, IPPROTO_IGMP, igmp, CTLFLAG_RW, 0, "IGMP"); +SYSCTL_NODE(_net_inet, IPPROTO_IP, ip, CTLFLAG_RW, 0, "IP", NULL); +SYSCTL_NODE(_net_inet, IPPROTO_ICMP, icmp, CTLFLAG_RW, 0, "ICMP", NULL); +SYSCTL_NODE(_net_inet, IPPROTO_UDP, udp, CTLFLAG_RW, 0, "UDP", NULL); +SYSCTL_NODE(_net_inet, IPPROTO_TCP, tcp, CTLFLAG_RW, 0, "TCP", NULL); +SYSCTL_NODE(_net_inet, IPPROTO_IGMP, igmp, CTLFLAG_RW, 0, "IGMP", NULL); #ifdef FAST_IPSEC /* XXX no protocol # to use, pick something "reserved" */ -SYSCTL_NODE(_net_inet, 253, ipsec, CTLFLAG_RW, 0, "IPSEC"); -SYSCTL_NODE(_net_inet, IPPROTO_AH, ah, CTLFLAG_RW, 0, "AH"); -SYSCTL_NODE(_net_inet, IPPROTO_ESP, esp, CTLFLAG_RW, 0, "ESP"); -SYSCTL_NODE(_net_inet, IPPROTO_IPCOMP, ipcomp, CTLFLAG_RW, 0, "IPCOMP"); -SYSCTL_NODE(_net_inet, IPPROTO_IPIP, ipip, CTLFLAG_RW, 0, "IPIP"); +SYSCTL_NODE(_net_inet, 253, ipsec, CTLFLAG_RW, 0, "IPSEC", NULL); +SYSCTL_NODE(_net_inet, IPPROTO_AH, ah, CTLFLAG_RW, 0, "AH", NULL); +SYSCTL_NODE(_net_inet, IPPROTO_ESP, esp, CTLFLAG_RW, 0, "ESP", NULL); +SYSCTL_NODE(_net_inet, IPPROTO_IPCOMP, ipcomp, CTLFLAG_RW, 0, "IPCOMP", NULL); +SYSCTL_NODE(_net_inet, IPPROTO_IPIP, ipip, CTLFLAG_RW, 0, "IPIP", NULL); #else #ifdef IPSEC -SYSCTL_NODE(_net_inet, IPPROTO_AH, ipsec, CTLFLAG_RW, 0, "IPSEC"); +SYSCTL_NODE(_net_inet, IPPROTO_AH, ipsec, CTLFLAG_RW, 0, "IPSEC", NULL); #endif /* IPSEC */ #endif /* !FAST_IPSEC */ -SYSCTL_NODE(_net_inet, IPPROTO_RAW, raw, CTLFLAG_RW, 0, "RAW"); +SYSCTL_NODE(_net_inet, IPPROTO_RAW, raw, CTLFLAG_RW, 0, "RAW", NULL); #ifdef PIM -SYSCTL_NODE(_net_inet, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM"); +SYSCTL_NODE(_net_inet, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM", NULL); #endif diff -ur /home/refugee/freebsd/current/src/sys/netinet/in_rmx.c repl/netinet/in_rmx.c --- /home/refugee/freebsd/current/src/sys/netinet/in_rmx.c Wed Dec 8 20:41:09 2004 +++ repl/netinet/in_rmx.c Tue Dec 14 00:49:43 2004 @@ -150,16 +150,16 @@ static int rtq_reallyold = 60*60; /* one hour is "really old" */ SYSCTL_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire, CTLFLAG_RW, - &rtq_reallyold, 0, "Default expiration time on dynamically learned routes"); + &rtq_reallyold, 0, "Default expiration time on dynamically learned routes", &Giant); static int rtq_minreallyold = 10; /* never automatically crank down to less */ SYSCTL_INT(_net_inet_ip, IPCTL_RTMINEXPIRE, rtminexpire, CTLFLAG_RW, &rtq_minreallyold, 0, - "Minimum time to attempt to hold onto dynamically learned routes"); + "Minimum time to attempt to hold onto dynamically learned routes", &Giant); static int rtq_toomany = 128; /* 128 cached routes is "too many" */ SYSCTL_INT(_net_inet_ip, IPCTL_RTMAXCACHE, rtmaxcache, CTLFLAG_RW, - &rtq_toomany, 0, "Upper limit on dynamically learned routes"); + &rtq_toomany, 0, "Upper limit on dynamically learned routes", &Giant); /* * On last reference drop, mark the route as belong to us so that it can be diff -ur /home/refugee/freebsd/current/src/sys/netinet/ip_divert.c repl/netinet/ip_divert.c --- /home/refugee/freebsd/current/src/sys/netinet/ip_divert.c Sun Nov 21 00:03:52 2004 +++ repl/netinet/ip_divert.c Tue Dec 14 00:49:43 2004 @@ -544,7 +544,7 @@ INP_INFO_RUNLOCK(&divcbinfo); error = sysctl_wire_old_buffer(req, - 2 * sizeof(xig) + n*sizeof(struct xinpcb)); + 2 * sizeof(xig) + n*sizeof(struct xinpcb), &Giant); if (error != 0) return (error); @@ -625,9 +625,9 @@ } #ifdef SYSCTL_NODE -SYSCTL_NODE(_net_inet, IPPROTO_DIVERT, divert, CTLFLAG_RW, 0, "IPDIVERT"); +SYSCTL_NODE(_net_inet, IPPROTO_DIVERT, divert, CTLFLAG_RW, 0, "IPDIVERT", &Giant); SYSCTL_PROC(_net_inet_divert, OID_AUTO, pcblist, CTLFLAG_RD, 0, 0, - div_pcblist, "S,xinpcb", "List of active divert sockets"); + div_pcblist, "S,xinpcb", "List of active divert sockets", &Giant); #endif struct pr_usrreqs div_usrreqs = { diff -ur /home/refugee/freebsd/current/src/sys/netinet/ip_dummynet.c repl/netinet/ip_dummynet.c --- /home/refugee/freebsd/current/src/sys/netinet/ip_dummynet.c Sun Oct 31 04:50:44 2004 +++ repl/netinet/ip_dummynet.c Tue Dec 14 00:49:43 2004 @@ -123,37 +123,37 @@ #ifdef SYSCTL_NODE SYSCTL_NODE(_net_inet_ip, OID_AUTO, dummynet, - CTLFLAG_RW, 0, "Dummynet"); + CTLFLAG_RW, 0, "Dummynet", &Giant); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, hash_size, - CTLFLAG_RW, &dn_hash_size, 0, "Default hash table size"); + CTLFLAG_RW, &dn_hash_size, 0, "Default hash table size", &Giant); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, curr_time, - CTLFLAG_RD, &curr_time, 0, "Current tick"); + CTLFLAG_RD, &curr_time, 0, "Current tick", &Giant); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, ready_heap, - CTLFLAG_RD, &ready_heap.size, 0, "Size of ready heap"); + CTLFLAG_RD, &ready_heap.size, 0, "Size of ready heap", &Giant); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, extract_heap, - CTLFLAG_RD, &extract_heap.size, 0, "Size of extract heap"); + CTLFLAG_RD, &extract_heap.size, 0, "Size of extract heap", &Giant); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, searches, - CTLFLAG_RD, &searches, 0, "Number of queue searches"); + CTLFLAG_RD, &searches, 0, "Number of queue searches", &Giant); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, search_steps, - CTLFLAG_RD, &search_steps, 0, "Number of queue search steps"); + CTLFLAG_RD, &search_steps, 0, "Number of queue search steps", &Giant); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire, - CTLFLAG_RW, &pipe_expire, 0, "Expire queue if empty"); + CTLFLAG_RW, &pipe_expire, 0, "Expire queue if empty", &Giant); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, max_chain_len, CTLFLAG_RW, &dn_max_ratio, 0, - "Max ratio between dynamic queues and buckets"); + "Max ratio between dynamic queues and buckets", &Giant); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_lookup_depth, - CTLFLAG_RD, &red_lookup_depth, 0, "Depth of RED lookup table"); + CTLFLAG_RD, &red_lookup_depth, 0, "Depth of RED lookup table", &Giant); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_avg_pkt_size, - CTLFLAG_RD, &red_avg_pkt_size, 0, "RED Medium packet size"); + CTLFLAG_RD, &red_avg_pkt_size, 0, "RED Medium packet size", &Giant); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_max_pkt_size, - CTLFLAG_RD, &red_max_pkt_size, 0, "RED Max packet size"); + CTLFLAG_RD, &red_max_pkt_size, 0, "RED Max packet size", &Giant); #endif #ifdef DUMMYNET_DEBUG int dummynet_debug = 0; #ifdef SYSCTL_NODE SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, debug, CTLFLAG_RW, &dummynet_debug, - 0, "control debugging printfs"); + 0, "control debugging printfs", &Giant); #endif #define DPRINTF(X) if (dummynet_debug) printf X #else diff -ur /home/refugee/freebsd/current/src/sys/netinet/ip_fastfwd.c repl/netinet/ip_fastfwd.c --- /home/refugee/freebsd/current/src/sys/netinet/ip_fastfwd.c Sun Nov 14 03:56:35 2004 +++ repl/netinet/ip_fastfwd.c Tue Dec 14 00:49:43 2004 @@ -105,7 +105,7 @@ static int ipfastforward_active = 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, fastforwarding, CTLFLAG_RW, - &ipfastforward_active, 0, "Enable fast IP forwarding"); + &ipfastforward_active, 0, "Enable fast IP forwarding", &Giant); static struct sockaddr_in * ip_findroute(struct route *ro, struct in_addr dest, struct mbuf *m) diff -ur /home/refugee/freebsd/current/src/sys/netinet/ip_icmp.c repl/netinet/ip_icmp.c --- /home/refugee/freebsd/current/src/sys/netinet/ip_icmp.c Sun Oct 31 04:50:44 2004 +++ repl/netinet/ip_icmp.c Tue Dec 14 00:49:43 2004 @@ -80,35 +80,35 @@ struct icmpstat icmpstat; SYSCTL_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW, - &icmpstat, icmpstat, ""); + &icmpstat, icmpstat, "", &Giant); static int icmpmaskrepl = 0; SYSCTL_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_RW, - &icmpmaskrepl, 0, "Reply to ICMP Address Mask Request packets."); + &icmpmaskrepl, 0, "Reply to ICMP Address Mask Request packets.", &Giant); static u_int icmpmaskfake = 0; SYSCTL_UINT(_net_inet_icmp, OID_AUTO, maskfake, CTLFLAG_RW, - &icmpmaskfake, 0, "Fake reply to ICMP Address Mask Request packets."); + &icmpmaskfake, 0, "Fake reply to ICMP Address Mask Request packets.", &Giant); static int drop_redirect = 0; SYSCTL_INT(_net_inet_icmp, OID_AUTO, drop_redirect, CTLFLAG_RW, - &drop_redirect, 0, ""); + &drop_redirect, 0, "", &Giant); static int log_redirect = 0; SYSCTL_INT(_net_inet_icmp, OID_AUTO, log_redirect, CTLFLAG_RW, - &log_redirect, 0, ""); + &log_redirect, 0, "", &Giant); static int icmplim = 200; SYSCTL_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_RW, - &icmplim, 0, ""); + &icmplim, 0, "", &Giant); static int icmplim_output = 1; SYSCTL_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_RW, - &icmplim_output, 0, ""); + &icmplim_output, 0, "", &Giant); static char reply_src[IFNAMSIZ]; SYSCTL_STRING(_net_inet_icmp, OID_AUTO, reply_src, CTLFLAG_RW, - &reply_src, IFNAMSIZ, "icmp reply source for non-local packets."); + &reply_src, IFNAMSIZ, "icmp reply source for non-local packets.", &Giant); /* * ICMP broadcast echo sysctl @@ -116,7 +116,7 @@ static int icmpbmcastecho = 0; SYSCTL_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_RW, - &icmpbmcastecho, 0, ""); + &icmpbmcastecho, 0, "", &Giant); #ifdef ICMPPRINTFS diff -ur /home/refugee/freebsd/current/src/sys/netinet/ip_input.c repl/netinet/ip_input.c --- /home/refugee/freebsd/current/src/sys/netinet/ip_input.c Sun Oct 31 04:50:44 2004 +++ repl/netinet/ip_input.c Tue Dec 14 00:49:43 2004 @@ -86,54 +86,54 @@ int ipforwarding = 0; SYSCTL_INT(_net_inet_ip, IPCTL_FORWARDING, forwarding, CTLFLAG_RW, - &ipforwarding, 0, "Enable IP forwarding between interfaces"); + &ipforwarding, 0, "Enable IP forwarding between interfaces", &Giant); static int ipsendredirects = 1; /* XXX */ SYSCTL_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_RW, - &ipsendredirects, 0, "Enable sending IP redirects"); + &ipsendredirects, 0, "Enable sending IP redirects", &Giant); int ip_defttl = IPDEFTTL; SYSCTL_INT(_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_RW, - &ip_defttl, 0, "Maximum TTL on IP packets"); + &ip_defttl, 0, "Maximum TTL on IP packets", &Giant); static int ip_dosourceroute = 0; SYSCTL_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, - &ip_dosourceroute, 0, "Enable forwarding source routed IP packets"); + &ip_dosourceroute, 0, "Enable forwarding source routed IP packets", &Giant); static int ip_acceptsourceroute = 0; SYSCTL_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, CTLFLAG_RW, &ip_acceptsourceroute, 0, - "Enable accepting source routed IP packets"); + "Enable accepting source routed IP packets", &Giant); int ip_doopts = 1; /* 0 = ignore, 1 = process, 2 = reject */ SYSCTL_INT(_net_inet_ip, OID_AUTO, process_options, CTLFLAG_RW, - &ip_doopts, 0, "Enable IP options processing ([LS]SRR, RR, TS)"); + &ip_doopts, 0, "Enable IP options processing ([LS]SRR, RR, TS)", &Giant); static int ip_keepfaith = 0; SYSCTL_INT(_net_inet_ip, IPCTL_KEEPFAITH, keepfaith, CTLFLAG_RW, &ip_keepfaith, 0, - "Enable packet capture for FAITH IPv4->IPv6 translater daemon"); + "Enable packet capture for FAITH IPv4->IPv6 translater daemon", &Giant); static int nipq = 0; /* total # of reass queues */ static int maxnipq; SYSCTL_INT(_net_inet_ip, OID_AUTO, maxfragpackets, CTLFLAG_RW, &maxnipq, 0, - "Maximum number of IPv4 fragment reassembly queue entries"); + "Maximum number of IPv4 fragment reassembly queue entries", &Giant); static int maxfragsperpacket; SYSCTL_INT(_net_inet_ip, OID_AUTO, maxfragsperpacket, CTLFLAG_RW, &maxfragsperpacket, 0, - "Maximum number of IPv4 fragments allowed per packet"); + "Maximum number of IPv4 fragments allowed per packet", &Giant); static int ip_sendsourcequench = 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, sendsourcequench, CTLFLAG_RW, &ip_sendsourcequench, 0, - "Enable the transmission of source quench packets"); + "Enable the transmission of source quench packets", &Giant); int ip_do_randomid = 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, random_id, CTLFLAG_RW, &ip_do_randomid, 0, - "Assign random ip_id values"); + "Assign random ip_id values", &Giant); /* * XXX - Setting ip_checkinterface mostly implements the receive side of @@ -150,7 +150,7 @@ */ static int ip_checkinterface = 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, check_interface, CTLFLAG_RW, - &ip_checkinterface, 0, "Verify packet arrives on correct interface"); + &ip_checkinterface, 0, "Verify packet arrives on correct interface", &Giant); #ifdef DIAGNOSTIC static int ipprintfs = 0; @@ -169,13 +169,13 @@ u_long in_ifaddrhmask; /* mask for hash table */ SYSCTL_INT(_net_inet_ip, IPCTL_INTRQMAXLEN, intr_queue_maxlen, CTLFLAG_RW, - &ipintrq.ifq_maxlen, 0, "Maximum size of the IP input queue"); + &ipintrq.ifq_maxlen, 0, "Maximum size of the IP input queue", &Giant); SYSCTL_INT(_net_inet_ip, IPCTL_INTRQDROPS, intr_queue_drops, CTLFLAG_RD, - &ipintrq.ifq_drops, 0, "Number of packets dropped from the IP input queue"); + &ipintrq.ifq_drops, 0, "Number of packets dropped from the IP input queue", &Giant); struct ipstat ipstat; SYSCTL_STRUCT(_net_inet_ip, IPCTL_STATS, stats, CTLFLAG_RW, - &ipstat, ipstat, "IP statistics (struct ipstat, netinet/ip_var.h)"); + &ipstat, ipstat, "IP statistics (struct ipstat, netinet/ip_var.h)", &Giant); /* Packet reassembly stuff */ #define IPREASS_NHASH_LOG2 6 @@ -194,13 +194,13 @@ #ifdef IPCTL_DEFMTU SYSCTL_INT(_net_inet_ip, IPCTL_DEFMTU, mtu, CTLFLAG_RW, - &ip_mtu, 0, "Default MTU"); + &ip_mtu, 0, "Default MTU", &Giant); #endif #ifdef IPSTEALTH int ipstealth = 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, stealth, CTLFLAG_RW, - &ipstealth, 0, ""); + &ipstealth, 0, "", &Giant); #endif /* diff -ur /home/refugee/freebsd/current/src/sys/netinet/ip_mroute.c repl/netinet/ip_mroute.c --- /home/refugee/freebsd/current/src/sys/netinet/ip_mroute.c Sun Oct 31 04:50:44 2004 +++ repl/netinet/ip_mroute.c Tue Dec 14 00:49:43 2004 @@ -93,12 +93,12 @@ static struct mrtstat mrtstat; SYSCTL_STRUCT(_net_inet_ip, OID_AUTO, mrtstat, CTLFLAG_RW, &mrtstat, mrtstat, - "Multicast Routing Statistics (struct mrtstat, netinet/ip_mroute.h)"); + "Multicast Routing Statistics (struct mrtstat, netinet/ip_mroute.h)", &Giant); static struct mfc *mfctable[MFCTBLSIZ]; SYSCTL_OPAQUE(_net_inet_ip, OID_AUTO, mfctable, CTLFLAG_RD, &mfctable, sizeof(mfctable), "S,*mfc[MFCTBLSIZ]", - "Multicast Forwarding Table (struct *mfc[MFCTBLSIZ], netinet/ip_mroute.h)"); + "Multicast Forwarding Table (struct *mfc[MFCTBLSIZ], netinet/ip_mroute.h)", &Giant); static struct mtx mfc_mtx; #define MFC_LOCK() mtx_lock(&mfc_mtx) @@ -113,7 +113,7 @@ static struct vif viftable[MAXVIFS]; SYSCTL_OPAQUE(_net_inet_ip, OID_AUTO, viftable, CTLFLAG_RD, &viftable, sizeof(viftable), "S,vif[MAXVIFS]", - "Multicast Virtual Interfaces (struct vif[MAXVIFS], netinet/ip_mroute.h)"); + "Multicast Virtual Interfaces (struct vif[MAXVIFS], netinet/ip_mroute.h)", &Giant); static struct mtx vif_mtx; #define VIF_LOCK() mtx_lock(&vif_mtx) @@ -191,7 +191,7 @@ static struct pimstat pimstat; SYSCTL_STRUCT(_net_inet_pim, PIMCTL_STATS, stats, CTLFLAG_RD, &pimstat, pimstat, - "PIM Statistics (struct pimstat, netinet/pim_var.h)"); + "PIM Statistics (struct pimstat, netinet/pim_var.h)", &Giant); /* * Note: the PIM Register encapsulation adds the following in front of a diff -ur /home/refugee/freebsd/current/src/sys/netinet/ip_output.c repl/netinet/ip_output.c --- /home/refugee/freebsd/current/src/sys/netinet/ip_output.c Wed Dec 8 20:41:09 2004 +++ repl/netinet/ip_output.c Tue Dec 14 00:49:43 2004 @@ -90,7 +90,7 @@ #ifdef MBUF_STRESS_TEST int mbuf_frag_size = 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, mbuf_frag_size, CTLFLAG_RW, - &mbuf_frag_size, 0, "Fragment outgoing mbufs to this size"); + &mbuf_frag_size, 0, "Fragment outgoing mbufs to this size", &Giant); #endif static struct mbuf *ip_insertoptions(struct mbuf *, struct mbuf *, int *); diff -ur /home/refugee/freebsd/current/src/sys/netinet/raw_ip.c repl/netinet/raw_ip.c --- /home/refugee/freebsd/current/src/sys/netinet/raw_ip.c Sun Nov 14 03:56:35 2004 +++ repl/netinet/raw_ip.c Tue Dec 14 00:49:43 2004 @@ -562,9 +562,9 @@ u_long rip_recvspace = RIPRCVQ; SYSCTL_INT(_net_inet_raw, OID_AUTO, maxdgram, CTLFLAG_RW, - &rip_sendspace, 0, "Maximum outgoing raw IP datagram size"); + &rip_sendspace, 0, "Maximum outgoing raw IP datagram size", &Giant); SYSCTL_INT(_net_inet_raw, OID_AUTO, recvspace, CTLFLAG_RW, - &rip_recvspace, 0, "Maximum space for incoming raw IP datagrams"); + &rip_recvspace, 0, "Maximum space for incoming raw IP datagrams", &Giant); static int rip_attach(struct socket *so, int proto, struct thread *td) @@ -896,7 +896,7 @@ SYSCTL_PROC(_net_inet_raw, OID_AUTO/*XXX*/, pcblist, CTLFLAG_RD, 0, 0, - rip_pcblist, "S,xinpcb", "List of active raw IP sockets"); + rip_pcblist, "S,xinpcb", "List of active raw IP sockets", &Giant); struct pr_usrreqs rip_usrreqs = { .pru_abort = rip_abort, diff -ur /home/refugee/freebsd/current/src/sys/netinet/tcp_hostcache.c repl/netinet/tcp_hostcache.c --- /home/refugee/freebsd/current/src/sys/netinet/tcp_hostcache.c Wed Dec 8 20:41:09 2004 +++ repl/netinet/tcp_hostcache.c Tue Dec 14 00:49:43 2004 @@ -150,32 +150,32 @@ static struct hc_metrics *tcp_hc_lookup(struct in_conninfo *); static struct hc_metrics *tcp_hc_insert(struct in_conninfo *); -static int sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS); +static int sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS, &Giant); static void tcp_hc_purge(void *); -SYSCTL_NODE(_net_inet_tcp, OID_AUTO, hostcache, CTLFLAG_RW, 0, "TCP Host cache"); +SYSCTL_NODE(_net_inet_tcp, OID_AUTO, hostcache, CTLFLAG_RW, 0, "TCP Host cache", NULL); SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, cachelimit, CTLFLAG_RDTUN, - &tcp_hostcache.cache_limit, 0, "Overall entry limit for hostcache"); + &tcp_hostcache.cache_limit, 0, "Overall entry limit for hostcache", &Giant); SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, hashsize, CTLFLAG_RDTUN, - &tcp_hostcache.hashsize, 0, "Size of TCP hostcache hashtable"); + &tcp_hostcache.hashsize, 0, "Size of TCP hostcache hashtable", &Giant); SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, bucketlimit, CTLFLAG_RDTUN, - &tcp_hostcache.bucket_limit, 0, "Per-bucket hash limit for hostcache"); + &tcp_hostcache.bucket_limit, 0, "Per-bucket hash limit for hostcache", &Giant); SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_RD, - &tcp_hostcache.cache_count, 0, "Current number of entries in hostcache"); + &tcp_hostcache.cache_count, 0, "Current number of entries in hostcache", &Giant); SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, expire, CTLFLAG_RW, - &tcp_hostcache.expire, 0, "Expire time of TCP hostcache entries"); + &tcp_hostcache.expire, 0, "Expire time of TCP hostcache entries", &Giant); SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, purge, CTLFLAG_RW, - &tcp_hostcache.purgeall, 0, "Expire all entires on next purge run"); + &tcp_hostcache.purgeall, 0, "Expire all entires on next purge run", &Giant); SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, list, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP, 0, 0, - sysctl_tcp_hc_list, "A", "List of all hostcache entries"); + sysctl_tcp_hc_list, "A", "List of all hostcache entries", &Giant); static MALLOC_DEFINE(M_HOSTCACHE, "hostcache", "TCP hostcache"); diff -ur /home/refugee/freebsd/current/src/sys/netinet/tcp_input.c repl/netinet/tcp_input.c --- /home/refugee/freebsd/current/src/sys/netinet/tcp_input.c Wed Dec 8 20:41:09 2004 +++ repl/netinet/tcp_input.c Tue Dec 14 00:49:43 2004 @@ -101,35 +101,35 @@ struct tcpstat tcpstat; SYSCTL_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats, CTLFLAG_RW, - &tcpstat , tcpstat, "TCP statistics (struct tcpstat, netinet/tcp_var.h)"); + &tcpstat , tcpstat, "TCP statistics (struct tcpstat, netinet/tcp_var.h)", &Giant); static int log_in_vain = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_in_vain, CTLFLAG_RW, - &log_in_vain, 0, "Log all incoming TCP connections"); + &log_in_vain, 0, "Log all incoming TCP connections", &Giant); static int blackhole = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, blackhole, CTLFLAG_RW, - &blackhole, 0, "Do not send RST when dropping refused connections"); + &blackhole, 0, "Do not send RST when dropping refused connections", &Giant); int tcp_delack_enabled = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, delayed_ack, CTLFLAG_RW, &tcp_delack_enabled, 0, - "Delay ACK to try and piggyback it onto a data packet"); + "Delay ACK to try and piggyback it onto a data packet", &Giant); #ifdef TCP_DROP_SYNFIN static int drop_synfin = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, drop_synfin, CTLFLAG_RW, - &drop_synfin, 0, "Drop TCP packets with SYN+FIN set"); + &drop_synfin, 0, "Drop TCP packets with SYN+FIN set", &Giant); #endif static int tcp_do_rfc3042 = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_RW, - &tcp_do_rfc3042, 0, "Enable RFC 3042 (Limited Transmit)"); + &tcp_do_rfc3042, 0, "Enable RFC 3042 (Limited Transmit)", &Giant); static int tcp_do_rfc3390 = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3390, CTLFLAG_RW, &tcp_do_rfc3390, 0, - "Enable RFC 3390 (Increasing TCP's Initial Congestion Window)"); + "Enable RFC 3390 (Increasing TCP's Initial Congestion Window)", &Giant); SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0, "TCP Segment Reassembly Queue"); @@ -137,28 +137,28 @@ static int tcp_reass_maxseg = 0; SYSCTL_INT(_net_inet_tcp_reass, OID_AUTO, maxsegments, CTLFLAG_RDTUN, &tcp_reass_maxseg, 0, - "Global maximum number of TCP Segments in Reassembly Queue"); + "Global maximum number of TCP Segments in Reassembly Queue", &Giant); int tcp_reass_qsize = 0; SYSCTL_INT(_net_inet_tcp_reass, OID_AUTO, cursegments, CTLFLAG_RD, &tcp_reass_qsize, 0, - "Global number of TCP Segments currently in Reassembly Queue"); + "Global number of TCP Segments currently in Reassembly Queue", &Giant); static int tcp_reass_maxqlen = 48; SYSCTL_INT(_net_inet_tcp_reass, OID_AUTO, maxqlen, CTLFLAG_RW, &tcp_reass_maxqlen, 0, - "Maximum number of TCP Segments per individual Reassembly Queue"); + "Maximum number of TCP Segments per individual Reassembly Queue", &Giant); static int tcp_reass_overflows = 0; SYSCTL_INT(_net_inet_tcp_reass, OID_AUTO, overflows, CTLFLAG_RD, &tcp_reass_overflows, 0, - "Global number of TCP Segment Reassembly Queue Overflows"); + "Global number of TCP Segment Reassembly Queue Overflows", &Giant); static int tcp_sack_recovery_initburst = 3; SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, initburst, CTLFLAG_RW, &tcp_sack_recovery_initburst, 0, - "Initial Number of Rexmits when sack recovery is set up"); + "Initial Number of Rexmits when sack recovery is set up", &Giant); struct inpcbhead tcb; #define tcb6 tcb /* for KAME src sync over BSD*'s */ diff -ur /home/refugee/freebsd/current/src/sys/netinet/tcp_output.c repl/netinet/tcp_output.c --- /home/refugee/freebsd/current/src/sys/netinet/tcp_output.c Wed Dec 8 20:41:10 2004 +++ repl/netinet/tcp_output.c Tue Dec 14 00:49:43 2004 @@ -90,19 +90,19 @@ int path_mtu_discovery = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, path_mtu_discovery, CTLFLAG_RW, - &path_mtu_discovery, 1, "Enable Path MTU Discovery"); + &path_mtu_discovery, 1, "Enable Path MTU Discovery", &Giant); int ss_fltsz = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, slowstart_flightsize, CTLFLAG_RW, - &ss_fltsz, 1, "Slow start flight size"); + &ss_fltsz, 1, "Slow start flight size", &Giant); int ss_fltsz_local = 4; SYSCTL_INT(_net_inet_tcp, OID_AUTO, local_slowstart_flightsize, CTLFLAG_RW, - &ss_fltsz_local, 1, "Slow start flight size for local networks"); + &ss_fltsz_local, 1, "Slow start flight size for local networks", &Giant); int tcp_do_newreno = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, newreno, CTLFLAG_RW, &tcp_do_newreno, - 0, "Enable NewReno Algorithms"); + 0, "Enable NewReno Algorithms", &Giant); /* * Tcp output routine: figure out what should be sent and send it. diff -ur /home/refugee/freebsd/current/src/sys/netinet/tcp_sack.c repl/netinet/tcp_sack.c --- /home/refugee/freebsd/current/src/sys/netinet/tcp_sack.c Sun Oct 31 04:50:44 2004 +++ repl/netinet/tcp_sack.c Tue Dec 14 00:49:43 2004 @@ -164,10 +164,10 @@ extern struct uma_zone *sack_hole_zone; -SYSCTL_NODE(_net_inet_tcp, OID_AUTO, sack, CTLFLAG_RW, 0, "TCP SACK"); +SYSCTL_NODE(_net_inet_tcp, OID_AUTO, sack, CTLFLAG_RW, 0, "TCP SACK", NULL); int tcp_do_sack = 1; SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, enable, CTLFLAG_RW, - &tcp_do_sack, 0, "Enable/Disable TCP SACK support"); + &tcp_do_sack, 0, "Enable/Disable TCP SACK support", &Giant); TUNABLE_INT("net.inet.tcp.sack.enable", &tcp_do_sack); /* diff -ur /home/refugee/freebsd/current/src/sys/netinet/tcp_subr.c repl/netinet/tcp_subr.c --- /home/refugee/freebsd/current/src/sys/netinet/tcp_subr.c Wed Dec 8 20:41:10 2004 +++ repl/netinet/tcp_subr.c Tue Dec 14 00:49:43 2004 @@ -113,13 +113,13 @@ int tcp_mssdflt = TCP_MSS; SYSCTL_INT(_net_inet_tcp, TCPCTL_MSSDFLT, mssdflt, CTLFLAG_RW, - &tcp_mssdflt , 0, "Default TCP Maximum Segment Size"); + &tcp_mssdflt , 0, "Default TCP Maximum Segment Size", &Giant); #ifdef INET6 int tcp_v6mssdflt = TCP6_MSS; SYSCTL_INT(_net_inet_tcp, TCPCTL_V6MSSDFLT, v6mssdflt, CTLFLAG_RW, &tcp_v6mssdflt , 0, - "Default TCP Maximum Segment Size for IPv6"); + "Default TCP Maximum Segment Size for IPv6", &Giant); #endif /* @@ -132,7 +132,7 @@ */ int tcp_minmss = TCP_MINMSS; SYSCTL_INT(_net_inet_tcp, OID_AUTO, minmss, CTLFLAG_RW, - &tcp_minmss , 0, "Minmum TCP Maximum Segment Size"); + &tcp_minmss , 0, "Minmum TCP Maximum Segment Size", &Giant); /* * Number of TCP segments per second we accept from remote host * before we start to calculate average segment size. If average @@ -144,36 +144,36 @@ int tcp_minmssoverload = TCP_MINMSSOVERLOAD; SYSCTL_INT(_net_inet_tcp, OID_AUTO, minmssoverload, CTLFLAG_RW, &tcp_minmssoverload , 0, "Number of TCP Segments per Second allowed to" - "be under the MINMSS Size"); + "be under the MINMSS Size", &Giant); #if 0 static int tcp_rttdflt = TCPTV_SRTTDFLT / PR_SLOWHZ; SYSCTL_INT(_net_inet_tcp, TCPCTL_RTTDFLT, rttdflt, CTLFLAG_RW, - &tcp_rttdflt , 0, "Default maximum TCP Round Trip Time"); + &tcp_rttdflt , 0, "Default maximum TCP Round Trip Time", &Giant); #endif int tcp_do_rfc1323 = 1; SYSCTL_INT(_net_inet_tcp, TCPCTL_DO_RFC1323, rfc1323, CTLFLAG_RW, - &tcp_do_rfc1323 , 0, "Enable rfc1323 (high performance TCP) extensions"); + &tcp_do_rfc1323 , 0, "Enable rfc1323 (high performance TCP) extensions", &Giant); static int tcp_tcbhashsize = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcbhashsize, CTLFLAG_RDTUN, - &tcp_tcbhashsize, 0, "Size of TCP control-block hashtable"); + &tcp_tcbhashsize, 0, "Size of TCP control-block hashtable", &Giant); static int do_tcpdrain = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_tcpdrain, CTLFLAG_RW, &do_tcpdrain, 0, - "Enable tcp_drain routine for extra help when low on mbufs"); + "Enable tcp_drain routine for extra help when low on mbufs", &Giant); SYSCTL_INT(_net_inet_tcp, OID_AUTO, pcbcount, CTLFLAG_RD, - &tcbinfo.ipi_count, 0, "Number of active PCBs"); + &tcbinfo.ipi_count, 0, "Number of active PCBs", &Giant); static int icmp_may_rst = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, icmp_may_rst, CTLFLAG_RW, &icmp_may_rst, 0, - "Certain ICMP unreachable messages may abort connections in SYN_SENT"); + "Certain ICMP unreachable messages may abort connections in SYN_SENT", &Giant); static int tcp_isn_reseed_interval = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, isn_reseed_interval, CTLFLAG_RW, - &tcp_isn_reseed_interval, 0, "Seconds between reseeding of ISN secret"); + &tcp_isn_reseed_interval, 0, "Seconds between reseeding of ISN secret", &Giant); /* * TCP bandwidth limiting sysctls. Note that the default lower bound of @@ -185,23 +185,23 @@ static int tcp_inflight_enable = 1; SYSCTL_INT(_net_inet_tcp_inflight, OID_AUTO, enable, CTLFLAG_RW, - &tcp_inflight_enable, 0, "Enable automatic TCP inflight data limiting"); + &tcp_inflight_enable, 0, "Enable automatic TCP inflight data limiting", &Giant); static int tcp_inflight_debug = 0; SYSCTL_INT(_net_inet_tcp_inflight, OID_AUTO, debug, CTLFLAG_RW, - &tcp_inflight_debug, 0, "Debug TCP inflight calculations"); + &tcp_inflight_debug, 0, "Debug TCP inflight calculations", &Giant); static int tcp_inflight_min = 6144; SYSCTL_INT(_net_inet_tcp_inflight, OID_AUTO, min, CTLFLAG_RW, - &tcp_inflight_min, 0, "Lower-bound for TCP inflight window"); + &tcp_inflight_min, 0, "Lower-bound for TCP inflight window", &Giant); static int tcp_inflight_max = TCP_MAXWIN << TCP_MAX_WINSHIFT; SYSCTL_INT(_net_inet_tcp_inflight, OID_AUTO, max, CTLFLAG_RW, - &tcp_inflight_max, 0, "Upper-bound for TCP inflight window"); + &tcp_inflight_max, 0, "Upper-bound for TCP inflight window", &Giant); static int tcp_inflight_stab = 20; SYSCTL_INT(_net_inet_tcp_inflight, OID_AUTO, stab, CTLFLAG_RW, - &tcp_inflight_stab, 0, "Inflight Algorithm Stabilization 20 = 2 packets"); + &tcp_inflight_stab, 0, "Inflight Algorithm Stabilization 20 = 2 packets", &Giant); uma_zone_t sack_hole_zone; @@ -896,7 +896,7 @@ splx(s); error = sysctl_wire_old_buffer(req, 2 * (sizeof xig) - + n * sizeof(struct xtcpcb)); + + n * sizeof(struct xtcpcb), &Giant); if (error != 0) return (error); @@ -987,7 +987,7 @@ } SYSCTL_PROC(_net_inet_tcp, TCPCTL_PCBLIST, pcblist, CTLFLAG_RD, 0, 0, - tcp_pcblist, "S,xtcpcb", "List of active TCP connections"); + tcp_pcblist, "S,xtcpcb", "List of active TCP connections", &Giant); static int tcp_getcred(SYSCTL_HANDLER_ARGS) @@ -1032,7 +1032,7 @@ SYSCTL_PROC(_net_inet_tcp, OID_AUTO, getcred, CTLTYPE_OPAQUE|CTLFLAG_RW|CTLFLAG_PRISON, 0, 0, - tcp_getcred, "S,xucred", "Get the xucred of a TCP connection"); + tcp_getcred, "S,xucred", "Get the xucred of a TCP connection", &Giant); #ifdef INET6 static int @@ -1094,7 +1094,7 @@ SYSCTL_PROC(_net_inet6_tcp6, OID_AUTO, getcred, CTLTYPE_OPAQUE|CTLFLAG_RW|CTLFLAG_PRISON, 0, 0, - tcp6_getcred, "S,xucred", "Get the xucred of a TCP6 connection"); + tcp6_getcred, "S,xucred", "Get the xucred of a TCP6 connection", &Giant); #endif diff -ur /home/refugee/freebsd/current/src/sys/netinet/tcp_syncache.c repl/netinet/tcp_syncache.c --- /home/refugee/freebsd/current/src/sys/netinet/tcp_syncache.c Sun Nov 14 03:56:35 2004 +++ repl/netinet/tcp_syncache.c Tue Dec 14 00:49:43 2004 @@ -106,7 +106,7 @@ static int tcp_syncookies = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, syncookies, CTLFLAG_RW, &tcp_syncookies, 0, - "Use TCP SYN cookies if the syncache overflows"); + "Use TCP SYN cookies if the syncache overflows", &Giant); static void syncache_drop(struct syncache *, struct syncache_head *); static void syncache_free(struct syncache *); @@ -150,22 +150,22 @@ }; static struct tcp_syncache tcp_syncache; -SYSCTL_NODE(_net_inet_tcp, OID_AUTO, syncache, CTLFLAG_RW, 0, "TCP SYN cache"); +SYSCTL_NODE(_net_inet_tcp, OID_AUTO, syncache, CTLFLAG_RW, 0, "TCP SYN cache", NULL); SYSCTL_INT(_net_inet_tcp_syncache, OID_AUTO, bucketlimit, CTLFLAG_RDTUN, - &tcp_syncache.bucket_limit, 0, "Per-bucket hash limit for syncache"); + &tcp_syncache.bucket_limit, 0, "Per-bucket hash limit for syncache", &Giant); SYSCTL_INT(_net_inet_tcp_syncache, OID_AUTO, cachelimit, CTLFLAG_RDTUN, - &tcp_syncache.cache_limit, 0, "Overall entry limit for syncache"); + &tcp_syncache.cache_limit, 0, "Overall entry limit for syncache", &Giant); SYSCTL_INT(_net_inet_tcp_syncache, OID_AUTO, count, CTLFLAG_RD, - &tcp_syncache.cache_count, 0, "Current number of entries in syncache"); + &tcp_syncache.cache_count, 0, "Current number of entries in syncache", &Giant); SYSCTL_INT(_net_inet_tcp_syncache, OID_AUTO, hashsize, CTLFLAG_RDTUN, - &tcp_syncache.hashsize, 0, "Size of TCP syncache hashtable"); + &tcp_syncache.hashsize, 0, "Size of TCP syncache hashtable", &Giant); SYSCTL_INT(_net_inet_tcp_syncache, OID_AUTO, rexmtlimit, CTLFLAG_RW, - &tcp_syncache.rexmt_limit, 0, "Limit on SYN/ACK retransmissions"); + &tcp_syncache.rexmt_limit, 0, "Limit on SYN/ACK retransmissions", &Giant); static MALLOC_DEFINE(M_SYNCACHE, "syncache", "TCP syncache"); diff -ur /home/refugee/freebsd/current/src/sys/netinet/tcp_timer.c repl/netinet/tcp_timer.c --- /home/refugee/freebsd/current/src/sys/netinet/tcp_timer.c Wed Dec 8 20:41:10 2004 +++ repl/netinet/tcp_timer.c Tue Dec 14 00:49:43 2004 @@ -71,7 +71,7 @@ tt = *(int *)oidp->oid_arg1; s = (int)((int64_t)tt * 1000 / hz); - error = sysctl_handle_int(oidp, &s, 0, req); + error = sysctl_handle_int(oidp, &s, 0, req, &Giant); if (error || !req->newptr) return (error); @@ -85,36 +85,36 @@ int tcp_keepinit; SYSCTL_PROC(_net_inet_tcp, TCPCTL_KEEPINIT, keepinit, CTLTYPE_INT|CTLFLAG_RW, - &tcp_keepinit, 0, sysctl_msec_to_ticks, "I", ""); + &tcp_keepinit, 0, sysctl_msec_to_ticks, "I", "", &Giant); int tcp_keepidle; SYSCTL_PROC(_net_inet_tcp, TCPCTL_KEEPIDLE, keepidle, CTLTYPE_INT|CTLFLAG_RW, - &tcp_keepidle, 0, sysctl_msec_to_ticks, "I", ""); + &tcp_keepidle, 0, sysctl_msec_to_ticks, "I", "", &Giant); int tcp_keepintvl; SYSCTL_PROC(_net_inet_tcp, TCPCTL_KEEPINTVL, keepintvl, CTLTYPE_INT|CTLFLAG_RW, - &tcp_keepintvl, 0, sysctl_msec_to_ticks, "I", ""); + &tcp_keepintvl, 0, sysctl_msec_to_ticks, "I", "", &Giant); int tcp_delacktime; SYSCTL_PROC(_net_inet_tcp, TCPCTL_DELACKTIME, delacktime, CTLTYPE_INT|CTLFLAG_RW, &tcp_delacktime, 0, sysctl_msec_to_ticks, "I", - "Time before a delayed ACK is sent"); + "Time before a delayed ACK is sent", &Giant); int tcp_msl; SYSCTL_PROC(_net_inet_tcp, OID_AUTO, msl, CTLTYPE_INT|CTLFLAG_RW, - &tcp_msl, 0, sysctl_msec_to_ticks, "I", "Maximum segment lifetime"); + &tcp_msl, 0, sysctl_msec_to_ticks, "I", "Maximum segment lifetime", &Giant); int tcp_rexmit_min; SYSCTL_PROC(_net_inet_tcp, OID_AUTO, rexmit_min, CTLTYPE_INT|CTLFLAG_RW, - &tcp_rexmit_min, 0, sysctl_msec_to_ticks, "I", "Minimum Retransmission Timeout"); + &tcp_rexmit_min, 0, sysctl_msec_to_ticks, "I", "Minimum Retransmission Timeout", &Giant); int tcp_rexmit_slop; SYSCTL_PROC(_net_inet_tcp, OID_AUTO, rexmit_slop, CTLTYPE_INT|CTLFLAG_RW, - &tcp_rexmit_slop, 0, sysctl_msec_to_ticks, "I", "Retransmission Timer Slop"); + &tcp_rexmit_slop, 0, sysctl_msec_to_ticks, "I", "Retransmission Timer Slop", &Giant); static int always_keepalive = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, always_keepalive, CTLFLAG_RW, - &always_keepalive , 0, "Assume SO_KEEPALIVE on all TCP connections"); + &always_keepalive , 0, "Assume SO_KEEPALIVE on all TCP connections", &Giant); static int tcp_keepcnt = TCPTV_KEEPCNT; /* max idle probes */ diff -ur /home/refugee/freebsd/current/src/sys/netinet/tcp_usrreq.c repl/netinet/tcp_usrreq.c --- /home/refugee/freebsd/current/src/sys/netinet/tcp_usrreq.c Wed Dec 8 20:41:10 2004 +++ repl/netinet/tcp_usrreq.c Tue Dec 14 00:49:43 2004 @@ -1143,10 +1143,10 @@ */ u_long tcp_sendspace = 1024*32; SYSCTL_INT(_net_inet_tcp, TCPCTL_SENDSPACE, sendspace, CTLFLAG_RW, - &tcp_sendspace , 0, "Maximum outgoing TCP datagram size"); + &tcp_sendspace , 0, "Maximum outgoing TCP datagram size", &Giant); u_long tcp_recvspace = 1024*64; SYSCTL_INT(_net_inet_tcp, TCPCTL_RECVSPACE, recvspace, CTLFLAG_RW, - &tcp_recvspace , 0, "Maximum incoming TCP datagram size"); + &tcp_recvspace , 0, "Maximum incoming TCP datagram size", &Giant); /* * Attach TCP protocol to socket, allocating diff -ur /home/refugee/freebsd/current/src/sys/netinet/udp_usrreq.c repl/netinet/udp_usrreq.c --- /home/refugee/freebsd/current/src/sys/netinet/udp_usrreq.c Sun Nov 14 03:56:43 2004 +++ repl/netinet/udp_usrreq.c Tue Dec 14 00:49:43 2004 @@ -94,19 +94,19 @@ static int udpcksum = 0; /* XXX */ #endif SYSCTL_INT(_net_inet_udp, UDPCTL_CHECKSUM, checksum, CTLFLAG_RW, - &udpcksum, 0, ""); + &udpcksum, 0, "", &Giant); int log_in_vain = 0; SYSCTL_INT(_net_inet_udp, OID_AUTO, log_in_vain, CTLFLAG_RW, - &log_in_vain, 0, "Log all incoming UDP packets"); + &log_in_vain, 0, "Log all incoming UDP packets", &Giant); static int blackhole = 0; SYSCTL_INT(_net_inet_udp, OID_AUTO, blackhole, CTLFLAG_RW, - &blackhole, 0, "Do not send port unreachables for refused connects"); + &blackhole, 0, "Do not send port unreachables for refused connects", &Giant); static int strict_mcast_mship = 0; SYSCTL_INT(_net_inet_udp, OID_AUTO, strict_mcast_mship, CTLFLAG_RW, - &strict_mcast_mship, 0, "Only send multicast to member sockets"); + &strict_mcast_mship, 0, "Only send multicast to member sockets", &Giant); struct inpcbhead udb; /* from udp_var.h */ #define udb6 udb /* for KAME src sync over BSD*'s */ @@ -118,7 +118,7 @@ struct udpstat udpstat; /* from udp_var.h */ SYSCTL_STRUCT(_net_inet_udp, UDPCTL_STATS, stats, CTLFLAG_RW, - &udpstat, udpstat, "UDP statistics (struct udpstat, netinet/udp_var.h)"); + &udpstat, udpstat, "UDP statistics (struct udpstat, netinet/udp_var.h)", &Giant); static void udp_append(struct inpcb *last, struct ip *ip, struct mbuf *n, int off, struct sockaddr_in *udp_in); @@ -576,7 +576,7 @@ splx(s); error = sysctl_wire_old_buffer(req, 2 * (sizeof xig) - + n * sizeof(struct xinpcb)); + + n * sizeof(struct xinpcb), &Giant); if (error != 0) return (error); @@ -642,7 +642,7 @@ } SYSCTL_PROC(_net_inet_udp, UDPCTL_PCBLIST, pcblist, CTLFLAG_RD, 0, 0, - udp_pcblist, "S,xinpcb", "List of active UDP sockets"); + udp_pcblist, "S,xinpcb", "List of active UDP sockets", &Giant); static int udp_getcred(SYSCTL_HANDLER_ARGS) @@ -680,7 +680,7 @@ SYSCTL_PROC(_net_inet_udp, OID_AUTO, getcred, CTLTYPE_OPAQUE|CTLFLAG_RW|CTLFLAG_PRISON, 0, 0, - udp_getcred, "S,xucred", "Get the xucred of a UDP connection"); + udp_getcred, "S,xucred", "Get the xucred of a UDP connection", &Giant); static int udp_output(inp, m, addr, control, td) @@ -892,7 +892,7 @@ u_long udp_sendspace = 9216; /* really max datagram size */ /* 40 1K datagrams */ SYSCTL_INT(_net_inet_udp, UDPCTL_MAXDGRAM, maxdgram, CTLFLAG_RW, - &udp_sendspace, 0, "Maximum outgoing UDP datagram size"); + &udp_sendspace, 0, "Maximum outgoing UDP datagram size", &Giant); u_long udp_recvspace = 40 * (1024 + #ifdef INET6 @@ -902,7 +902,7 @@ #endif ); SYSCTL_INT(_net_inet_udp, UDPCTL_RECVSPACE, recvspace, CTLFLAG_RW, - &udp_recvspace, 0, "Maximum space for incoming UDP datagrams"); + &udp_recvspace, 0, "Maximum space for incoming UDP datagrams", &Giant); static int udp_abort(struct socket *so) diff -ur /home/refugee/freebsd/current/src/sys/netinet6/in6_proto.c repl/netinet6/in6_proto.c --- /home/refugee/freebsd/current/src/sys/netinet6/in6_proto.c Sun Oct 31 04:52:45 2004 +++ repl/netinet6/in6_proto.c Tue Dec 14 00:49:55 2004 @@ -335,12 +335,12 @@ "Internet6 Family"); /* net.inet6 */ -SYSCTL_NODE(_net_inet6, IPPROTO_IPV6, ip6, CTLFLAG_RW, 0, "IP6"); -SYSCTL_NODE(_net_inet6, IPPROTO_ICMPV6, icmp6, CTLFLAG_RW, 0, "ICMP6"); -SYSCTL_NODE(_net_inet6, IPPROTO_UDP, udp6, CTLFLAG_RW, 0, "UDP6"); -SYSCTL_NODE(_net_inet6, IPPROTO_TCP, tcp6, CTLFLAG_RW, 0, "TCP6"); +SYSCTL_NODE(_net_inet6, IPPROTO_IPV6, ip6, CTLFLAG_RW, 0, "IP6", NULL); +SYSCTL_NODE(_net_inet6, IPPROTO_ICMPV6, icmp6, CTLFLAG_RW, 0, "ICMP6", NULL); +SYSCTL_NODE(_net_inet6, IPPROTO_UDP, udp6, CTLFLAG_RW, 0, "UDP6", NULL); +SYSCTL_NODE(_net_inet6, IPPROTO_TCP, tcp6, CTLFLAG_RW, 0, "TCP6", NULL); #ifdef IPSEC -SYSCTL_NODE(_net_inet6, IPPROTO_ESP, ipsec6, CTLFLAG_RW, 0, "IPSEC6"); +SYSCTL_NODE(_net_inet6, IPPROTO_ESP, ipsec6, CTLFLAG_RW, 0, "IPSEC6", NULL); #endif /* IPSEC */ /* net.inet6.ip6 */ @@ -382,78 +382,78 @@ } SYSCTL_INT(_net_inet6_ip6, IPV6CTL_FORWARDING, - forwarding, CTLFLAG_RW, &ip6_forwarding, 0, ""); + forwarding, CTLFLAG_RW, &ip6_forwarding, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_SENDREDIRECTS, - redirect, CTLFLAG_RW, &ip6_sendredirects, 0, ""); + redirect, CTLFLAG_RW, &ip6_sendredirects, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFHLIM, - hlim, CTLFLAG_RW, &ip6_defhlim, 0, ""); + hlim, CTLFLAG_RW, &ip6_defhlim, 0, "", &Giant); SYSCTL_STRUCT(_net_inet6_ip6, IPV6CTL_STATS, stats, CTLFLAG_RD, - &ip6stat, ip6stat, ""); + &ip6stat, ip6stat, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGPACKETS, - maxfragpackets, CTLFLAG_RW, &ip6_maxfragpackets, 0, ""); + maxfragpackets, CTLFLAG_RW, &ip6_maxfragpackets, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV, - accept_rtadv, CTLFLAG_RW, &ip6_accept_rtadv, 0, ""); + accept_rtadv, CTLFLAG_RW, &ip6_accept_rtadv, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_KEEPFAITH, - keepfaith, CTLFLAG_RW, &ip6_keepfaith, 0, ""); + keepfaith, CTLFLAG_RW, &ip6_keepfaith, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_LOG_INTERVAL, - log_interval, CTLFLAG_RW, &ip6_log_interval, 0, ""); + log_interval, CTLFLAG_RW, &ip6_log_interval, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_HDRNESTLIMIT, - hdrnestlimit, CTLFLAG_RW, &ip6_hdrnestlimit, 0, ""); + hdrnestlimit, CTLFLAG_RW, &ip6_hdrnestlimit, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DAD_COUNT, - dad_count, CTLFLAG_RW, &ip6_dad_count, 0, ""); + dad_count, CTLFLAG_RW, &ip6_dad_count, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_FLOWLABEL, - auto_flowlabel, CTLFLAG_RW, &ip6_auto_flowlabel, 0, ""); + auto_flowlabel, CTLFLAG_RW, &ip6_auto_flowlabel, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFMCASTHLIM, - defmcasthlim, CTLFLAG_RW, &ip6_defmcasthlim, 0, ""); + defmcasthlim, CTLFLAG_RW, &ip6_defmcasthlim, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM, - gifhlim, CTLFLAG_RW, &ip6_gif_hlim, 0, ""); + gifhlim, CTLFLAG_RW, &ip6_gif_hlim, 0, "", &Giant); SYSCTL_STRING(_net_inet6_ip6, IPV6CTL_KAME_VERSION, - kame_version, CTLFLAG_RD, __KAME_VERSION, 0, ""); + kame_version, CTLFLAG_RD, __KAME_VERSION, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_USE_DEPRECATED, - use_deprecated, CTLFLAG_RW, &ip6_use_deprecated, 0, ""); + use_deprecated, CTLFLAG_RW, &ip6_use_deprecated, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_RR_PRUNE, - rr_prune, CTLFLAG_RW, &ip6_rr_prune, 0, ""); + rr_prune, CTLFLAG_RW, &ip6_rr_prune, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_USETEMPADDR, - use_tempaddr, CTLFLAG_RW, &ip6_use_tempaddr, 0, ""); + use_tempaddr, CTLFLAG_RW, &ip6_use_tempaddr, 0, "", &Giant); SYSCTL_OID(_net_inet6_ip6, IPV6CTL_TEMPPLTIME, temppltime, CTLTYPE_INT|CTLFLAG_RW, &ip6_temp_preferred_lifetime, 0, - sysctl_ip6_temppltime, "I", ""); + sysctl_ip6_temppltime, "I", "", &Giant); SYSCTL_OID(_net_inet6_ip6, IPV6CTL_TEMPVLTIME, tempvltime, CTLTYPE_INT|CTLFLAG_RW, &ip6_temp_valid_lifetime, 0, - sysctl_ip6_tempvltime, "I", ""); + sysctl_ip6_tempvltime, "I", "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_V6ONLY, - v6only, CTLFLAG_RW, &ip6_v6only, 0, ""); + v6only, CTLFLAG_RW, &ip6_v6only, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_LINKLOCAL, - auto_linklocal, CTLFLAG_RW, &ip6_auto_linklocal, 0, ""); + auto_linklocal, CTLFLAG_RW, &ip6_auto_linklocal, 0, "", &Giant); SYSCTL_STRUCT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, CTLFLAG_RD, - &rip6stat, rip6stat, ""); + &rip6stat, rip6stat, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_PREFER_TEMPADDR, - prefer_tempaddr, CTLFLAG_RW, &ip6_prefer_tempaddr, 0, ""); + prefer_tempaddr, CTLFLAG_RW, &ip6_prefer_tempaddr, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGS, - maxfrags, CTLFLAG_RW, &ip6_maxfrags, 0, ""); + maxfrags, CTLFLAG_RW, &ip6_maxfrags, 0, "", &Giant); /* net.inet6.icmp6 */ SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRACCEPT, - rediraccept, CTLFLAG_RW, &icmp6_rediraccept, 0, ""); + rediraccept, CTLFLAG_RW, &icmp6_rediraccept, 0, "", &Giant); SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRTIMEOUT, - redirtimeout, CTLFLAG_RW, &icmp6_redirtimeout, 0, ""); + redirtimeout, CTLFLAG_RW, &icmp6_redirtimeout, 0, "", &Giant); SYSCTL_STRUCT(_net_inet6_icmp6, ICMPV6CTL_STATS, stats, CTLFLAG_RD, - &icmp6stat, icmp6stat, ""); + &icmp6stat, icmp6stat, "", &Giant); SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_PRUNE, - nd6_prune, CTLFLAG_RW, &nd6_prune, 0, ""); + nd6_prune, CTLFLAG_RW, &nd6_prune, 0, "", &Giant); SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_DELAY, - nd6_delay, CTLFLAG_RW, &nd6_delay, 0, ""); + nd6_delay, CTLFLAG_RW, &nd6_delay, 0, "", &Giant); SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_UMAXTRIES, - nd6_umaxtries, CTLFLAG_RW, &nd6_umaxtries, 0, ""); + nd6_umaxtries, CTLFLAG_RW, &nd6_umaxtries, 0, "", &Giant); SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MMAXTRIES, - nd6_mmaxtries, CTLFLAG_RW, &nd6_mmaxtries, 0, ""); + nd6_mmaxtries, CTLFLAG_RW, &nd6_mmaxtries, 0, "", &Giant); SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_USELOOPBACK, - nd6_useloopback, CTLFLAG_RW, &nd6_useloopback, 0, ""); + nd6_useloopback, CTLFLAG_RW, &nd6_useloopback, 0, "", &Giant); SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_NODEINFO, - nodeinfo, CTLFLAG_RW, &icmp6_nodeinfo, 0, ""); + nodeinfo, CTLFLAG_RW, &icmp6_nodeinfo, 0, "", &Giant); SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ERRPPSLIMIT, - errppslimit, CTLFLAG_RW, &icmp6errppslim, 0, ""); + errppslimit, CTLFLAG_RW, &icmp6errppslim, 0, "", &Giant); SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MAXNUDHINT, - nd6_maxnudhint, CTLFLAG_RW, &nd6_maxnudhint, 0, ""); + nd6_maxnudhint, CTLFLAG_RW, &nd6_maxnudhint, 0, "", &Giant); SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_DEBUG, - nd6_debug, CTLFLAG_RW, &nd6_debug, 0, ""); + nd6_debug, CTLFLAG_RW, &nd6_debug, 0, "", &Giant); diff -ur /home/refugee/freebsd/current/src/sys/netinet6/in6_rmx.c repl/netinet6/in6_rmx.c --- /home/refugee/freebsd/current/src/sys/netinet6/in6_rmx.c Sun Oct 31 04:52:45 2004 +++ repl/netinet6/in6_rmx.c Tue Dec 14 00:49:55 2004 @@ -219,17 +219,17 @@ static int rtq_reallyold = 60*60; /* one hour is ``really old'' */ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_RTEXPIRE, rtexpire, - CTLFLAG_RW, &rtq_reallyold , 0, ""); + CTLFLAG_RW, &rtq_reallyold , 0, "", &Giant); static int rtq_minreallyold = 10; /* never automatically crank down to less */ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_RTMINEXPIRE, rtminexpire, - CTLFLAG_RW, &rtq_minreallyold , 0, ""); + CTLFLAG_RW, &rtq_minreallyold , 0, "", &Giant); static int rtq_toomany = 128; /* 128 cached routes is ``too many'' */ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_RTMAXCACHE, rtmaxcache, - CTLFLAG_RW, &rtq_toomany , 0, ""); + CTLFLAG_RW, &rtq_toomany , 0, "", &Giant); /* diff -ur /home/refugee/freebsd/current/src/sys/netinet6/ip6_fw.c repl/netinet6/ip6_fw.c --- /home/refugee/freebsd/current/src/sys/netinet6/ip6_fw.c Sun Oct 31 04:52:45 2004 +++ repl/netinet6/ip6_fw.c Tue Dec 14 00:49:55 2004 @@ -115,15 +115,15 @@ static LIST_HEAD (ip6_fw_head, ip6_fw_chain) ip6_fw_chain; #ifdef SYSCTL_NODE -SYSCTL_DECL(_net_inet6_ip6); +SYSCTL_DECL(_net_inet6_ip6, &Giant); SYSCTL_NODE(_net_inet6_ip6, OID_AUTO, fw, CTLFLAG_RW | CTLFLAG_SECURE, 0, "Firewall"); SYSCTL_INT(_net_inet6_ip6_fw, OID_AUTO, enable, CTLFLAG_RW | CTLFLAG_SECURE, - &ip6_fw_enable, 0, "Enable ip6fw"); -SYSCTL_INT(_net_inet6_ip6_fw, OID_AUTO, debug, CTLFLAG_RW, &fw6_debug, 0, ""); + &ip6_fw_enable, 0, "Enable ip6fw", &Giant); +SYSCTL_INT(_net_inet6_ip6_fw, OID_AUTO, debug, CTLFLAG_RW, &fw6_debug, 0, "", &Giant); SYSCTL_INT(_net_inet6_ip6_fw, OID_AUTO, verbose, CTLFLAG_RW | CTLFLAG_SECURE, - &fw6_verbose, 0, ""); -SYSCTL_INT(_net_inet6_ip6_fw, OID_AUTO, verbose_limit, CTLFLAG_RW, &fw6_verbose_limit, 0, ""); + &fw6_verbose, 0, "", &Giant); +SYSCTL_INT(_net_inet6_ip6_fw, OID_AUTO, verbose_limit, CTLFLAG_RW, &fw6_verbose_limit, 0, "", &Giant); #endif #define dprintf(a) do { \ diff -ur /home/refugee/freebsd/current/src/sys/netinet6/ipsec.c repl/netinet6/ipsec.c --- /home/refugee/freebsd/current/src/sys/netinet6/ipsec.c Sun Oct 31 04:52:45 2004 +++ repl/netinet6/ipsec.c Tue Dec 14 00:49:55 2004 @@ -133,31 +133,31 @@ /* net.inet.ipsec */ SYSCTL_STRUCT(_net_inet_ipsec, IPSECCTL_STATS, - stats, CTLFLAG_RD, &ipsecstat, ipsecstat, ""); + stats, CTLFLAG_RD, &ipsecstat, ipsecstat, "", &Giant); #if 0 SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DEF_POLICY, - def_policy, CTLFLAG_RW, &ip4_def_policy->policy, 0, ""); + def_policy, CTLFLAG_RW, &ip4_def_policy->policy, 0, "", &Giant); #endif SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DEF_ESP_TRANSLEV, esp_trans_deflev, - CTLFLAG_RW, &ip4_esp_trans_deflev, 0, ""); + CTLFLAG_RW, &ip4_esp_trans_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DEF_ESP_NETLEV, esp_net_deflev, - CTLFLAG_RW, &ip4_esp_net_deflev, 0, ""); + CTLFLAG_RW, &ip4_esp_net_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DEF_AH_TRANSLEV, ah_trans_deflev, - CTLFLAG_RW, &ip4_ah_trans_deflev, 0, ""); + CTLFLAG_RW, &ip4_ah_trans_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DEF_AH_NETLEV, ah_net_deflev, - CTLFLAG_RW, &ip4_ah_net_deflev, 0, ""); + CTLFLAG_RW, &ip4_ah_net_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_AH_CLEARTOS, - ah_cleartos, CTLFLAG_RW, &ip4_ah_cleartos, 0, ""); + ah_cleartos, CTLFLAG_RW, &ip4_ah_cleartos, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_AH_OFFSETMASK, - ah_offsetmask, CTLFLAG_RW, &ip4_ah_offsetmask, 0, ""); + ah_offsetmask, CTLFLAG_RW, &ip4_ah_offsetmask, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DFBIT, - dfbit, CTLFLAG_RW, &ip4_ipsec_dfbit, 0, ""); + dfbit, CTLFLAG_RW, &ip4_ipsec_dfbit, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_ECN, - ecn, CTLFLAG_RW, &ip4_ipsec_ecn, 0, ""); + ecn, CTLFLAG_RW, &ip4_ipsec_ecn, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DEBUG, - debug, CTLFLAG_RW, &ipsec_debug, 0, ""); + debug, CTLFLAG_RW, &ipsec_debug, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_ESP_RANDPAD, - esp_randpad, CTLFLAG_RW, &ip4_esp_randpad, 0, ""); + esp_randpad, CTLFLAG_RW, &ip4_esp_randpad, 0, "", &Giant); #ifdef INET6 struct ipsecstat ipsec6stat; @@ -171,25 +171,25 @@ /* net.inet6.ipsec6 */ SYSCTL_STRUCT(_net_inet6_ipsec6, IPSECCTL_STATS, - stats, CTLFLAG_RD, &ipsec6stat, ipsecstat, ""); + stats, CTLFLAG_RD, &ipsec6stat, ipsecstat, "", &Giant); #if 0 SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_DEF_POLICY, - def_policy, CTLFLAG_RW, &ip6_def_policy->policy, 0, ""); + def_policy, CTLFLAG_RW, &ip6_def_policy->policy, 0, "", &Giant); #endif SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_DEF_ESP_TRANSLEV, esp_trans_deflev, - CTLFLAG_RW, &ip6_esp_trans_deflev, 0, ""); + CTLFLAG_RW, &ip6_esp_trans_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_DEF_ESP_NETLEV, esp_net_deflev, - CTLFLAG_RW, &ip6_esp_net_deflev, 0, ""); + CTLFLAG_RW, &ip6_esp_net_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_DEF_AH_TRANSLEV, ah_trans_deflev, - CTLFLAG_RW, &ip6_ah_trans_deflev, 0, ""); + CTLFLAG_RW, &ip6_ah_trans_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_DEF_AH_NETLEV, ah_net_deflev, - CTLFLAG_RW, &ip6_ah_net_deflev, 0, ""); + CTLFLAG_RW, &ip6_ah_net_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_ECN, - ecn, CTLFLAG_RW, &ip6_ipsec_ecn, 0, ""); + ecn, CTLFLAG_RW, &ip6_ipsec_ecn, 0, "", &Giant); SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_DEBUG, - debug, CTLFLAG_RW, &ipsec_debug, 0, ""); + debug, CTLFLAG_RW, &ipsec_debug, 0, "", &Giant); SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_ESP_RANDPAD, - esp_randpad, CTLFLAG_RW, &ip6_esp_randpad, 0, ""); + esp_randpad, CTLFLAG_RW, &ip6_esp_randpad, 0, "", &Giant); #endif /* INET6 */ static struct secpolicy *ipsec_checkpcbcache __P((struct mbuf *, diff -ur /home/refugee/freebsd/current/src/sys/netinet6/udp6_usrreq.c repl/netinet6/udp6_usrreq.c --- /home/refugee/freebsd/current/src/sys/netinet6/udp6_usrreq.c Sun Nov 14 03:56:43 2004 +++ repl/netinet6/udp6_usrreq.c Tue Dec 14 00:49:55 2004 @@ -490,7 +490,7 @@ SYSCTL_PROC(_net_inet6_udp6, OID_AUTO, getcred, CTLTYPE_OPAQUE|CTLFLAG_RW, 0, 0, - udp6_getcred, "S,xucred", "Get the xucred of a UDP6 connection"); + udp6_getcred, "S,xucred", "Get the xucred of a UDP6 connection", &Giant); static int udp6_abort(struct socket *so) diff -ur /home/refugee/freebsd/current/src/sys/netipsec/ipsec.c repl/netipsec/ipsec.c --- /home/refugee/freebsd/current/src/sys/netipsec/ipsec.c Sun Oct 31 04:53:01 2004 +++ repl/netipsec/ipsec.c Tue Dec 14 00:49:58 2004 @@ -122,31 +122,31 @@ /* net.inet.ipsec */ SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DEF_POLICY, - def_policy, CTLFLAG_RW, &ip4_def_policy.policy, 0, ""); + def_policy, CTLFLAG_RW, &ip4_def_policy.policy, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DEF_ESP_TRANSLEV, esp_trans_deflev, - CTLFLAG_RW, &ip4_esp_trans_deflev, 0, ""); + CTLFLAG_RW, &ip4_esp_trans_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DEF_ESP_NETLEV, esp_net_deflev, - CTLFLAG_RW, &ip4_esp_net_deflev, 0, ""); + CTLFLAG_RW, &ip4_esp_net_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DEF_AH_TRANSLEV, ah_trans_deflev, - CTLFLAG_RW, &ip4_ah_trans_deflev, 0, ""); + CTLFLAG_RW, &ip4_ah_trans_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DEF_AH_NETLEV, ah_net_deflev, - CTLFLAG_RW, &ip4_ah_net_deflev, 0, ""); + CTLFLAG_RW, &ip4_ah_net_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_AH_CLEARTOS, - ah_cleartos, CTLFLAG_RW, &ah_cleartos, 0, ""); + ah_cleartos, CTLFLAG_RW, &ah_cleartos, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_AH_OFFSETMASK, - ah_offsetmask, CTLFLAG_RW, &ip4_ah_offsetmask, 0, ""); + ah_offsetmask, CTLFLAG_RW, &ip4_ah_offsetmask, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DFBIT, - dfbit, CTLFLAG_RW, &ip4_ipsec_dfbit, 0, ""); + dfbit, CTLFLAG_RW, &ip4_ipsec_dfbit, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_ECN, - ecn, CTLFLAG_RW, &ip4_ipsec_ecn, 0, ""); + ecn, CTLFLAG_RW, &ip4_ipsec_ecn, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_DEBUG, - debug, CTLFLAG_RW, &ipsec_debug, 0, ""); + debug, CTLFLAG_RW, &ipsec_debug, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, IPSECCTL_ESP_RANDPAD, - esp_randpad, CTLFLAG_RW, &ip4_esp_randpad, 0, ""); + esp_randpad, CTLFLAG_RW, &ip4_esp_randpad, 0, "", &Giant); SYSCTL_INT(_net_inet_ipsec, OID_AUTO, - crypto_support, CTLFLAG_RW, &crypto_support,0, ""); + crypto_support, CTLFLAG_RW, &crypto_support,0, "", &Giant); SYSCTL_STRUCT(_net_inet_ipsec, OID_AUTO, - ipsecstats, CTLFLAG_RD, &newipsecstat, newipsecstat, ""); + ipsecstats, CTLFLAG_RD, &newipsecstat, newipsecstat, "", &Giant); #ifdef INET6 int ip6_esp_trans_deflev = IPSEC_LEVEL_USE; @@ -161,24 +161,24 @@ /* net.inet6.ipsec6 */ #ifdef COMPAT_KAME SYSCTL_OID(_net_inet6_ipsec6, IPSECCTL_STATS, stats, CTLFLAG_RD, - 0,0, compat_ipsecstats_sysctl, "S", ""); + 0,0, compat_ipsecstats_sysctl, "S", "", &Giant); #endif /* COMPAT_KAME */ SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_DEF_POLICY, - def_policy, CTLFLAG_RW, &ip4_def_policy.policy, 0, ""); + def_policy, CTLFLAG_RW, &ip4_def_policy.policy, 0, "", &Giant); SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_DEF_ESP_TRANSLEV, esp_trans_deflev, - CTLFLAG_RW, &ip6_esp_trans_deflev, 0, ""); + CTLFLAG_RW, &ip6_esp_trans_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_DEF_ESP_NETLEV, esp_net_deflev, - CTLFLAG_RW, &ip6_esp_net_deflev, 0, ""); + CTLFLAG_RW, &ip6_esp_net_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_DEF_AH_TRANSLEV, ah_trans_deflev, - CTLFLAG_RW, &ip6_ah_trans_deflev, 0, ""); + CTLFLAG_RW, &ip6_ah_trans_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_DEF_AH_NETLEV, ah_net_deflev, - CTLFLAG_RW, &ip6_ah_net_deflev, 0, ""); + CTLFLAG_RW, &ip6_ah_net_deflev, 0, "", &Giant); SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_ECN, - ecn, CTLFLAG_RW, &ip6_ipsec_ecn, 0, ""); + ecn, CTLFLAG_RW, &ip6_ipsec_ecn, 0, "", &Giant); SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_DEBUG, - debug, CTLFLAG_RW, &ipsec_debug, 0, ""); + debug, CTLFLAG_RW, &ipsec_debug, 0, "", &Giant); SYSCTL_INT(_net_inet6_ipsec6, IPSECCTL_ESP_RANDPAD, - esp_randpad, CTLFLAG_RW, &ip6_esp_randpad, 0, ""); + esp_randpad, CTLFLAG_RW, &ip6_esp_randpad, 0, "", &Giant); #endif /* INET6 */ static int ipsec4_setspidx_inpcb __P((struct mbuf *, struct inpcb *pcb)); diff -ur /home/refugee/freebsd/current/src/sys/netipsec/key.c repl/netipsec/key.c --- /home/refugee/freebsd/current/src/sys/netipsec/key.c Sun Oct 31 04:53:01 2004 +++ repl/netipsec/key.c Tue Dec 14 00:49:58 2004 @@ -238,55 +238,55 @@ static int ipsec_ah_keymin = 128; #ifdef SYSCTL_DECL -SYSCTL_DECL(_net_key); +SYSCTL_DECL(_net_key, &Giant); #endif SYSCTL_INT(_net_key, KEYCTL_DEBUG_LEVEL, debug, CTLFLAG_RW, \ - &key_debug_level, 0, ""); + &key_debug_level, 0, "", &Giant); /* max count of trial for the decision of spi value */ SYSCTL_INT(_net_key, KEYCTL_SPI_TRY, spi_trycnt, CTLFLAG_RW, \ - &key_spi_trycnt, 0, ""); + &key_spi_trycnt, 0, "", &Giant); /* minimum spi value to allocate automatically. */ SYSCTL_INT(_net_key, KEYCTL_SPI_MIN_VALUE, spi_minval, CTLFLAG_RW, \ - &key_spi_minval, 0, ""); + &key_spi_minval, 0, "", &Giant); /* maximun spi value to allocate automatically. */ SYSCTL_INT(_net_key, KEYCTL_SPI_MAX_VALUE, spi_maxval, CTLFLAG_RW, \ - &key_spi_maxval, 0, ""); + &key_spi_maxval, 0, "", &Giant); /* interval to initialize randseed */ SYSCTL_INT(_net_key, KEYCTL_RANDOM_INT, int_random, CTLFLAG_RW, \ - &key_int_random, 0, ""); + &key_int_random, 0, "", &Giant); /* lifetime for larval SA */ SYSCTL_INT(_net_key, KEYCTL_LARVAL_LIFETIME, larval_lifetime, CTLFLAG_RW, \ - &key_larval_lifetime, 0, ""); + &key_larval_lifetime, 0, "", &Giant); /* counter for blocking to send SADB_ACQUIRE to IKEd */ SYSCTL_INT(_net_key, KEYCTL_BLOCKACQ_COUNT, blockacq_count, CTLFLAG_RW, \ - &key_blockacq_count, 0, ""); + &key_blockacq_count, 0, "", &Giant); /* lifetime for blocking to send SADB_ACQUIRE to IKEd */ SYSCTL_INT(_net_key, KEYCTL_BLOCKACQ_LIFETIME, blockacq_lifetime, CTLFLAG_RW, \ - &key_blockacq_lifetime, 0, ""); + &key_blockacq_lifetime, 0, "", &Giant); /* ESP auth */ SYSCTL_INT(_net_key, KEYCTL_ESP_AUTH, esp_auth, CTLFLAG_RW, \ - &ipsec_esp_auth, 0, ""); + &ipsec_esp_auth, 0, "", &Giant); /* minimum ESP key length */ SYSCTL_INT(_net_key, KEYCTL_ESP_KEYMIN, esp_keymin, CTLFLAG_RW, \ - &ipsec_esp_keymin, 0, ""); + &ipsec_esp_keymin, 0, "", &Giant); /* minimum AH key length */ SYSCTL_INT(_net_key, KEYCTL_AH_KEYMIN, ah_keymin, CTLFLAG_RW, \ - &ipsec_ah_keymin, 0, ""); + &ipsec_ah_keymin, 0, "", &Giant); /* perfered old SA rather than new SA */ SYSCTL_INT(_net_key, KEYCTL_PREFERED_OLDSA, preferred_oldsa, CTLFLAG_RW,\ - &key_preferred_oldsa, 0, ""); + &key_preferred_oldsa, 0, "", &Giant); #define __LIST_CHAINED(elm) \ (!((elm)->chain.le_next == NULL && (elm)->chain.le_prev == NULL)) diff -ur /home/refugee/freebsd/current/src/sys/netipsec/keysock.c repl/netipsec/keysock.c --- /home/refugee/freebsd/current/src/sys/netipsec/keysock.c Sun Nov 14 03:56:43 2004 +++ repl/netipsec/keysock.c Tue Dec 14 00:49:58 2004 @@ -576,7 +576,7 @@ }; /* sysctl */ -SYSCTL_NODE(_net, PF_KEY, key, CTLFLAG_RW, 0, "Key Family"); +SYSCTL_NODE(_net, PF_KEY, key, CTLFLAG_RW, 0, "Key Family", NULL); /* * Definitions of protocols supported in the KEY domain. diff -ur /home/refugee/freebsd/current/src/sys/netipsec/xform_ah.c repl/netipsec/xform_ah.c --- /home/refugee/freebsd/current/src/sys/netipsec/xform_ah.c Sun Oct 31 04:53:01 2004 +++ repl/netipsec/xform_ah.c Tue Dec 14 00:49:58 2004 @@ -93,11 +93,11 @@ SYSCTL_DECL(_net_inet_ah); SYSCTL_INT(_net_inet_ah, OID_AUTO, - ah_enable, CTLFLAG_RW, &ah_enable, 0, ""); + ah_enable, CTLFLAG_RW, &ah_enable, 0, "", &Giant); SYSCTL_INT(_net_inet_ah, OID_AUTO, - ah_cleartos, CTLFLAG_RW, &ah_cleartos, 0, ""); + ah_cleartos, CTLFLAG_RW, &ah_cleartos, 0, "", &Giant); SYSCTL_STRUCT(_net_inet_ah, IPSECCTL_STATS, - stats, CTLFLAG_RD, &ahstat, ahstat, ""); + stats, CTLFLAG_RD, &ahstat, ahstat, "", &Giant); static unsigned char ipseczeroes[256]; /* larger than an ip6 extension hdr */ diff -ur /home/refugee/freebsd/current/src/sys/netipsec/xform_esp.c repl/netipsec/xform_esp.c --- /home/refugee/freebsd/current/src/sys/netipsec/xform_esp.c Sun Oct 31 04:53:01 2004 +++ repl/netipsec/xform_esp.c Tue Dec 14 00:49:58 2004 @@ -80,9 +80,9 @@ SYSCTL_DECL(_net_inet_esp); SYSCTL_INT(_net_inet_esp, OID_AUTO, - esp_enable, CTLFLAG_RW, &esp_enable, 0, ""); + esp_enable, CTLFLAG_RW, &esp_enable, 0, "", &Giant); SYSCTL_STRUCT(_net_inet_esp, IPSECCTL_STATS, - stats, CTLFLAG_RD, &espstat, espstat, ""); + stats, CTLFLAG_RD, &espstat, espstat, "", &Giant); static int esp_max_ivlen; /* max iv length over all algorithms */ diff -ur /home/refugee/freebsd/current/src/sys/netipsec/xform_ipcomp.c repl/netipsec/xform_ipcomp.c --- /home/refugee/freebsd/current/src/sys/netipsec/xform_ipcomp.c Sun Oct 31 04:53:01 2004 +++ repl/netipsec/xform_ipcomp.c Tue Dec 14 00:49:58 2004 @@ -71,9 +71,9 @@ SYSCTL_DECL(_net_inet_ipcomp); SYSCTL_INT(_net_inet_ipcomp, OID_AUTO, - ipcomp_enable, CTLFLAG_RW, &ipcomp_enable, 0, ""); + ipcomp_enable, CTLFLAG_RW, &ipcomp_enable, 0, "", &Giant); SYSCTL_STRUCT(_net_inet_ipcomp, IPSECCTL_STATS, - stats, CTLFLAG_RD, &ipcompstat, ipcompstat, ""); + stats, CTLFLAG_RD, &ipcompstat, ipcompstat, "", &Giant); static int ipcomp_input_cb(struct cryptop *crp); static int ipcomp_output_cb(struct cryptop *crp); diff -ur /home/refugee/freebsd/current/src/sys/netipsec/xform_ipip.c repl/netipsec/xform_ipip.c --- /home/refugee/freebsd/current/src/sys/netipsec/xform_ipip.c Sun Oct 31 04:53:01 2004 +++ repl/netipsec/xform_ipip.c Tue Dec 14 00:49:58 2004 @@ -94,9 +94,9 @@ SYSCTL_DECL(_net_inet_ipip); SYSCTL_INT(_net_inet_ipip, OID_AUTO, - ipip_allow, CTLFLAG_RW, &ipip_allow, 0, ""); + ipip_allow, CTLFLAG_RW, &ipip_allow, 0, "", &Giant); SYSCTL_STRUCT(_net_inet_ipip, IPSECCTL_STATS, - stats, CTLFLAG_RD, &ipipstat, ipipstat, ""); + stats, CTLFLAG_RD, &ipipstat, ipipstat, "", &Giant); /* XXX IPCOMP */ #define M_IPSEC (M_AUTHIPHDR|M_AUTHIPDGM|M_DECRYPTED) diff -ur /home/refugee/freebsd/current/src/sys/netipx/ipx_input.c repl/netipx/ipx_input.c --- /home/refugee/freebsd/current/src/sys/netipx/ipx_input.c Sun Oct 31 04:50:45 2004 +++ repl/netipx/ipx_input.c Tue Dec 14 00:49:43 2004 @@ -58,19 +58,19 @@ int ipxcksum = 0; SYSCTL_INT(_net_ipx_ipx, OID_AUTO, checksum, CTLFLAG_RW, - &ipxcksum, 0, ""); + &ipxcksum, 0, "", &Giant); static int ipxprintfs = 0; /* printing forwarding information */ SYSCTL_INT(_net_ipx_ipx, OID_AUTO, ipxprintfs, CTLFLAG_RW, - &ipxprintfs, 0, ""); + &ipxprintfs, 0, "", &Giant); static int ipxforwarding = 0; SYSCTL_INT(_net_ipx_ipx, OID_AUTO, ipxforwarding, CTLFLAG_RW, - &ipxforwarding, 0, ""); + &ipxforwarding, 0, "", &Giant); static int ipxnetbios = 0; SYSCTL_INT(_net_ipx, OID_AUTO, ipxnetbios, CTLFLAG_RW, - &ipxnetbios, 0, ""); + &ipxnetbios, 0, "", &Giant); union ipx_net ipx_zeronet; union ipx_host ipx_zerohost; diff -ur /home/refugee/freebsd/current/src/sys/netipx/ipx_proto.c repl/netipx/ipx_proto.c --- /home/refugee/freebsd/current/src/sys/netipx/ipx_proto.c Sun Oct 31 04:50:45 2004 +++ repl/netipx/ipx_proto.c Tue Dec 14 00:49:43 2004 @@ -102,5 +102,5 @@ SYSCTL_NODE(_net, PF_IPX, ipx, CTLFLAG_RW, 0, "IPX/SPX"); -SYSCTL_NODE(_net_ipx, IPXPROTO_RAW, ipx, CTLFLAG_RW, 0, "IPX"); -SYSCTL_NODE(_net_ipx, IPXPROTO_SPX, spx, CTLFLAG_RW, 0, "SPX"); +SYSCTL_NODE(_net_ipx, IPXPROTO_RAW, ipx, CTLFLAG_RW, 0, "IPX", NULL); +SYSCTL_NODE(_net_ipx, IPXPROTO_SPX, spx, CTLFLAG_RW, 0, "SPX", NULL); diff -ur /home/refugee/freebsd/current/src/sys/netipx/ipx_usrreq.c repl/netipx/ipx_usrreq.c --- /home/refugee/freebsd/current/src/sys/netipx/ipx_usrreq.c Sun Nov 14 03:56:43 2004 +++ repl/netipx/ipx_usrreq.c Tue Dec 14 00:49:43 2004 @@ -68,10 +68,10 @@ static int ipxsendspace = IPXSNDQ; SYSCTL_INT(_net_ipx_ipx, OID_AUTO, ipxsendspace, CTLFLAG_RW, - &ipxsendspace, 0, ""); + &ipxsendspace, 0, "", &Giant); static int ipxrecvspace = IPXRCVQ; SYSCTL_INT(_net_ipx_ipx, OID_AUTO, ipxrecvspace, CTLFLAG_RW, - &ipxrecvspace, 0, ""); + &ipxrecvspace, 0, "", &Giant); static int ipx_usr_abort(struct socket *so); static int ipx_attach(struct socket *so, int proto, struct thread *td); diff -ur /home/refugee/freebsd/current/src/sys/netkey/key.c repl/netkey/key.c --- /home/refugee/freebsd/current/src/sys/netkey/key.c Sun Nov 14 03:56:43 2004 +++ repl/netkey/key.c Tue Dec 14 00:49:55 2004 @@ -226,49 +226,49 @@ SYSCTL_DECL(_net_key); SYSCTL_INT(_net_key, KEYCTL_DEBUG_LEVEL, debug, CTLFLAG_RW, \ - &key_debug_level, 0, ""); + &key_debug_level, 0, "", &Giant); /* max count of trial for the decision of spi value */ SYSCTL_INT(_net_key, KEYCTL_SPI_TRY, spi_trycnt, CTLFLAG_RW, \ - &key_spi_trycnt, 0, ""); + &key_spi_trycnt, 0, "", &Giant); /* minimum spi value to allocate automatically. */ SYSCTL_INT(_net_key, KEYCTL_SPI_MIN_VALUE, spi_minval, CTLFLAG_RW, \ - &key_spi_minval, 0, ""); + &key_spi_minval, 0, "", &Giant); /* maximun spi value to allocate automatically. */ SYSCTL_INT(_net_key, KEYCTL_SPI_MAX_VALUE, spi_maxval, CTLFLAG_RW, \ - &key_spi_maxval, 0, ""); + &key_spi_maxval, 0, "", &Giant); /* lifetime for larval SA */ SYSCTL_INT(_net_key, KEYCTL_LARVAL_LIFETIME, larval_lifetime, CTLFLAG_RW, \ - &key_larval_lifetime, 0, ""); + &key_larval_lifetime, 0, "", &Giant); /* counter for blocking to send SADB_ACQUIRE to IKEd */ SYSCTL_INT(_net_key, KEYCTL_BLOCKACQ_COUNT, blockacq_count, CTLFLAG_RW, \ - &key_blockacq_count, 0, ""); + &key_blockacq_count, 0, "", &Giant); /* lifetime for blocking to send SADB_ACQUIRE to IKEd */ SYSCTL_INT(_net_key, KEYCTL_BLOCKACQ_LIFETIME, blockacq_lifetime, CTLFLAG_RW, \ - &key_blockacq_lifetime, 0, ""); + &key_blockacq_lifetime, 0, "", &Giant); #ifdef IPSEC_ESP /* ESP auth */ SYSCTL_INT(_net_key, KEYCTL_ESP_AUTH, esp_auth, CTLFLAG_RW, \ - &ipsec_esp_auth, 0, "ESP auth"); + &ipsec_esp_auth, 0, "ESP auth", &Giant); #endif /* minimum ESP key length */ SYSCTL_INT(_net_key, KEYCTL_ESP_KEYMIN, esp_keymin, CTLFLAG_RW, \ - &ipsec_esp_keymin, 0, ""); + &ipsec_esp_keymin, 0, "", &Giant); /* minimum AH key length */ SYSCTL_INT(_net_key, KEYCTL_AH_KEYMIN, ah_keymin, CTLFLAG_RW, \ - &ipsec_ah_keymin, 0, ""); + &ipsec_ah_keymin, 0, "", &Giant); /* perfered old SA rather than new SA */ SYSCTL_INT(_net_key, KEYCTL_PREFERED_OLDSA, preferred_oldsa, CTLFLAG_RW,\ - &key_preferred_oldsa, 0, ""); + &key_preferred_oldsa, 0, "", &Giant); #define __LIST_CHAINED(elm) \ (!((elm)->chain.le_next == NULL && (elm)->chain.le_prev == NULL)) diff -ur /home/refugee/freebsd/current/src/sys/netkey/keysock.c repl/netkey/keysock.c --- /home/refugee/freebsd/current/src/sys/netkey/keysock.c Sun Nov 14 03:56:43 2004 +++ repl/netkey/keysock.c Tue Dec 14 00:49:58 2004 @@ -486,7 +486,7 @@ }; /* sysctl */ -SYSCTL_NODE(_net, PF_KEY, key, CTLFLAG_RW, 0, "Key Family"); +SYSCTL_NODE(_net, PF_KEY, key, CTLFLAG_RW, 0, "Key Family", NULL); /* * Definitions of protocols supported in the KEY domain. diff -ur /home/refugee/freebsd/current/src/sys/netnatm/natm.c repl/netnatm/natm.c --- /home/refugee/freebsd/current/src/sys/netnatm/natm.c Sun Nov 14 03:56:43 2004 +++ repl/netnatm/natm.c Tue Dec 14 00:49:43 2004 @@ -751,7 +751,7 @@ natm0_sysctl(SYSCTL_HANDLER_ARGS) { /* All sysctl names at this level are terminal. */ - return (ENOENT); + return (ENOENT, &Giant); } /* @@ -762,5 +762,5 @@ natm5_sysctl(SYSCTL_HANDLER_ARGS) { /* All sysctl names at this level are terminal. */ - return (ENOENT); + return (ENOENT, &Giant); } diff -ur /home/refugee/freebsd/current/src/sys/netncp/ncp_conn.c repl/netncp/ncp_conn.c --- /home/refugee/freebsd/current/src/sys/netncp/ncp_conn.c Sun Oct 31 04:52:37 2004 +++ repl/netncp/ncp_conn.c Tue Dec 14 00:49:54 2004 @@ -63,7 +63,7 @@ static int ncp_next_handle = 1; static struct lock lhlock; -static int ncp_sysctl_connstat(SYSCTL_HANDLER_ARGS); +static int ncp_sysctl_connstat(SYSCTL_HANDLER_ARGS, &Giant); static int ncp_conn_lock_any(struct ncp_conn *conn, struct thread *td, struct ucred *cred); @@ -71,7 +71,7 @@ SYSCTL_INT (_net_ncp, OID_AUTO, burst_enabled, CTLFLAG_RD, &ncp_burst_enabled, 0, ""); SYSCTL_INT (_net_ncp, OID_AUTO, conn_cnt, CTLFLAG_RD, &ncp_conn_cnt, 0, ""); SYSCTL_PROC(_net_ncp, OID_AUTO, conn_stat, CTLFLAG_RD|CTLTYPE_OPAQUE, - NULL, 0, ncp_sysctl_connstat, "S,connstat", "Connections list"); + NULL, 0, ncp_sysctl_connstat, "S,connstat", "Connections list", &Giant); MALLOC_DEFINE(M_NCPDATA, "NCP data", "NCP private data"); @@ -647,7 +647,7 @@ struct ncp_conn *ncp; /* struct ucred *cred = req->td->td_ucred;*/ - error = sysctl_wire_old_buffer(req, 0); + error = sysctl_wire_old_buffer(req, 0, &Giant); if (error != 0) return (error); ncp_conn_locklist(LK_SHARED, req->td); diff -ur /home/refugee/freebsd/current/src/sys/netncp/ncp_mod.c repl/netncp/ncp_mod.c --- /home/refugee/freebsd/current/src/sys/netncp/ncp_mod.c Sun Oct 31 04:52:37 2004 +++ repl/netncp/ncp_mod.c Tue Dec 14 00:49:54 2004 @@ -56,8 +56,8 @@ int ncp_version = NCP_VERSION; -SYSCTL_NODE(_net, OID_AUTO, ncp, CTLFLAG_RW, NULL, "NetWare requester"); -SYSCTL_INT(_net_ncp, OID_AUTO, version, CTLFLAG_RD, &ncp_version, 0, ""); +SYSCTL_NODE(_net, OID_AUTO, ncp, CTLFLAG_RW, NULL, "NetWare requester", NULL); +SYSCTL_INT(_net_ncp, OID_AUTO, version, CTLFLAG_RD, &ncp_version, 0, "", &Giant); MODULE_VERSION(ncp, 1); MODULE_DEPEND(ncp, libmchain, 1, 1, 1); diff -ur /home/refugee/freebsd/current/src/sys/netsmb/smb_conn.c repl/netsmb/smb_conn.c --- /home/refugee/freebsd/current/src/sys/netsmb/smb_conn.c Sun Oct 31 04:52:37 2004 +++ repl/netsmb/smb_conn.c Tue Dec 14 00:49:54 2004 @@ -57,7 +57,7 @@ static struct smb_connobj smb_vclist; static int smb_vcnext = 1; /* next unique id for VC */ -SYSCTL_NODE(_net, OID_AUTO, smb, CTLFLAG_RW, NULL, "SMB protocol"); +SYSCTL_NODE(_net, OID_AUTO, smb, CTLFLAG_RW, NULL, "SMB protocol", NULL); MALLOC_DEFINE(M_SMBCONN, "SMB conn", "SMB connection"); @@ -72,10 +72,10 @@ static smb_co_free_t smb_share_free; static smb_co_gone_t smb_share_gone; -static int smb_sysctl_treedump(SYSCTL_HANDLER_ARGS); +static int smb_sysctl_treedump(SYSCTL_HANDLER_ARGS, &Giant); SYSCTL_PROC(_net_smb, OID_AUTO, treedump, CTLFLAG_RD | CTLTYPE_OPAQUE, - NULL, 0, smb_sysctl_treedump, "S,treedump", "Requester tree"); + NULL, 0, smb_sysctl_treedump, "S,treedump", "Requester tree", &Giant); int smb_sm_init(void) @@ -861,7 +861,7 @@ int error, itype; smb_makescred(&scred, td, td->td_ucred); - error = sysctl_wire_old_buffer(req, 0); + error = sysctl_wire_old_buffer(req, 0, &Giant); if (error) return (error); error = smb_sm_lockvclist(LK_SHARED, td); diff -ur /home/refugee/freebsd/current/src/sys/netsmb/smb_dev.c repl/netsmb/smb_dev.c --- /home/refugee/freebsd/current/src/sys/netsmb/smb_dev.c Sun Nov 14 03:56:43 2004 +++ repl/netsmb/smb_dev.c Tue Dec 14 00:49:54 2004 @@ -78,7 +78,7 @@ SYSCTL_DECL(_net_smb); -SYSCTL_INT(_net_smb, OID_AUTO, version, CTLFLAG_RD, &smb_version, 0, ""); +SYSCTL_INT(_net_smb, OID_AUTO, version, CTLFLAG_RD, &smb_version, 0, "", &Giant); static MALLOC_DEFINE(M_NSMBDEV, "NETSMBDEV", "NET/SMB device"); diff -ur /home/refugee/freebsd/current/src/sys/netsmb/smb_trantcp.c repl/netsmb/smb_trantcp.c --- /home/refugee/freebsd/current/src/sys/netsmb/smb_trantcp.c Sun Oct 31 04:52:37 2004 +++ repl/netsmb/smb_trantcp.c Tue Dec 14 00:49:54 2004 @@ -72,8 +72,8 @@ static int smb_tcprcvbuf = NB_RCVQ - 1; SYSCTL_DECL(_net_smb); -SYSCTL_INT(_net_smb, OID_AUTO, tcpsndbuf, CTLFLAG_RW, &smb_tcpsndbuf, 0, ""); -SYSCTL_INT(_net_smb, OID_AUTO, tcprcvbuf, CTLFLAG_RW, &smb_tcprcvbuf, 0, ""); +SYSCTL_INT(_net_smb, OID_AUTO, tcpsndbuf, CTLFLAG_RW, &smb_tcpsndbuf, 0, "", &Giant); +SYSCTL_INT(_net_smb, OID_AUTO, tcprcvbuf, CTLFLAG_RW, &smb_tcprcvbuf, 0, "", &Giant); #define nb_sosend(so,m,flags,td) (so)->so_proto->pr_usrreqs->pru_sosend( \ so, NULL, 0, m, 0, flags, td) diff -ur /home/refugee/freebsd/current/src/sys/nfs4client/nfs4_vfsops.c repl/nfs4client/nfs4_vfsops.c --- /home/refugee/freebsd/current/src/sys/nfs4client/nfs4_vfsops.c Wed Dec 8 20:41:12 2004 +++ repl/nfs4client/nfs4_vfsops.c Tue Dec 14 00:49:46 2004 @@ -111,9 +111,9 @@ #include #include -SYSCTL_NODE(_vfs, OID_AUTO, nfs4, CTLFLAG_RW, 0, "NFS4 filesystem"); +SYSCTL_NODE(_vfs, OID_AUTO, nfs4, CTLFLAG_RW, 0, "NFS4 filesystem", NULL); SYSCTL_STRUCT(_vfs_nfs4, NFS_NFSSTATS, nfsstats, CTLFLAG_RD, - &nfsstats, nfsstats, "S,nfsstats"); + &nfsstats, nfsstats, "S,nfsstats", &Giant); static void nfs_decode_args(struct nfsmount *nmp, struct nfs_args *argp); static void nfs4_daemon(void *arg); diff -ur /home/refugee/freebsd/current/src/sys/nfs4client/nfs4_vnops.c repl/nfs4client/nfs4_vnops.c --- /home/refugee/freebsd/current/src/sys/nfs4client/nfs4_vnops.c Wed Dec 8 20:41:12 2004 +++ repl/nfs4client/nfs4_vnops.c Tue Dec 14 00:49:46 2004 @@ -222,17 +222,17 @@ static int nfsaccess_cache_timeout = NFS_MAXATTRTIMO; SYSCTL_INT(_vfs_nfs4, OID_AUTO, access_cache_timeout, CTLFLAG_RW, - &nfsaccess_cache_timeout, 0, "NFS ACCESS cache timeout"); + &nfsaccess_cache_timeout, 0, "NFS ACCESS cache timeout", &Giant); static int nfsv3_commit_on_close = 0; SYSCTL_INT(_vfs_nfs4, OID_AUTO, nfsv3_commit_on_close, CTLFLAG_RW, - &nfsv3_commit_on_close, 0, "write+commit on close, else only write"); + &nfsv3_commit_on_close, 0, "write+commit on close, else only write", &Giant); #if 0 SYSCTL_INT(_vfs_nfs4, OID_AUTO, access_cache_hits, CTLFLAG_RD, - &nfsstats.accesscache_hits, 0, "NFS ACCESS cache hit count"); + &nfsstats.accesscache_hits, 0, "NFS ACCESS cache hit count", &Giant); SYSCTL_INT(_vfs_nfs4, OID_AUTO, access_cache_misses, CTLFLAG_RD, - &nfsstats.accesscache_misses, 0, "NFS ACCESS cache miss count"); + &nfsstats.accesscache_misses, 0, "NFS ACCESS cache miss count", &Giant); #endif #define NFSV3ACCESS_ALL (NFSV3ACCESS_READ | NFSV3ACCESS_MODIFY \ diff -ur /home/refugee/freebsd/current/src/sys/nfsclient/bootp_subr.c repl/nfsclient/bootp_subr.c --- /home/refugee/freebsd/current/src/sys/nfsclient/bootp_subr.c Wed Dec 8 20:41:12 2004 +++ repl/nfsclient/bootp_subr.c Tue Dec 14 00:49:39 2004 @@ -211,7 +211,7 @@ static char bootp_cookie[128]; SYSCTL_STRING(_kern, OID_AUTO, bootp_cookie, CTLFLAG_RD, - bootp_cookie, 0, "Cookie (T134) supplied by bootp server"); + bootp_cookie, 0, "Cookie (T134) supplied by bootp server", &Giant); /* mountd RPC */ static int md_mount(struct sockaddr_in *mdsin, char *path, u_char *fhp, diff -ur /home/refugee/freebsd/current/src/sys/nfsclient/nfs_nfsiod.c repl/nfsclient/nfs_nfsiod.c --- /home/refugee/freebsd/current/src/sys/nfsclient/nfs_nfsiod.c Wed Dec 8 20:41:12 2004 +++ repl/nfsclient/nfs_nfsiod.c Tue Dec 14 00:49:39 2004 @@ -84,7 +84,7 @@ /* Maximum number of seconds a nfsiod kthread will sleep before exiting */ static unsigned int nfs_iodmaxidle = 120; -SYSCTL_UINT(_vfs_nfs, OID_AUTO, iodmaxidle, CTLFLAG_RW, &nfs_iodmaxidle, 0, ""); +SYSCTL_UINT(_vfs_nfs, OID_AUTO, iodmaxidle, CTLFLAG_RW, &nfs_iodmaxidle, 0, "", &Giant); /* Maximum number of nfsiod kthreads */ unsigned int nfs_iodmax = 20; @@ -99,7 +99,7 @@ int newmin; newmin = nfs_iodmin; - error = sysctl_handle_int(oidp, &newmin, 0, req); + error = sysctl_handle_int(oidp, &newmin, 0, req, &Giant); if (error || (req->newptr == NULL)) return (error); if (newmin > nfs_iodmax) @@ -116,7 +116,7 @@ return (0); } SYSCTL_PROC(_vfs_nfs, OID_AUTO, iodmin, CTLTYPE_UINT | CTLFLAG_RW, 0, - sizeof (nfs_iodmin), sysctl_iodmin, "IU", ""); + sizeof (nfs_iodmin), sysctl_iodmin, "IU", "", &Giant); static int @@ -126,7 +126,7 @@ int iod, newmax; newmax = nfs_iodmax; - error = sysctl_handle_int(oidp, &newmax, 0, req); + error = sysctl_handle_int(oidp, &newmax, 0, req, &Giant); if (error || (req->newptr == NULL)) return (error); if (newmax > NFS_MAXASYNCDAEMON) @@ -149,7 +149,7 @@ return (0); } SYSCTL_PROC(_vfs_nfs, OID_AUTO, iodmax, CTLTYPE_UINT | CTLFLAG_RW, 0, - sizeof (nfs_iodmax), sysctl_iodmax, "IU", ""); + sizeof (nfs_iodmax), sysctl_iodmax, "IU", "", &Giant); int nfs_nfsiodnew(void) @@ -196,7 +196,7 @@ SYSINIT(nfsiod, SI_SUB_KTHREAD_IDLE, SI_ORDER_ANY, nfsiod_setup, NULL); static int nfs_defect = 0; -SYSCTL_INT(_vfs_nfs, OID_AUTO, defect, CTLFLAG_RW, &nfs_defect, 0, ""); +SYSCTL_INT(_vfs_nfs, OID_AUTO, defect, CTLFLAG_RW, &nfs_defect, 0, "", &Giant); /* * Asynchronous I/O daemons for client nfs. diff -ur /home/refugee/freebsd/current/src/sys/nfsclient/nfs_node.c repl/nfsclient/nfs_node.c --- /home/refugee/freebsd/current/src/sys/nfsclient/nfs_node.c Wed Dec 8 20:41:12 2004 +++ repl/nfsclient/nfs_node.c Tue Dec 14 00:49:39 2004 @@ -99,7 +99,7 @@ return (0); } SYSCTL_PROC(_debug_hashstat, OID_AUTO, rawnfsnode, CTLTYPE_INT|CTLFLAG_RD, 0, 0, - sysctl_debug_hashstat_rawnfsnode, "S,int", "nfsnode chain lengths"); + sysctl_debug_hashstat_rawnfsnode, "S,int", "nfsnode chain lengths", &Giant); static int sysctl_debug_hashstat_nfsnode(SYSCTL_HANDLER_ARGS) @@ -145,7 +145,7 @@ return (0); } SYSCTL_PROC(_debug_hashstat, OID_AUTO, nfsnode, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_debug_hashstat_nfsnode, "I", "nfsnode chain lengths"); + 0, 0, sysctl_debug_hashstat_nfsnode, "I", "nfsnode chain lengths", &Giant); /* * Initialize hash links for nfsnodes diff -ur /home/refugee/freebsd/current/src/sys/nfsclient/nfs_socket.c repl/nfsclient/nfs_socket.c --- /home/refugee/freebsd/current/src/sys/nfsclient/nfs_socket.c Wed Dec 8 20:41:12 2004 +++ repl/nfsclient/nfs_socket.c Tue Dec 14 00:49:39 2004 @@ -116,11 +116,11 @@ SYSCTL_DECL(_vfs_nfs); -SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, 0, ""); -SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_count, CTLFLAG_RW, &nfs_realign_count, 0, ""); -SYSCTL_INT(_vfs_nfs, OID_AUTO, bufpackets, CTLFLAG_RW, &nfs_bufpackets, 0, ""); +SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, 0, "", &Giant); +SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_count, CTLFLAG_RW, &nfs_realign_count, 0, "", &Giant); +SYSCTL_INT(_vfs_nfs, OID_AUTO, bufpackets, CTLFLAG_RW, &nfs_bufpackets, 0, "", &Giant); SYSCTL_INT(_vfs_nfs, OID_AUTO, reconnects, CTLFLAG_RD, &nfs_reconnects, 0, - "number of times the nfs client has had to reconnect"); + "number of times the nfs client has had to reconnect", &Giant); /* diff -ur /home/refugee/freebsd/current/src/sys/nfsclient/nfs_subs.c repl/nfsclient/nfs_subs.c --- /home/refugee/freebsd/current/src/sys/nfsclient/nfs_subs.c Wed Dec 8 20:41:12 2004 +++ repl/nfsclient/nfs_subs.c Tue Dec 14 00:49:39 2004 @@ -623,7 +623,7 @@ #include SYSCTL_DECL(_vfs_nfs); static int nfs_acdebug; -SYSCTL_INT(_vfs_nfs, OID_AUTO, acdebug, CTLFLAG_RW, &nfs_acdebug, 0, ""); +SYSCTL_INT(_vfs_nfs, OID_AUTO, acdebug, CTLFLAG_RW, &nfs_acdebug, 0, "", &Giant); #endif /* diff -ur /home/refugee/freebsd/current/src/sys/nfsclient/nfs_vfsops.c repl/nfsclient/nfs_vfsops.c --- /home/refugee/freebsd/current/src/sys/nfsclient/nfs_vfsops.c Wed Dec 8 20:41:12 2004 +++ repl/nfsclient/nfs_vfsops.c Tue Dec 14 00:49:39 2004 @@ -82,23 +82,23 @@ uma_zone_t nfsmount_zone; struct nfsstats nfsstats; -SYSCTL_NODE(_vfs, OID_AUTO, nfs, CTLFLAG_RW, 0, "NFS filesystem"); +SYSCTL_NODE(_vfs, OID_AUTO, nfs, CTLFLAG_RW, 0, "NFS filesystem", NULL); SYSCTL_STRUCT(_vfs_nfs, NFS_NFSSTATS, nfsstats, CTLFLAG_RD, - &nfsstats, nfsstats, "S,nfsstats"); + &nfsstats, nfsstats, "S,nfsstats", &Giant); static int nfs_ip_paranoia = 1; SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs_ip_paranoia, CTLFLAG_RW, - &nfs_ip_paranoia, 0, ""); + &nfs_ip_paranoia, 0, "", &Giant); #ifdef NFS_DEBUG int nfs_debug; -SYSCTL_INT(_vfs_nfs, OID_AUTO, debug, CTLFLAG_RW, &nfs_debug, 0, ""); +SYSCTL_INT(_vfs_nfs, OID_AUTO, debug, CTLFLAG_RW, &nfs_debug, 0, "", &Giant); #endif static int nfs_tprintf_initial_delay = NFS_TPRINTF_INITIAL_DELAY; SYSCTL_INT(_vfs_nfs, NFS_TPRINTF_INITIAL_DELAY, - downdelayinitial, CTLFLAG_RW, &nfs_tprintf_initial_delay, 0, ""); + downdelayinitial, CTLFLAG_RW, &nfs_tprintf_initial_delay, 0, "", &Giant); /* how long between console messages "nfs server foo not responding" */ static int nfs_tprintf_delay = NFS_TPRINTF_DELAY; SYSCTL_INT(_vfs_nfs, NFS_TPRINTF_DELAY, - downdelayinterval, CTLFLAG_RW, &nfs_tprintf_delay, 0, ""); + downdelayinterval, CTLFLAG_RW, &nfs_tprintf_delay, 0, "", &Giant); static int nfs_iosize(struct nfsmount *nmp); static void nfs_decode_args(struct mount *mp, struct nfsmount *nmp, struct nfs_args *argp); @@ -151,14 +151,14 @@ int nfs_diskless_valid = 0; SYSCTL_INT(_vfs_nfs, OID_AUTO, diskless_valid, CTLFLAG_RD, - &nfs_diskless_valid, 0, ""); + &nfs_diskless_valid, 0, "", &Giant); SYSCTL_STRING(_vfs_nfs, OID_AUTO, diskless_rootpath, CTLFLAG_RD, - nfsv3_diskless.root_hostnam, 0, ""); + nfsv3_diskless.root_hostnam, 0, "", &Giant); SYSCTL_OPAQUE(_vfs_nfs, OID_AUTO, diskless_rootaddr, CTLFLAG_RD, &nfsv3_diskless.root_saddr, sizeof nfsv3_diskless.root_saddr, - "%Ssockaddr_in", ""); + "%Ssockaddr_in", "", &Giant); void nfsargs_ntoh(struct nfs_args *); @@ -1015,7 +1015,7 @@ static int nfs_sysctl(struct mount *mp, fsctlop_t op, struct sysctl_req *req) { - struct nfsmount *nmp = VFSTONFS(mp); + struct nfsmount *nmp = VFSTONFS(mp, &Giant); struct vfsquery vq; int error; diff -ur /home/refugee/freebsd/current/src/sys/nfsclient/nfs_vnops.c repl/nfsclient/nfs_vnops.c --- /home/refugee/freebsd/current/src/sys/nfsclient/nfs_vnops.c Wed Dec 8 20:41:12 2004 +++ repl/nfsclient/nfs_vnops.c Tue Dec 14 00:49:39 2004 @@ -201,22 +201,22 @@ static int nfsaccess_cache_timeout = NFS_MAXATTRTIMO; SYSCTL_INT(_vfs_nfs, OID_AUTO, access_cache_timeout, CTLFLAG_RW, - &nfsaccess_cache_timeout, 0, "NFS ACCESS cache timeout"); + &nfsaccess_cache_timeout, 0, "NFS ACCESS cache timeout", &Giant); static int nfsv3_commit_on_close = 0; SYSCTL_INT(_vfs_nfs, OID_AUTO, nfsv3_commit_on_close, CTLFLAG_RW, - &nfsv3_commit_on_close, 0, "write+commit on close, else only write"); + &nfsv3_commit_on_close, 0, "write+commit on close, else only write", &Giant); static int nfs_clean_pages_on_close = 1; SYSCTL_INT(_vfs_nfs, OID_AUTO, clean_pages_on_close, CTLFLAG_RW, - &nfs_clean_pages_on_close, 0, "NFS clean dirty pages on close"); + &nfs_clean_pages_on_close, 0, "NFS clean dirty pages on close", &Giant); #if 0 SYSCTL_INT(_vfs_nfs, OID_AUTO, access_cache_hits, CTLFLAG_RD, - &nfsstats.accesscache_hits, 0, "NFS ACCESS cache hit count"); + &nfsstats.accesscache_hits, 0, "NFS ACCESS cache hit count", &Giant); SYSCTL_INT(_vfs_nfs, OID_AUTO, access_cache_misses, CTLFLAG_RD, - &nfsstats.accesscache_misses, 0, "NFS ACCESS cache miss count"); + &nfsstats.accesscache_misses, 0, "NFS ACCESS cache miss count", &Giant); #endif #define NFSV3ACCESS_ALL (NFSV3ACCESS_READ | NFSV3ACCESS_MODIFY \ diff -ur /home/refugee/freebsd/current/src/sys/nfsserver/nfs_serv.c repl/nfsserver/nfs_serv.c --- /home/refugee/freebsd/current/src/sys/nfsserver/nfs_serv.c Sun Nov 14 03:56:43 2004 +++ repl/nfsserver/nfs_serv.c Tue Dec 14 00:49:46 2004 @@ -124,18 +124,18 @@ static struct timeval nfsver = { 0 }; -SYSCTL_NODE(_vfs, OID_AUTO, nfsrv, CTLFLAG_RW, 0, "NFS server"); +SYSCTL_NODE(_vfs, OID_AUTO, nfsrv, CTLFLAG_RW, 0, "NFS server", NULL); static int nfs_async; static int nfs_commit_blks; static int nfs_commit_miss; -SYSCTL_INT(_vfs_nfsrv, OID_AUTO, async, CTLFLAG_RW, &nfs_async, 0, ""); -SYSCTL_INT(_vfs_nfsrv, OID_AUTO, commit_blks, CTLFLAG_RW, &nfs_commit_blks, 0, ""); -SYSCTL_INT(_vfs_nfsrv, OID_AUTO, commit_miss, CTLFLAG_RW, &nfs_commit_miss, 0, ""); +SYSCTL_INT(_vfs_nfsrv, OID_AUTO, async, CTLFLAG_RW, &nfs_async, 0, "", &Giant); +SYSCTL_INT(_vfs_nfsrv, OID_AUTO, commit_blks, CTLFLAG_RW, &nfs_commit_blks, 0, "", &Giant); +SYSCTL_INT(_vfs_nfsrv, OID_AUTO, commit_miss, CTLFLAG_RW, &nfs_commit_miss, 0, "", &Giant); struct nfsrvstats nfsrvstats; SYSCTL_STRUCT(_vfs_nfsrv, NFS_NFSRVSTATS, nfsrvstats, CTLFLAG_RD, - &nfsrvstats, nfsrvstats, "S,nfsrvstats"); + &nfsrvstats, nfsrvstats, "S,nfsrvstats", &Giant); static int nfsrv_access_withgiant(struct vnode *vp, int flags, struct ucred *cred, int rdonly, struct thread *td, diff -ur /home/refugee/freebsd/current/src/sys/nfsserver/nfs_srvsock.c repl/nfsserver/nfs_srvsock.c --- /home/refugee/freebsd/current/src/sys/nfsserver/nfs_srvsock.c Sun Oct 31 04:51:37 2004 +++ repl/nfsserver/nfs_srvsock.c Tue Dec 14 00:49:46 2004 @@ -73,8 +73,8 @@ SYSCTL_DECL(_vfs_nfsrv); -SYSCTL_INT(_vfs_nfsrv, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, 0, ""); -SYSCTL_INT(_vfs_nfsrv, OID_AUTO, realign_count, CTLFLAG_RW, &nfs_realign_count, 0, ""); +SYSCTL_INT(_vfs_nfsrv, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, 0, "", &Giant); +SYSCTL_INT(_vfs_nfsrv, OID_AUTO, realign_count, CTLFLAG_RW, &nfs_realign_count, 0, "", &Giant); /* diff -ur /home/refugee/freebsd/current/src/sys/nfsserver/nfs_syscalls.c repl/nfsserver/nfs_syscalls.c --- /home/refugee/freebsd/current/src/sys/nfsserver/nfs_syscalls.c Sun Oct 31 04:51:37 2004 +++ repl/nfsserver/nfs_syscalls.c Tue Dec 14 00:49:46 2004 @@ -91,11 +91,11 @@ static int nfs_privport = 0; SYSCTL_INT(_vfs_nfsrv, NFS_NFSPRIVPORT, nfs_privport, CTLFLAG_RW, - &nfs_privport, 0, ""); + &nfs_privport, 0, "", &Giant); SYSCTL_INT(_vfs_nfsrv, OID_AUTO, gatherdelay, CTLFLAG_RW, - &nfsrvw_procrastinate, 0, ""); + &nfsrvw_procrastinate, 0, "", &Giant); SYSCTL_INT(_vfs_nfsrv, OID_AUTO, gatherdelay_v3, CTLFLAG_RW, - &nfsrvw_procrastinate_v3, 0, ""); + &nfsrvw_procrastinate_v3, 0, "", &Giant); static int nfssvc_addsock(struct file *, struct sockaddr *, struct thread *); diff -ur /home/refugee/freebsd/current/src/sys/opencrypto/crypto.c repl/opencrypto/crypto.c --- /home/refugee/freebsd/current/src/sys/opencrypto/crypto.c Sun Oct 31 04:50:27 2004 +++ repl/opencrypto/crypto.c Tue Dec 14 00:49:42 2004 @@ -85,11 +85,11 @@ int crypto_userasymcrypto = 1; /* userland may do asym crypto reqs */ SYSCTL_INT(_kern, OID_AUTO, userasymcrypto, CTLFLAG_RW, &crypto_userasymcrypto, 0, - "Enable/disable user-mode access to asymmetric crypto support"); + "Enable/disable user-mode access to asymmetric crypto support", &Giant); int crypto_devallowsoft = 0; /* only use hardware crypto for asym */ SYSCTL_INT(_kern, OID_AUTO, cryptodevallowsoft, CTLFLAG_RW, &crypto_devallowsoft, 0, - "Enable/disable use of software asym crypto support"); + "Enable/disable use of software asym crypto support", &Giant); MALLOC_DEFINE(M_CRYPTO_DATA, "crypto", "crypto session records"); @@ -103,12 +103,12 @@ static struct cryptostats cryptostats; SYSCTL_STRUCT(_kern, OID_AUTO, crypto_stats, CTLFLAG_RW, &cryptostats, - cryptostats, "Crypto system statistics"); + cryptostats, "Crypto system statistics", &Giant); #ifdef CRYPTO_TIMING static int crypto_timing = 0; SYSCTL_INT(_debug, OID_AUTO, crypto_timing, CTLFLAG_RW, - &crypto_timing, 0, "Enable/disable crypto timing support"); + &crypto_timing, 0, "Enable/disable crypto timing support", &Giant); #endif static int diff -ur /home/refugee/freebsd/current/src/sys/pc98/i386/machdep.c repl/pc98/i386/machdep.c --- /home/refugee/freebsd/current/src/sys/pc98/i386/machdep.c Wed Dec 8 20:41:12 2004 +++ repl/pc98/i386/machdep.c Tue Dec 14 00:49:53 2004 @@ -183,7 +183,7 @@ #else static int ispc98 = 0; #endif -SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, ""); +SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, "", &Giant); int cold = 1; @@ -1066,7 +1066,7 @@ */ static int cpu_idle_hlt = 1; SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, - &cpu_idle_hlt, 0, "Idle loop HLT enable"); + &cpu_idle_hlt, 0, "Idle loop HLT enable", &Giant); static void cpu_idle_default(void) @@ -1204,27 +1204,27 @@ { int error; error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, - req); + req, &Giant); if (!error && req->newptr) resettodr(); return (error); } SYSCTL_PROC(_machdep, CPU_ADJKERNTZ, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", ""); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "", &Giant); SYSCTL_INT(_machdep, CPU_DISRTCSET, disable_rtc_set, - CTLFLAG_RW, &disable_rtc_set, 0, ""); + CTLFLAG_RW, &disable_rtc_set, 0, "", &Giant); SYSCTL_STRUCT(_machdep, CPU_BOOTINFO, bootinfo, - CTLFLAG_RD, &bootinfo, bootinfo, ""); + CTLFLAG_RD, &bootinfo, bootinfo, "", &Giant); SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, - CTLFLAG_RW, &wall_cmos_clock, 0, ""); + CTLFLAG_RW, &wall_cmos_clock, 0, "", &Giant); u_long bootdev; /* not a struct cdev *- encoding is different */ SYSCTL_ULONG(_machdep, OID_AUTO, guessed_bootdev, - CTLFLAG_RD, &bootdev, 0, "Maybe the Boot device (not in struct cdev *format)"); + CTLFLAG_RD, &bootdev, 0, "Maybe the Boot device (not in struct cdev *format)", &Giant); /* * Initialize 386 and configure to run kernel diff -ur /home/refugee/freebsd/current/src/sys/pc98/pc98/canbus.c repl/pc98/pc98/canbus.c --- /home/refugee/freebsd/current/src/sys/pc98/pc98/canbus.c Sun Oct 31 04:52:29 2004 +++ repl/pc98/pc98/canbus.c Tue Dec 14 00:49:53 2004 @@ -188,13 +188,13 @@ return (ENXIO); /* Dynamic sysctl tree setup */ - sysctl_ctx_init(&sc->canbus_sysctl_ctx); + sysctl_ctx_init(&sc->canbus_sysctl_ctx, &Giant); canbus_sysctl_tree = SYSCTL_ADD_NODE(&sc->canbus_sysctl_ctx, SYSCTL_STATIC_CHILDREN(/* tree top */), OID_AUTO, - "canbus", CTLFLAG_RD, 0, "CanBe I/O Bus"); + "canbus", CTLFLAG_RD, 0, "CanBe I/O Bus", &Giant); SYSCTL_ADD_INT(&sc->canbus_sysctl_ctx, SYSCTL_CHILDREN(canbus_sysctl_tree), OID_AUTO, "io_delay_time", - CTLFLAG_RW, &sc->io_delay_time, 0, "CanBe Bus I/O delay time"); + CTLFLAG_RW, &sc->io_delay_time, 0, "CanBe Bus I/O delay time", &Giant); bus_generic_probe(dev); bus_generic_attach(dev); @@ -215,7 +215,7 @@ /* Dynamic sysctl tree destroy */ if (sysctl_ctx_free(&sc->canbus_sysctl_ctx)) { device_printf(dev, - "can't free this context - other oids depend on it\n"); + "can't free this context - other oids depend on it\n", &Giant); return (ENOTEMPTY); } diff -ur /home/refugee/freebsd/current/src/sys/pc98/pc98/clock.c repl/pc98/pc98/clock.c --- /home/refugee/freebsd/current/src/sys/pc98/pc98/clock.c Sun Oct 31 04:52:29 2004 +++ repl/pc98/pc98/clock.c Tue Dec 14 00:49:53 2004 @@ -927,7 +927,7 @@ * is is too generic. Should use it everywhere. */ freq = timer_freq; - error = sysctl_handle_int(oidp, &freq, sizeof(freq), req); + error = sysctl_handle_int(oidp, &freq, sizeof(freq), req, &Giant); if (error == 0 && req->newptr != NULL) { #ifndef BURN_BRIDGES if (timer0_state != RELEASED) @@ -940,7 +940,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, i8254_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_i8254_freq, "IU", ""); + 0, sizeof(u_int), sysctl_machdep_i8254_freq, "IU", "", &Giant); static unsigned i8254_get_timecount(struct timecounter *tc) diff -ur /home/refugee/freebsd/current/src/sys/pc98/pc98/sio.c repl/pc98/pc98/sio.c --- /home/refugee/freebsd/current/src/sys/pc98/pc98/sio.c Sun Oct 31 04:52:29 2004 +++ repl/pc98/pc98/sio.c Tue Dec 14 00:49:53 2004 @@ -372,10 +372,10 @@ int comconsole = -1; static volatile speed_t comdefaultrate = CONSPEED; static u_long comdefaultrclk = DEFAULT_RCLK; -SYSCTL_ULONG(_machdep, OID_AUTO, conrclk, CTLFLAG_RW, &comdefaultrclk, 0, ""); +SYSCTL_ULONG(_machdep, OID_AUTO, conrclk, CTLFLAG_RW, &comdefaultrclk, 0, "", &Giant); static speed_t gdbdefaultrate = GDBSPEED; SYSCTL_UINT(_machdep, OID_AUTO, gdbspeed, CTLFLAG_RW, - &gdbdefaultrate, GDBSPEED, ""); + &gdbdefaultrate, GDBSPEED, "", &Giant); static u_int com_events; /* input chars + weighted output completions */ static Port_t siocniobase; static int siocnunit = -1; @@ -667,7 +667,7 @@ newspeed = comdefaultrate; - error = sysctl_handle_opaque(oidp, &newspeed, sizeof newspeed, req); + error = sysctl_handle_opaque(oidp, &newspeed, sizeof newspeed, req, &Giant); if (error || !req->newptr) return (error); @@ -705,7 +705,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, conspeed, CTLTYPE_INT | CTLFLAG_RW, - 0, 0, sysctl_machdep_comdefaultrate, "I", ""); + 0, 0, sysctl_machdep_comdefaultrate, "I", "", &Giant); /* * Unload the driver and clear the table. @@ -2256,7 +2256,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, siots, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, sysctl_siots, "A", "sio timestamps"); + 0, 0, sysctl_siots, "A", "sio timestamps", &Giant); static void siointr1(com) diff -ur /home/refugee/freebsd/current/src/sys/pccard/pccard_nbk.c repl/pccard/pccard_nbk.c --- /home/refugee/freebsd/current/src/sys/pccard/pccard_nbk.c Sun Oct 31 04:50:20 2004 +++ repl/pccard/pccard_nbk.c Tue Dec 14 00:49:40 2004 @@ -86,7 +86,7 @@ #define PCCARD_DEVINFO(d) (struct pccard_devinfo *) device_get_ivars(d) -SYSCTL_NODE(_machdep, OID_AUTO, pccard, CTLFLAG_RW, 0, "pccard"); +SYSCTL_NODE(_machdep, OID_AUTO, pccard, CTLFLAG_RW, 0, "pccard", NULL); #ifdef UNSAFE static u_long mem_start = IOM_BEGIN; @@ -97,9 +97,9 @@ #endif SYSCTL_ULONG(_machdep_pccard, OID_AUTO, mem_start, CTLFLAG_RW, - &mem_start, 0, ""); + &mem_start, 0, "", &Giant); SYSCTL_ULONG(_machdep_pccard, OID_AUTO, mem_end, CTLFLAG_RW, - &mem_end, 0, ""); + &mem_end, 0, "", &Giant); #if __FreeBSD_version >= 500000 /* diff -ur /home/refugee/freebsd/current/src/sys/pccard/pcic.c repl/pccard/pcic.c --- /home/refugee/freebsd/current/src/sys/pccard/pcic.c Sun Oct 31 04:50:20 2004 +++ repl/pccard/pcic.c Tue Dec 14 00:49:40 2004 @@ -80,14 +80,14 @@ }; /* sysctl vars */ -SYSCTL_NODE(_hw, OID_AUTO, pcic, CTLFLAG_RD, 0, "PCIC parameters"); +SYSCTL_NODE(_hw, OID_AUTO, pcic, CTLFLAG_RD, 0, "PCIC parameters", NULL); int pcic_override_irq = 0; TUNABLE_INT("machdep.pccard.pcic_irq", &pcic_override_irq); TUNABLE_INT("hw.pcic.irq", &pcic_override_irq); SYSCTL_INT(_hw_pcic, OID_AUTO, irq, CTLFLAG_RDTUN, &pcic_override_irq, 0, - "Override the IRQ configured by the config system for all pcic devices"); + "Override the IRQ configured by the config system for all pcic devices", &Giant); int pcic_boot_deactivated = 0; TUNABLE_INT("hw.pcic.boot_deactivated", &pcic_boot_deactivated); @@ -96,7 +96,7 @@ "Override the automatic powering up of pccards at boot. This works\n\ around what turns out to be an old bug in the code that has since been\n\ corrected. It is now deprecated and will be removed completely before\n\ -FreeBSD 4.8."); +FreeBSD 4.8.", &Giant); /* * CL-PD6722's VSENSE method @@ -113,7 +113,7 @@ voltage of the card. 0 means assume a 5.0V card and do not check. 1 means\n\ use the same method that the CL-PD6710 uses (default). 2 means use the\n\ same method as the CL-PD6729. 2 is documented in the datasheet as being\n\ -the correct way, but 1 seems to give better results on more laptops."); +the correct way, but 1 seems to give better results on more laptops.", &Giant); /* * Read a register from the PCIC. diff -ur /home/refugee/freebsd/current/src/sys/pccard/pcic_pci.c repl/pccard/pcic_pci.c --- /home/refugee/freebsd/current/src/sys/pccard/pcic_pci.c Sun Oct 31 04:50:20 2004 +++ repl/pccard/pcic_pci.c Tue Dec 14 00:49:40 2004 @@ -68,7 +68,7 @@ SYSCTL_INT(_hw_pcic, OID_AUTO, ignore_function_1, CTLFLAG_RDTUN, &pcic_ignore_function_1, 0, "When set, driver ignores pci function 1 of the bridge. This option\n\ -is obsolete and will be deleted before FreeBSD 4.8."); +is obsolete and will be deleted before FreeBSD 4.8.", &Giant); /* * The following should be a hint, so we can do it on a per device @@ -82,7 +82,7 @@ "Which path to send the interrupts over. Normally interrupts for\n\ cardbus bridges are routed over the PCI bus (2). However, some laptops\n\ will hang when using PCI interrupts due to bugs in this code. Those\n\ -bugs can be worked around by forcings ISA interrupts (1)."); +bugs can be worked around by forcings ISA interrupts (1).", &Giant); static int pcic_init_routing = 0; TUNABLE_INT("hw.pcic.init_routing", &pcic_init_routing); @@ -93,7 +93,7 @@ needed. The default of 0 is almost always appropriate. Only set to 1 if\n\ instructed to do so for debugging. Only TI bridges are affected by this\n\ option, and what the code does is of dubious value. This option is obsolete\n\ -and will be deleted before FreeBSD 4.8."); +and will be deleted before FreeBSD 4.8.", &Giant); static int pcic_ignore_pci = 0; TUNABLE_INT("hw.pcic.ignore_pci", &pcic_ignore_pci); @@ -101,7 +101,7 @@ &pcic_ignore_pci, 0, "When set, driver ignores pci cardbus bridges it would otherwise claim.\n\ Generally speaking, this option is not needed for anything other than as an\n\ -aid in debugging."); +aid in debugging.", &Giant); static int pcic_pd6729_intr_path = (int)pcic_iw_isa; TUNABLE_INT("hw.pcic.pd6729_intr_path", &pcic_pd6729_intr_path); @@ -111,7 +111,7 @@ similar I/O space based pcmcia bridge. Chips on a PCI expansion card need\n\ a value of 2, while chips installed in a laptop need a value of 1 (which is\n\ also the default). This is similar to hw.pcic.intr_path, but separate so\n\ -that it can default to ISA when intr_path defaults to PCI."); +that it can default to ISA when intr_path defaults to PCI.", &Giant); static int pcic_ti12xx_enable_pci_clock = 0; TUNABLE_INT("hw.pcic.ti12xx_enable_pci_clock", &pcic_ti12xx_enable_pci_clock); @@ -120,7 +120,7 @@ "Some TI-12xx parts need to have the PCI clock enabled. These designs do\n\ not provide a clock themselves. Most of the reference boards have the\n\ required oscillator parts, so the number of machines that needs this to be\n\ -set is vanishingly small."); +set is vanishingly small.", &Giant); static void pcic_pci_cardbus_init(device_t); static pcic_intr_way_t pcic_pci_gen_func; diff -ur /home/refugee/freebsd/current/src/sys/pci/if_dc.c repl/pci/if_dc.c --- /home/refugee/freebsd/current/src/sys/pci/if_dc.c Sun Oct 31 04:51:36 2004 +++ repl/pci/if_dc.c Tue Dec 14 00:49:46 2004 @@ -333,7 +333,7 @@ #ifdef __i386__ static int dc_quick = 1; SYSCTL_INT(_hw, OID_AUTO, dc_quick, CTLFLAG_RW, &dc_quick, 0, - "do not m_devget() in dc driver"); + "do not m_devget() in dc driver", &Giant); #endif DRIVER_MODULE(dc, cardbus, dc_driver, dc_devclass, 0, 0); diff -ur /home/refugee/freebsd/current/src/sys/pci/if_ste.c repl/pci/if_ste.c --- /home/refugee/freebsd/current/src/sys/pci/if_ste.c Sun Oct 31 04:51:36 2004 +++ repl/pci/if_ste.c Tue Dec 14 00:49:46 2004 @@ -164,10 +164,10 @@ DRIVER_MODULE(ste, pci, ste_driver, ste_devclass, 0, 0); DRIVER_MODULE(miibus, ste, miibus_driver, miibus_devclass, 0, 0); -SYSCTL_NODE(_hw, OID_AUTO, ste, CTLFLAG_RD, 0, "if_ste parameters"); +SYSCTL_NODE(_hw, OID_AUTO, ste, CTLFLAG_RD, 0, "if_ste parameters", NULL); static int ste_rxsyncs; -SYSCTL_INT(_hw_ste, OID_AUTO, rxsyncs, CTLFLAG_RW, &ste_rxsyncs, 0, ""); +SYSCTL_INT(_hw_ste, OID_AUTO, rxsyncs, CTLFLAG_RW, &ste_rxsyncs, 0, "", &Giant); #define STE_SETBIT4(sc, reg, x) \ CSR_WRITE_4(sc, reg, CSR_READ_4(sc, reg) | (x)) diff -ur /home/refugee/freebsd/current/src/sys/pci/ncr.c repl/pci/ncr.c --- /home/refugee/freebsd/current/src/sys/pci/ncr.c Sun Oct 31 04:51:36 2004 +++ repl/pci/ncr.c Tue Dec 14 00:49:46 2004 @@ -1317,7 +1317,7 @@ #ifdef _KERNEL static int ncr_debug = SCSI_NCR_DEBUG; -SYSCTL_INT(_debug, OID_AUTO, ncr_debug, CTLFLAG_RW, &ncr_debug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, ncr_debug, CTLFLAG_RW, &ncr_debug, 0, "", &Giant); static int ncr_cache; /* to be aligned _NOT_ static */ diff -ur /home/refugee/freebsd/current/src/sys/posix4/posix4_mib.c repl/posix4/posix4_mib.c --- /home/refugee/freebsd/current/src/sys/posix4/posix4_mib.c Wed Dec 8 20:41:12 2004 +++ repl/posix4/posix4_mib.c Tue Dec 14 00:49:40 2004 @@ -55,7 +55,7 @@ #define P1B_SYSCTL(num, name) \ SYSCTL_INT(_p1003_1b, num, \ - name, CTLFLAG_RD, facility + num - 1, 0, ""); + name, CTLFLAG_RD, facility + num - 1, 0, "", &Giant); #else @@ -63,13 +63,13 @@ #define P1B_SYSCTL(num, name) \ SYSCTL_INT(_kern_p1003_1b, OID_AUTO, \ - name, CTLFLAG_RD, facility + num - 1, 0, ""); -SYSCTL_NODE(_kern, OID_AUTO, p1003_1b, CTLFLAG_RW, 0, "P1003.1B"); + name, CTLFLAG_RD, facility + num - 1, 0, "", &Giant); +SYSCTL_NODE(_kern, OID_AUTO, p1003_1b, CTLFLAG_RW, 0, "P1003.1B", NULL); #endif SYSCTL_INT(_p1003_1b, CTL_P1003_1B_ASYNCHRONOUS_IO, \ - asynchronous_io, CTLFLAG_RD, &async_io_version, 0, ""); + asynchronous_io, CTLFLAG_RD, &async_io_version, 0, "", &Giant); P1B_SYSCTL(CTL_P1003_1B_MAPPED_FILES, mapped_files); P1B_SYSCTL(CTL_P1003_1B_MEMLOCK, memlock); P1B_SYSCTL(CTL_P1003_1B_MEMLOCK_RANGE, memlock_range); diff -ur /home/refugee/freebsd/current/src/sys/powerpc/powerpc/machdep.c repl/powerpc/powerpc/machdep.c --- /home/refugee/freebsd/current/src/sys/powerpc/powerpc/machdep.c Wed Dec 8 20:41:12 2004 +++ repl/powerpc/powerpc/machdep.c Tue Dec 14 00:49:38 2004 @@ -129,14 +129,14 @@ vm_offset_t kstack0_phys; char machine[] = "powerpc"; -SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, ""); +SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "", &Giant); static char model[128]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, model, 0, ""); +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, model, 0, "", &Giant); static int cacheline_size = CACHELINESIZE; SYSCTL_INT(_machdep, CPU_CACHELINE, cacheline_size, - CTLFLAG_RD, &cacheline_size, 0, ""); + CTLFLAG_RD, &cacheline_size, 0, "", &Giant); static void cpu_startup(void *); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) diff -ur /home/refugee/freebsd/current/src/sys/powerpc/powerpc/pmap.c repl/powerpc/powerpc/pmap.c --- /home/refugee/freebsd/current/src/sys/powerpc/powerpc/pmap.c Sun Oct 31 04:50:07 2004 +++ repl/powerpc/powerpc/pmap.c Tue Dec 14 00:49:38 2004 @@ -264,19 +264,19 @@ u_int pmap_pvo_remove_calls = 0; u_int pmap_pte_spills = 0; SYSCTL_INT(_machdep, OID_AUTO, pmap_pte_valid, CTLFLAG_RD, &pmap_pte_valid, - 0, ""); + 0, "", &Giant); SYSCTL_INT(_machdep, OID_AUTO, pmap_pte_overflow, CTLFLAG_RD, - &pmap_pte_overflow, 0, ""); + &pmap_pte_overflow, 0, "", &Giant); SYSCTL_INT(_machdep, OID_AUTO, pmap_pte_replacements, CTLFLAG_RD, - &pmap_pte_replacements, 0, ""); + &pmap_pte_replacements, 0, "", &Giant); SYSCTL_INT(_machdep, OID_AUTO, pmap_pvo_entries, CTLFLAG_RD, &pmap_pvo_entries, - 0, ""); + 0, "", &Giant); SYSCTL_INT(_machdep, OID_AUTO, pmap_pvo_enter_calls, CTLFLAG_RD, - &pmap_pvo_enter_calls, 0, ""); + &pmap_pvo_enter_calls, 0, "", &Giant); SYSCTL_INT(_machdep, OID_AUTO, pmap_pvo_remove_calls, CTLFLAG_RD, - &pmap_pvo_remove_calls, 0, ""); + &pmap_pvo_remove_calls, 0, "", &Giant); SYSCTL_INT(_machdep, OID_AUTO, pmap_pte_spills, CTLFLAG_RD, - &pmap_pte_spills, 0, ""); + &pmap_pte_spills, 0, "", &Giant); struct pvo_entry *pmap_pvo_zeropage; diff -ur /home/refugee/freebsd/current/src/sys/powerpc/powerpc/uma_machdep.c repl/powerpc/powerpc/uma_machdep.c --- /home/refugee/freebsd/current/src/sys/powerpc/powerpc/uma_machdep.c Sun Oct 31 04:50:07 2004 +++ repl/powerpc/powerpc/uma_machdep.c Tue Dec 14 00:49:38 2004 @@ -42,7 +42,7 @@ static int hw_uma_mdpages; SYSCTL_INT(_hw, OID_AUTO, uma_mdpages, CTLFLAG_RD, &hw_uma_mdpages, 0, - "UMA MD pages in use"); + "UMA MD pages in use", &Giant); void * uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) diff -ur /home/refugee/freebsd/current/src/sys/rpc/rpcclnt.c repl/rpc/rpcclnt.c --- /home/refugee/freebsd/current/src/sys/rpc/rpcclnt.c Sun Oct 31 04:50:13 2004 +++ repl/rpc/rpcclnt.c Tue Dec 14 00:49:39 2004 @@ -184,18 +184,18 @@ struct rpcstats rpcstats; int rpcclnt_ticks; -SYSCTL_NODE(_kern, OID_AUTO, rpc, CTLFLAG_RD, 0, "RPC Subsystem"); +SYSCTL_NODE(_kern, OID_AUTO, rpc, CTLFLAG_RD, 0, "RPC Subsystem", NULL); -SYSCTL_UINT(_kern_rpc, OID_AUTO, retries, CTLFLAG_RD, &rpcstats.rpcretries, 0, "retries"); -SYSCTL_UINT(_kern_rpc, OID_AUTO, request, CTLFLAG_RD, &rpcstats.rpcrequests, 0, "request"); -SYSCTL_UINT(_kern_rpc, OID_AUTO, timeouts, CTLFLAG_RD, &rpcstats.rpctimeouts, 0, "timeouts"); -SYSCTL_UINT(_kern_rpc, OID_AUTO, unexpected, CTLFLAG_RD, &rpcstats.rpcunexpected, 0, "unexpected"); -SYSCTL_UINT(_kern_rpc, OID_AUTO, invalid, CTLFLAG_RD, &rpcstats.rpcinvalid, 0, "invalid"); +SYSCTL_UINT(_kern_rpc, OID_AUTO, retries, CTLFLAG_RD, &rpcstats.rpcretries, 0, "retries", &Giant); +SYSCTL_UINT(_kern_rpc, OID_AUTO, request, CTLFLAG_RD, &rpcstats.rpcrequests, 0, "request", &Giant); +SYSCTL_UINT(_kern_rpc, OID_AUTO, timeouts, CTLFLAG_RD, &rpcstats.rpctimeouts, 0, "timeouts", &Giant); +SYSCTL_UINT(_kern_rpc, OID_AUTO, unexpected, CTLFLAG_RD, &rpcstats.rpcunexpected, 0, "unexpected", &Giant); +SYSCTL_UINT(_kern_rpc, OID_AUTO, invalid, CTLFLAG_RD, &rpcstats.rpcinvalid, 0, "invalid", &Giant); #ifdef RPCCLNT_DEBUG int rpcdebugon = 0; -SYSCTL_UINT(_kern_rpc, OID_AUTO, debug_on, CTLFLAG_RW, &rpcdebugon, 0, "RPC Debug messages"); +SYSCTL_UINT(_kern_rpc, OID_AUTO, debug_on, CTLFLAG_RW, &rpcdebugon, 0, "RPC Debug messages", &Giant); #endif /* diff -ur /home/refugee/freebsd/current/src/sys/security/mac/mac_inet.c repl/security/mac/mac_inet.c --- /home/refugee/freebsd/current/src/sys/security/mac/mac_inet.c Sun Oct 31 04:52:58 2004 +++ repl/security/mac/mac_inet.c Tue Dec 14 00:49:58 2004 @@ -70,9 +70,9 @@ static unsigned int nmacinpcbs, nmacipqs; SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, inpcbs, CTLFLAG_RD, - &nmacinpcbs, 0, "number of inpcbs in use"); + &nmacinpcbs, 0, "number of inpcbs in use", &Giant); SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, ipqs, CTLFLAG_RD, - &nmacipqs, 0, "number of ipqs in use"); + &nmacipqs, 0, "number of ipqs in use", &Giant); #endif static struct label * diff -ur /home/refugee/freebsd/current/src/sys/security/mac/mac_net.c repl/security/mac/mac_net.c --- /home/refugee/freebsd/current/src/sys/security/mac/mac_net.c Sun Oct 31 04:52:58 2004 +++ repl/security/mac/mac_net.c Tue Dec 14 00:49:58 2004 @@ -69,18 +69,18 @@ */ int mac_enforce_network = 1; SYSCTL_INT(_security_mac, OID_AUTO, enforce_network, CTLFLAG_RW, - &mac_enforce_network, 0, "Enforce MAC policy on network packets"); + &mac_enforce_network, 0, "Enforce MAC policy on network packets", &Giant); TUNABLE_INT("security.mac.enforce_network", &mac_enforce_network); #ifdef MAC_DEBUG static unsigned int nmacbpfdescs, nmacifnets, nmacmbufs; SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, bpfdescs, CTLFLAG_RD, - &nmacbpfdescs, 0, "number of bpfdescs in use"); + &nmacbpfdescs, 0, "number of bpfdescs in use", &Giant); SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, ifnets, CTLFLAG_RD, - &nmacifnets, 0, "number of ifnets in use"); + &nmacifnets, 0, "number of ifnets in use", &Giant); SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, mbufs, CTLFLAG_RD, - &nmacmbufs, 0, "number of mbufs in use"); + &nmacmbufs, 0, "number of mbufs in use", &Giant); #endif /* diff -ur /home/refugee/freebsd/current/src/sys/security/mac/mac_pipe.c repl/security/mac/mac_pipe.c --- /home/refugee/freebsd/current/src/sys/security/mac/mac_pipe.c Sun Oct 31 04:52:58 2004 +++ repl/security/mac/mac_pipe.c Tue Dec 14 00:49:58 2004 @@ -53,13 +53,13 @@ static int mac_enforce_pipe = 1; SYSCTL_INT(_security_mac, OID_AUTO, enforce_pipe, CTLFLAG_RW, - &mac_enforce_pipe, 0, "Enforce MAC policy on pipe operations"); + &mac_enforce_pipe, 0, "Enforce MAC policy on pipe operations", &Giant); TUNABLE_INT("security.mac.enforce_pipe", &mac_enforce_pipe); #ifdef MAC_DEBUG static unsigned int nmacpipes; SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, pipes, CTLFLAG_RD, - &nmacpipes, 0, "number of pipes in use"); + &nmacpipes, 0, "number of pipes in use", &Giant); #endif struct label * diff -ur /home/refugee/freebsd/current/src/sys/security/mac/mac_process.c repl/security/mac/mac_process.c --- /home/refugee/freebsd/current/src/sys/security/mac/mac_process.c Sun Oct 31 04:52:58 2004 +++ repl/security/mac/mac_process.c Tue Dec 14 00:49:58 2004 @@ -67,30 +67,30 @@ int mac_enforce_process = 1; SYSCTL_INT(_security_mac, OID_AUTO, enforce_process, CTLFLAG_RW, - &mac_enforce_process, 0, "Enforce MAC policy on inter-process operations"); + &mac_enforce_process, 0, "Enforce MAC policy on inter-process operations", &Giant); TUNABLE_INT("security.mac.enforce_process", &mac_enforce_process); int mac_enforce_vm = 1; SYSCTL_INT(_security_mac, OID_AUTO, enforce_vm, CTLFLAG_RW, - &mac_enforce_vm, 0, "Enforce MAC policy on vm operations"); + &mac_enforce_vm, 0, "Enforce MAC policy on vm operations", &Giant); TUNABLE_INT("security.mac.enforce_vm", &mac_enforce_vm); static int mac_mmap_revocation = 1; SYSCTL_INT(_security_mac, OID_AUTO, mmap_revocation, CTLFLAG_RW, &mac_mmap_revocation, 0, "Revoke mmap access to files on subject " - "relabel"); + "relabel", &Giant); static int mac_mmap_revocation_via_cow = 0; SYSCTL_INT(_security_mac, OID_AUTO, mmap_revocation_via_cow, CTLFLAG_RW, &mac_mmap_revocation_via_cow, 0, "Revoke mmap access to files via " - "copy-on-write semantics, or by removing all write access"); + "copy-on-write semantics, or by removing all write access", &Giant); #ifdef MAC_DEBUG static unsigned int nmaccreds, nmacprocs; SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, creds, CTLFLAG_RD, - &nmaccreds, 0, "number of ucreds in use"); + &nmaccreds, 0, "number of ucreds in use", &Giant); SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, procs, CTLFLAG_RD, - &nmacprocs, 0, "number of procs in use"); + &nmacprocs, 0, "number of procs in use", &Giant); #endif static void mac_cred_mmapped_drop_perms_recurse(struct thread *td, diff -ur /home/refugee/freebsd/current/src/sys/security/mac/mac_socket.c repl/security/mac/mac_socket.c --- /home/refugee/freebsd/current/src/sys/security/mac/mac_socket.c Sun Oct 31 04:52:58 2004 +++ repl/security/mac/mac_socket.c Tue Dec 14 00:49:58 2004 @@ -73,14 +73,14 @@ */ int mac_enforce_socket = 1; SYSCTL_INT(_security_mac, OID_AUTO, enforce_socket, CTLFLAG_RW, - &mac_enforce_socket, 0, "Enforce MAC policy on socket operations"); + &mac_enforce_socket, 0, "Enforce MAC policy on socket operations", &Giant); TUNABLE_INT("security.mac.enforce_socket", &mac_enforce_socket); #ifdef MAC_DEBUG static unsigned int nmacsockets; SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, sockets, CTLFLAG_RD, - &nmacsockets, 0, "number of sockets in use"); + &nmacsockets, 0, "number of sockets in use", &Giant); #endif struct label * diff -ur /home/refugee/freebsd/current/src/sys/security/mac/mac_system.c repl/security/mac/mac_system.c --- /home/refugee/freebsd/current/src/sys/security/mac/mac_system.c Sun Oct 31 04:52:58 2004 +++ repl/security/mac/mac_system.c Tue Dec 14 00:49:58 2004 @@ -51,12 +51,12 @@ static int mac_enforce_kld = 1; SYSCTL_INT(_security_mac, OID_AUTO, enforce_kld, CTLFLAG_RW, - &mac_enforce_kld, 0, "Enforce MAC policy on kld operations"); + &mac_enforce_kld, 0, "Enforce MAC policy on kld operations", &Giant); TUNABLE_INT("security.mac.enforce_kld", &mac_enforce_kld); static int mac_enforce_system = 1; SYSCTL_INT(_security_mac, OID_AUTO, enforce_system, CTLFLAG_RW, - &mac_enforce_system, 0, "Enforce MAC policy on system operations"); + &mac_enforce_system, 0, "Enforce MAC policy on system operations", &Giant); TUNABLE_INT("security.mac.enforce_system", &mac_enforce_system); int diff -ur /home/refugee/freebsd/current/src/sys/security/mac/mac_sysv_msg.c repl/security/mac/mac_sysv_msg.c --- /home/refugee/freebsd/current/src/sys/security/mac/mac_sysv_msg.c Wed Nov 17 08:14:24 2004 +++ repl/security/mac/mac_sysv_msg.c Tue Dec 14 00:49:58 2004 @@ -56,15 +56,15 @@ static int mac_enforce_sysv_msg = 1; SYSCTL_INT(_security_mac, OID_AUTO, enforce_sysv_msg, CTLFLAG_RW, &mac_enforce_sysv_msg, 0, - "Enforce MAC policy on System V IPC Message Queues"); + "Enforce MAC policy on System V IPC Message Queues", &Giant); TUNABLE_INT("security.mac.enforce_sysv_msg", &mac_enforce_sysv_msg); #ifdef MAC_DEBUG static unsigned int nmacipcmsgs, nmacipcmsqs; SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, ipc_msgs, CTLFLAG_RD, - &nmacipcmsgs, 0, "number of sysv ipc messages inuse"); + &nmacipcmsgs, 0, "number of sysv ipc messages inuse", &Giant); SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, ipc_msqs, CTLFLAG_RD, - &nmacipcmsqs, 0, "number of sysv ipc message queue identifiers inuse"); + &nmacipcmsqs, 0, "number of sysv ipc message queue identifiers inuse", &Giant); #endif static struct label * diff -ur /home/refugee/freebsd/current/src/sys/security/mac/mac_sysv_sem.c repl/security/mac/mac_sysv_sem.c --- /home/refugee/freebsd/current/src/sys/security/mac/mac_sysv_sem.c Wed Nov 17 08:14:24 2004 +++ repl/security/mac/mac_sysv_sem.c Tue Dec 14 00:49:58 2004 @@ -55,13 +55,13 @@ static int mac_enforce_sysv_sem = 1; SYSCTL_INT(_security_mac, OID_AUTO, enforce_sysv_sem, CTLFLAG_RW, - &mac_enforce_sysv_sem, 0, "Enforce MAC policy on System V IPC Semaphores"); + &mac_enforce_sysv_sem, 0, "Enforce MAC policy on System V IPC Semaphores", &Giant); TUNABLE_INT("security.mac.enforce_sysv", &mac_enforce_sysv_sem); #ifdef MAC_DEBUG static unsigned int nmacipcsemas; SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, ipc_semas, CTLFLAG_RD, - &nmacipcsemas, 0, "number of sysv ipc semaphore identifiers inuse"); + &nmacipcsemas, 0, "number of sysv ipc semaphore identifiers inuse", &Giant); #endif static struct label * diff -ur /home/refugee/freebsd/current/src/sys/security/mac/mac_sysv_shm.c repl/security/mac/mac_sysv_shm.c --- /home/refugee/freebsd/current/src/sys/security/mac/mac_sysv_shm.c Wed Nov 17 08:14:24 2004 +++ repl/security/mac/mac_sysv_shm.c Tue Dec 14 00:49:58 2004 @@ -56,13 +56,13 @@ static int mac_enforce_sysv_shm = 1; SYSCTL_INT(_security_mac, OID_AUTO, enforce_sysv_shm, CTLFLAG_RW, &mac_enforce_sysv_shm, 0, - "Enforce MAC policy on System V IPC shared memory"); + "Enforce MAC policy on System V IPC shared memory", &Giant); TUNABLE_INT("security.mac.enforce_sysv", &mac_enforce_sysv_shm); #ifdef MAC_DEBUG static unsigned int nmacipcshms; SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, ipc_shms, CTLFLAG_RD, - &nmacipcshms, 0, "number of sysv ipc shm identifiers inuse"); + &nmacipcshms, 0, "number of sysv ipc shm identifiers inuse", &Giant); #endif static struct label * diff -ur /home/refugee/freebsd/current/src/sys/security/mac/mac_vfs.c repl/security/mac/mac_vfs.c --- /home/refugee/freebsd/current/src/sys/security/mac/mac_vfs.c Sun Oct 31 04:52:58 2004 +++ repl/security/mac/mac_vfs.c Tue Dec 14 00:49:58 2004 @@ -77,24 +77,24 @@ static int mac_enforce_fs = 1; SYSCTL_INT(_security_mac, OID_AUTO, enforce_fs, CTLFLAG_RW, - &mac_enforce_fs, 0, "Enforce MAC policy on file system objects"); + &mac_enforce_fs, 0, "Enforce MAC policy on file system objects", &Giant); TUNABLE_INT("security.mac.enforce_fs", &mac_enforce_fs); #ifdef MAC_DEBUG static int mac_debug_label_fallback = 0; SYSCTL_INT(_security_mac_debug, OID_AUTO, label_fallback, CTLFLAG_RW, &mac_debug_label_fallback, 0, "Filesystems should fall back to fs label" - "when label is corrupted."); + "when label is corrupted.", &Giant); TUNABLE_INT("security.mac.debug_label_fallback", &mac_debug_label_fallback); static unsigned int nmacmounts, nmacvnodes, nmacdevfsdirents; SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, mounts, CTLFLAG_RD, - &nmacmounts, 0, "number of mounts in use"); + &nmacmounts, 0, "number of mounts in use", &Giant); SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, vnodes, CTLFLAG_RD, - &nmacvnodes, 0, "number of vnodes in use"); + &nmacvnodes, 0, "number of vnodes in use", &Giant); SYSCTL_UINT(_security_mac_debug_counters, OID_AUTO, devfsdirents, CTLFLAG_RD, - &nmacdevfsdirents, 0, "number of devfs dirents inuse"); + &nmacdevfsdirents, 0, "number of devfs dirents inuse", &Giant); #endif static int mac_setlabel_vnode_extattr(struct ucred *cred, diff -ur /home/refugee/freebsd/current/src/sys/security/mac_biba/mac_biba.c repl/security/mac_biba/mac_biba.c --- /home/refugee/freebsd/current/src/sys/security/mac_biba/mac_biba.c Sun Oct 31 04:53:00 2004 +++ repl/security/mac_biba/mac_biba.c Tue Dec 14 00:49:58 2004 @@ -86,40 +86,40 @@ static int mac_biba_label_size = sizeof(struct mac_biba); SYSCTL_INT(_security_mac_biba, OID_AUTO, label_size, CTLFLAG_RD, - &mac_biba_label_size, 0, "Size of struct mac_biba"); + &mac_biba_label_size, 0, "Size of struct mac_biba", &Giant); static int mac_biba_enabled = 1; SYSCTL_INT(_security_mac_biba, OID_AUTO, enabled, CTLFLAG_RW, - &mac_biba_enabled, 0, "Enforce MAC/Biba policy"); + &mac_biba_enabled, 0, "Enforce MAC/Biba policy", &Giant); TUNABLE_INT("security.mac.biba.enabled", &mac_biba_enabled); static int destroyed_not_inited; SYSCTL_INT(_security_mac_biba, OID_AUTO, destroyed_not_inited, CTLFLAG_RD, - &destroyed_not_inited, 0, "Count of labels destroyed but not inited"); + &destroyed_not_inited, 0, "Count of labels destroyed but not inited", &Giant); static int trust_all_interfaces = 0; SYSCTL_INT(_security_mac_biba, OID_AUTO, trust_all_interfaces, CTLFLAG_RD, - &trust_all_interfaces, 0, "Consider all interfaces 'trusted' by MAC/Biba"); + &trust_all_interfaces, 0, "Consider all interfaces 'trusted' by MAC/Biba", &Giant); TUNABLE_INT("security.mac.biba.trust_all_interfaces", &trust_all_interfaces); static char trusted_interfaces[128]; SYSCTL_STRING(_security_mac_biba, OID_AUTO, trusted_interfaces, CTLFLAG_RD, - trusted_interfaces, 0, "Interfaces considered 'trusted' by MAC/Biba"); + trusted_interfaces, 0, "Interfaces considered 'trusted' by MAC/Biba", &Giant); TUNABLE_STR("security.mac.biba.trusted_interfaces", trusted_interfaces, sizeof(trusted_interfaces)); static int max_compartments = MAC_BIBA_MAX_COMPARTMENTS; SYSCTL_INT(_security_mac_biba, OID_AUTO, max_compartments, CTLFLAG_RD, - &max_compartments, 0, "Maximum supported compartments"); + &max_compartments, 0, "Maximum supported compartments", &Giant); static int ptys_equal = 0; SYSCTL_INT(_security_mac_biba, OID_AUTO, ptys_equal, CTLFLAG_RW, - &ptys_equal, 0, "Label pty devices as biba/equal on create"); + &ptys_equal, 0, "Label pty devices as biba/equal on create", &Giant); TUNABLE_INT("security.mac.biba.ptys_equal", &ptys_equal); static int revocation_enabled = 0; SYSCTL_INT(_security_mac_biba, OID_AUTO, revocation_enabled, CTLFLAG_RW, - &revocation_enabled, 0, "Revoke access to objects on relabel"); + &revocation_enabled, 0, "Revoke access to objects on relabel", &Giant); TUNABLE_INT("security.mac.biba.revocation_enabled", &revocation_enabled); static int mac_biba_slot; diff -ur /home/refugee/freebsd/current/src/sys/security/mac_bsdextended/mac_bsdextended.c repl/security/mac_bsdextended/mac_bsdextended.c --- /home/refugee/freebsd/current/src/sys/security/mac_bsdextended/mac_bsdextended.c Sun Oct 31 04:52:59 2004 +++ repl/security/mac_bsdextended/mac_bsdextended.c Tue Dec 14 00:49:58 2004 @@ -79,7 +79,7 @@ static int mac_bsdextended_enabled = 1; SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, enabled, CTLFLAG_RW, - &mac_bsdextended_enabled, 0, "Enforce extended BSD policy"); + &mac_bsdextended_enabled, 0, "Enforce extended BSD policy", &Giant); TUNABLE_INT("security.mac.bsdextended.enabled", &mac_bsdextended_enabled); MALLOC_DEFINE(M_MACBSDEXTENDED, "mac_bsdextended", "BSD Extended MAC rule"); @@ -90,9 +90,9 @@ static int rule_slots = 0; SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_count, CTLFLAG_RD, - &rule_count, 0, "Number of defined rules\n"); + &rule_count, 0, "Number of defined rules\n", &Giant); SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_slots, CTLFLAG_RD, - &rule_slots, 0, "Number of used rule slots\n"); + &rule_slots, 0, "Number of used rule slots\n", &Giant); /* * This is just used for logging purposes as eventually we would like @@ -100,7 +100,7 @@ */ static int mac_bsdextended_logging; SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, logging, CTLFLAG_RW, - &mac_bsdextended_logging, 0, "Log failed authorization requests"); + &mac_bsdextended_logging, 0, "Log failed authorization requests", &Giant); /* * This tunable is here for compatibility. It will allow the user @@ -111,7 +111,7 @@ mac_bsdextended_firstmatch_enabled; SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, firstmatch_enabled, CTLFLAG_RW, &mac_bsdextended_firstmatch_enabled, 1, - "Disable/enable match first rule functionality"); + "Disable/enable match first rule functionality", &Giant); static int mac_bsdextended_rule_valid(struct mac_bsdextended_rule *rule) diff -ur /home/refugee/freebsd/current/src/sys/security/mac_ifoff/mac_ifoff.c repl/security/mac_ifoff/mac_ifoff.c --- /home/refugee/freebsd/current/src/sys/security/mac_ifoff/mac_ifoff.c Sun Oct 31 04:52:59 2004 +++ repl/security/mac_ifoff/mac_ifoff.c Tue Dec 14 00:49:58 2004 @@ -73,23 +73,23 @@ static int mac_ifoff_enabled = 1; SYSCTL_INT(_security_mac_ifoff, OID_AUTO, enabled, CTLFLAG_RW, - &mac_ifoff_enabled, 0, "Enforce ifoff policy"); + &mac_ifoff_enabled, 0, "Enforce ifoff policy", &Giant); TUNABLE_INT("security.mac.ifoff.enabled", &mac_ifoff_enabled); static int mac_ifoff_lo_enabled = 1; SYSCTL_INT(_security_mac_ifoff, OID_AUTO, lo_enabled, CTLFLAG_RW, - &mac_ifoff_lo_enabled, 0, "Enable loopback interfaces"); + &mac_ifoff_lo_enabled, 0, "Enable loopback interfaces", &Giant); TUNABLE_INT("security.mac.ifoff.lo_enabled", &mac_ifoff_lo_enabled); static int mac_ifoff_other_enabled = 0; SYSCTL_INT(_security_mac_ifoff, OID_AUTO, other_enabled, CTLFLAG_RW, - &mac_ifoff_other_enabled, 0, "Enable other interfaces"); + &mac_ifoff_other_enabled, 0, "Enable other interfaces", &Giant); TUNABLE_INT("security.mac.ifoff.other_enabled", &mac_ifoff_other_enabled); static int mac_ifoff_bpfrecv_enabled = 0; SYSCTL_INT(_security_mac_ifoff, OID_AUTO, bpfrecv_enabled, CTLFLAG_RW, &mac_ifoff_bpfrecv_enabled, 0, "Enable BPF reception even when interface " - "is disabled"); + "is disabled", &Giant); TUNABLE_INT("security.mac.ifoff.bpfrecv.enabled", &mac_ifoff_bpfrecv_enabled); static int diff -ur /home/refugee/freebsd/current/src/sys/security/mac_lomac/mac_lomac.c repl/security/mac_lomac/mac_lomac.c --- /home/refugee/freebsd/current/src/sys/security/mac_lomac/mac_lomac.c Sun Oct 31 04:52:59 2004 +++ repl/security/mac_lomac/mac_lomac.c Tue Dec 14 00:49:58 2004 @@ -91,36 +91,36 @@ static int mac_lomac_label_size = sizeof(struct mac_lomac); SYSCTL_INT(_security_mac_lomac, OID_AUTO, label_size, CTLFLAG_RD, - &mac_lomac_label_size, 0, "Size of struct mac_lomac"); + &mac_lomac_label_size, 0, "Size of struct mac_lomac", &Giant); static int mac_lomac_enabled = 1; SYSCTL_INT(_security_mac_lomac, OID_AUTO, enabled, CTLFLAG_RW, - &mac_lomac_enabled, 0, "Enforce MAC/LOMAC policy"); + &mac_lomac_enabled, 0, "Enforce MAC/LOMAC policy", &Giant); TUNABLE_INT("security.mac.lomac.enabled", &mac_lomac_enabled); static int destroyed_not_inited; SYSCTL_INT(_security_mac_lomac, OID_AUTO, destroyed_not_inited, CTLFLAG_RD, - &destroyed_not_inited, 0, "Count of labels destroyed but not inited"); + &destroyed_not_inited, 0, "Count of labels destroyed but not inited", &Giant); static int trust_all_interfaces = 0; SYSCTL_INT(_security_mac_lomac, OID_AUTO, trust_all_interfaces, CTLFLAG_RD, - &trust_all_interfaces, 0, "Consider all interfaces 'trusted' by MAC/LOMAC"); + &trust_all_interfaces, 0, "Consider all interfaces 'trusted' by MAC/LOMAC", &Giant); TUNABLE_INT("security.mac.lomac.trust_all_interfaces", &trust_all_interfaces); static char trusted_interfaces[128]; SYSCTL_STRING(_security_mac_lomac, OID_AUTO, trusted_interfaces, CTLFLAG_RD, - trusted_interfaces, 0, "Interfaces considered 'trusted' by MAC/LOMAC"); + trusted_interfaces, 0, "Interfaces considered 'trusted' by MAC/LOMAC", &Giant); TUNABLE_STR("security.mac.lomac.trusted_interfaces", trusted_interfaces, sizeof(trusted_interfaces)); static int ptys_equal = 0; SYSCTL_INT(_security_mac_lomac, OID_AUTO, ptys_equal, CTLFLAG_RW, - &ptys_equal, 0, "Label pty devices as lomac/equal on create"); + &ptys_equal, 0, "Label pty devices as lomac/equal on create", &Giant); TUNABLE_INT("security.mac.lomac.ptys_equal", &ptys_equal); static int revocation_enabled = 1; SYSCTL_INT(_security_mac_lomac, OID_AUTO, revocation_enabled, CTLFLAG_RW, - &revocation_enabled, 0, "Revoke access to objects on relabel"); + &revocation_enabled, 0, "Revoke access to objects on relabel", &Giant); TUNABLE_INT("security.mac.lomac.revocation_enabled", &revocation_enabled); static int mac_lomac_slot; diff -ur /home/refugee/freebsd/current/src/sys/security/mac_mls/mac_mls.c repl/security/mac_mls/mac_mls.c --- /home/refugee/freebsd/current/src/sys/security/mac_mls/mac_mls.c Sun Oct 31 04:52:59 2004 +++ repl/security/mac_mls/mac_mls.c Tue Dec 14 00:49:58 2004 @@ -86,30 +86,30 @@ static int mac_mls_label_size = sizeof(struct mac_mls); SYSCTL_INT(_security_mac_mls, OID_AUTO, label_size, CTLFLAG_RD, - &mac_mls_label_size, 0, "Size of struct mac_mls"); + &mac_mls_label_size, 0, "Size of struct mac_mls", &Giant); static int mac_mls_enabled = 1; SYSCTL_INT(_security_mac_mls, OID_AUTO, enabled, CTLFLAG_RW, - &mac_mls_enabled, 0, "Enforce MAC/MLS policy"); + &mac_mls_enabled, 0, "Enforce MAC/MLS policy", &Giant); TUNABLE_INT("security.mac.mls.enabled", &mac_mls_enabled); static int destroyed_not_inited; SYSCTL_INT(_security_mac_mls, OID_AUTO, destroyed_not_inited, CTLFLAG_RD, - &destroyed_not_inited, 0, "Count of labels destroyed but not inited"); + &destroyed_not_inited, 0, "Count of labels destroyed but not inited", &Giant); static int ptys_equal = 0; SYSCTL_INT(_security_mac_mls, OID_AUTO, ptys_equal, CTLFLAG_RW, - &ptys_equal, 0, "Label pty devices as mls/equal on create"); + &ptys_equal, 0, "Label pty devices as mls/equal on create", &Giant); TUNABLE_INT("security.mac.mls.ptys_equal", &ptys_equal); static int revocation_enabled = 0; SYSCTL_INT(_security_mac_mls, OID_AUTO, revocation_enabled, CTLFLAG_RW, - &revocation_enabled, 0, "Revoke access to objects on relabel"); + &revocation_enabled, 0, "Revoke access to objects on relabel", &Giant); TUNABLE_INT("security.mac.mls.revocation_enabled", &revocation_enabled); static int max_compartments = MAC_MLS_MAX_COMPARTMENTS; SYSCTL_INT(_security_mac_mls, OID_AUTO, max_compartments, CTLFLAG_RD, - &max_compartments, 0, "Maximum compartments the policy supports"); + &max_compartments, 0, "Maximum compartments the policy supports", &Giant); static int mac_mls_slot; #define SLOT(l) ((struct mac_mls *)LABEL_TO_SLOT((l), mac_mls_slot).l_ptr) diff -ur /home/refugee/freebsd/current/src/sys/security/mac_none/mac_none.c repl/security/mac_none/mac_none.c --- /home/refugee/freebsd/current/src/sys/security/mac_none/mac_none.c Sun Oct 31 04:52:58 2004 +++ repl/security/mac_none/mac_none.c Tue Dec 14 00:49:58 2004 @@ -82,7 +82,7 @@ static int mac_none_enabled = 1; SYSCTL_INT(_security_mac_none, OID_AUTO, enabled, CTLFLAG_RW, - &mac_none_enabled, 0, "Enforce none policy"); + &mac_none_enabled, 0, "Enforce none policy", &Giant); static struct mac_policy_ops mac_none_ops = { diff -ur /home/refugee/freebsd/current/src/sys/security/mac_partition/mac_partition.c repl/security/mac_partition/mac_partition.c --- /home/refugee/freebsd/current/src/sys/security/mac_partition/mac_partition.c Sun Oct 31 04:52:59 2004 +++ repl/security/mac_partition/mac_partition.c Tue Dec 14 00:49:58 2004 @@ -76,7 +76,7 @@ static int mac_partition_enabled = 1; SYSCTL_INT(_security_mac_partition, OID_AUTO, enabled, CTLFLAG_RW, - &mac_partition_enabled, 0, "Enforce partition policy"); + &mac_partition_enabled, 0, "Enforce partition policy", &Giant); static int partition_slot; #define SLOT(l) (LABEL_TO_SLOT((l), partition_slot).l_long) diff -ur /home/refugee/freebsd/current/src/sys/security/mac_portacl/mac_portacl.c repl/security/mac_portacl/mac_portacl.c --- /home/refugee/freebsd/current/src/sys/security/mac_portacl/mac_portacl.c Wed Dec 8 20:41:16 2004 +++ repl/security/mac_portacl/mac_portacl.c Tue Dec 14 00:49:58 2004 @@ -92,25 +92,25 @@ static int mac_portacl_enabled = 1; SYSCTL_INT(_security_mac_portacl, OID_AUTO, enabled, CTLFLAG_RW, - &mac_portacl_enabled, 0, "Enforce portacl policy"); + &mac_portacl_enabled, 0, "Enforce portacl policy", &Giant); TUNABLE_INT("security.mac.portacl.enabled", &mac_portacl_enabled); static int mac_portacl_suser_exempt = 1; SYSCTL_INT(_security_mac_portacl, OID_AUTO, suser_exempt, CTLFLAG_RW, - &mac_portacl_suser_exempt, 0, "Privilege permits binding of any port"); + &mac_portacl_suser_exempt, 0, "Privilege permits binding of any port", &Giant); TUNABLE_INT("security.mac.portacl.suser_exempt", &mac_portacl_suser_exempt); static int mac_portacl_autoport_exempt = 1; SYSCTL_INT(_security_mac_portacl, OID_AUTO, autoport_exempt, CTLFLAG_RW, &mac_portacl_autoport_exempt, 0, "Allow automatic allocation through " - "binding port 0 if not IP_PORTRANGELOW"); + "binding port 0 if not IP_PORTRANGELOW", &Giant); TUNABLE_INT("security.mac.portacl.autoport_exempt", &mac_portacl_autoport_exempt); static int mac_portacl_port_high = 1023; SYSCTL_INT(_security_mac_portacl, OID_AUTO, port_high, CTLFLAG_RW, - &mac_portacl_port_high, 0, "Highest port to enforce for"); + &mac_portacl_port_high, 0, "Highest port to enforce for", &Giant); TUNABLE_INT("security.mac.portacl.port_high", &mac_portacl_port_high); MALLOC_DEFINE(M_PORTACL, "portacl rule", "Rules for mac_portacl"); @@ -353,7 +353,7 @@ } else string = rule_string; - error = sysctl_handle_string(oidp, string, MAC_RULE_STRING_LEN, req); + error = sysctl_handle_string(oidp, string, MAC_RULE_STRING_LEN, req, &Giant); if (error) goto out; @@ -380,7 +380,7 @@ } SYSCTL_PROC(_security_mac_portacl, OID_AUTO, rules, - CTLTYPE_STRING|CTLFLAG_RW, 0, 0, sysctl_rules, "A", "Rules"); + CTLTYPE_STRING|CTLFLAG_RW, 0, 0, sysctl_rules, "A", "Rules", &Giant); static int rules_check(struct ucred *cred, int family, int type, u_int16_t port) diff -ur /home/refugee/freebsd/current/src/sys/security/mac_seeotheruids/mac_seeotheruids.c repl/security/mac_seeotheruids/mac_seeotheruids.c --- /home/refugee/freebsd/current/src/sys/security/mac_seeotheruids/mac_seeotheruids.c Sun Oct 31 04:52:59 2004 +++ repl/security/mac_seeotheruids/mac_seeotheruids.c Tue Dec 14 00:49:58 2004 @@ -72,7 +72,7 @@ static int mac_seeotheruids_enabled = 1; SYSCTL_INT(_security_mac_seeotheruids, OID_AUTO, enabled, CTLFLAG_RW, - &mac_seeotheruids_enabled, 0, "Enforce seeotheruids policy"); + &mac_seeotheruids_enabled, 0, "Enforce seeotheruids policy", &Giant); /* * Exception: allow credentials to be aware of other credentials with the @@ -81,7 +81,7 @@ static int primarygroup_enabled = 0; SYSCTL_INT(_security_mac_seeotheruids, OID_AUTO, primarygroup_enabled, CTLFLAG_RW, &primarygroup_enabled, 0, "Make an exception for credentials " - "with the same real primary group id"); + "with the same real primary group id", &Giant); /* * Exception: allow processes with a specific gid to be exempt from the @@ -91,11 +91,11 @@ static int specificgid_enabled = 0; SYSCTL_INT(_security_mac_seeotheruids, OID_AUTO, specificgid_enabled, CTLFLAG_RW, &specificgid_enabled, 0, "Make an exception for credentials " - "with a specific gid as their real primary group id or group set"); + "with a specific gid as their real primary group id or group set", &Giant); static gid_t specificgid = 0; SYSCTL_INT(_security_mac_seeotheruids, OID_AUTO, specificgid, CTLFLAG_RW, - &specificgid, 0, "Specific gid to be exempt from seeotheruids policy"); + &specificgid, 0, "Specific gid to be exempt from seeotheruids policy", &Giant); static int mac_seeotheruids_check(struct ucred *u1, struct ucred *u2) diff -ur /home/refugee/freebsd/current/src/sys/security/mac_stub/mac_stub.c repl/security/mac_stub/mac_stub.c --- /home/refugee/freebsd/current/src/sys/security/mac_stub/mac_stub.c Sun Oct 31 04:53:00 2004 +++ repl/security/mac_stub/mac_stub.c Tue Dec 14 00:49:58 2004 @@ -82,7 +82,7 @@ static int stub_enabled = 1; SYSCTL_INT(_security_mac_stub, OID_AUTO, enabled, CTLFLAG_RW, - &stub_enabled, 0, "Enforce mac_stub policy"); + &stub_enabled, 0, "Enforce mac_stub policy", &Giant); /* * Policy module operations. @@ -761,7 +761,7 @@ void *arg1, int arg2, struct sysctl_req *req) { - return (0); + return (0, &Giant); } static int diff -ur /home/refugee/freebsd/current/src/sys/security/mac_test/mac_test.c repl/security/mac_test/mac_test.c --- /home/refugee/freebsd/current/src/sys/security/mac_test/mac_test.c Sun Oct 31 04:52:58 2004 +++ repl/security/mac_test/mac_test.c Tue Dec 14 00:49:58 2004 @@ -77,7 +77,7 @@ static int mac_test_enabled = 1; SYSCTL_INT(_security_mac_test, OID_AUTO, enabled, CTLFLAG_RW, - &mac_test_enabled, 0, "Enforce test policy"); + &mac_test_enabled, 0, "Enforce test policy", &Giant); #define BPFMAGIC 0xfe1ad1b6 #define DEVFSMAGIC 0x9ee79c32 @@ -123,103 +123,103 @@ static int test_slot; SYSCTL_INT(_security_mac_test, OID_AUTO, slot, CTLFLAG_RD, - &test_slot, 0, "Slot allocated by framework"); + &test_slot, 0, "Slot allocated by framework", &Giant); static int init_count_bpfdesc; SYSCTL_INT(_security_mac_test, OID_AUTO, init_count_bpfdesc, CTLFLAG_RD, - &init_count_bpfdesc, 0, "bpfdesc init calls"); + &init_count_bpfdesc, 0, "bpfdesc init calls", &Giant); static int init_count_cred; SYSCTL_INT(_security_mac_test, OID_AUTO, init_count_cred, CTLFLAG_RD, - &init_count_cred, 0, "cred init calls"); + &init_count_cred, 0, "cred init calls", &Giant); static int init_count_devfsdirent; SYSCTL_INT(_security_mac_test, OID_AUTO, init_count_devfsdirent, CTLFLAG_RD, - &init_count_devfsdirent, 0, "devfsdirent init calls"); + &init_count_devfsdirent, 0, "devfsdirent init calls", &Giant); static int init_count_ifnet; SYSCTL_INT(_security_mac_test, OID_AUTO, init_count_ifnet, CTLFLAG_RD, - &init_count_ifnet, 0, "ifnet init calls"); + &init_count_ifnet, 0, "ifnet init calls", &Giant); static int init_count_inpcb; SYSCTL_INT(_security_mac_test, OID_AUTO, init_count_inpcb, CTLFLAG_RD, - &init_count_inpcb, 0, "inpcb init calls"); + &init_count_inpcb, 0, "inpcb init calls", &Giant); static int init_count_ipq; SYSCTL_INT(_security_mac_test, OID_AUTO, init_count_ipq, CTLFLAG_RD, - &init_count_ipq, 0, "ipq init calls"); + &init_count_ipq, 0, "ipq init calls", &Giant); static int init_count_mbuf; SYSCTL_INT(_security_mac_test, OID_AUTO, init_count_mbuf, CTLFLAG_RD, - &init_count_mbuf, 0, "mbuf init calls"); + &init_count_mbuf, 0, "mbuf init calls", &Giant); static int init_count_mount; SYSCTL_INT(_security_mac_test, OID_AUTO, init_count_mount, CTLFLAG_RD, - &init_count_mount, 0, "mount init calls"); + &init_count_mount, 0, "mount init calls", &Giant); static int init_count_mount_fslabel; SYSCTL_INT(_security_mac_test, OID_AUTO, init_count_mount_fslabel, CTLFLAG_RD, - &init_count_mount_fslabel, 0, "mount_fslabel init calls"); + &init_count_mount_fslabel, 0, "mount_fslabel init calls", &Giant); static int init_count_socket; SYSCTL_INT(_security_mac_test, OID_AUTO, init_count_socket, CTLFLAG_RD, - &init_count_socket, 0, "socket init calls"); + &init_count_socket, 0, "socket init calls", &Giant); static int init_count_socket_peerlabel; SYSCTL_INT(_security_mac_test, OID_AUTO, init_count_socket_peerlabel, CTLFLAG_RD, &init_count_socket_peerlabel, 0, - "socket_peerlabel init calls"); + "socket_peerlabel init calls", &Giant); static int init_count_pipe; SYSCTL_INT(_security_mac_test, OID_AUTO, init_count_pipe, CTLFLAG_RD, - &init_count_pipe, 0, "pipe init calls"); + &init_count_pipe, 0, "pipe init calls", &Giant); static int init_count_proc; SYSCTL_INT(_security_mac_test, OID_AUTO, init_count_proc, CTLFLAG_RD, - &init_count_proc, 0, "proc init calls"); + &init_count_proc, 0, "proc init calls", &Giant); static int init_count_vnode; SYSCTL_INT(_security_mac_test, OID_AUTO, init_count_vnode, CTLFLAG_RD, - &init_count_vnode, 0, "vnode init calls"); + &init_count_vnode, 0, "vnode init calls", &Giant); static int destroy_count_bpfdesc; SYSCTL_INT(_security_mac_test, OID_AUTO, destroy_count_bpfdesc, CTLFLAG_RD, - &destroy_count_bpfdesc, 0, "bpfdesc destroy calls"); + &destroy_count_bpfdesc, 0, "bpfdesc destroy calls", &Giant); static int destroy_count_cred; SYSCTL_INT(_security_mac_test, OID_AUTO, destroy_count_cred, CTLFLAG_RD, - &destroy_count_cred, 0, "cred destroy calls"); + &destroy_count_cred, 0, "cred destroy calls", &Giant); static int destroy_count_devfsdirent; SYSCTL_INT(_security_mac_test, OID_AUTO, destroy_count_devfsdirent, CTLFLAG_RD, - &destroy_count_devfsdirent, 0, "devfsdirent destroy calls"); + &destroy_count_devfsdirent, 0, "devfsdirent destroy calls", &Giant); static int destroy_count_ifnet; SYSCTL_INT(_security_mac_test, OID_AUTO, destroy_count_ifnet, CTLFLAG_RD, - &destroy_count_ifnet, 0, "ifnet destroy calls"); + &destroy_count_ifnet, 0, "ifnet destroy calls", &Giant); static int destroy_count_inpcb; SYSCTL_INT(_security_mac_test, OID_AUTO, destroy_count_inpcb, CTLFLAG_RD, - &destroy_count_inpcb, 0, "inpcb destroy calls"); + &destroy_count_inpcb, 0, "inpcb destroy calls", &Giant); static int destroy_count_ipq; SYSCTL_INT(_security_mac_test, OID_AUTO, destroy_count_ipq, CTLFLAG_RD, - &destroy_count_ipq, 0, "ipq destroy calls"); + &destroy_count_ipq, 0, "ipq destroy calls", &Giant); static int destroy_count_mbuf; SYSCTL_INT(_security_mac_test, OID_AUTO, destroy_count_mbuf, CTLFLAG_RD, - &destroy_count_mbuf, 0, "mbuf destroy calls"); + &destroy_count_mbuf, 0, "mbuf destroy calls", &Giant); static int destroy_count_mount; SYSCTL_INT(_security_mac_test, OID_AUTO, destroy_count_mount, CTLFLAG_RD, - &destroy_count_mount, 0, "mount destroy calls"); + &destroy_count_mount, 0, "mount destroy calls", &Giant); static int destroy_count_mount_fslabel; SYSCTL_INT(_security_mac_test, OID_AUTO, destroy_count_mount_fslabel, CTLFLAG_RD, &destroy_count_mount_fslabel, 0, - "mount_fslabel destroy calls"); + "mount_fslabel destroy calls", &Giant); static int destroy_count_socket; SYSCTL_INT(_security_mac_test, OID_AUTO, destroy_count_socket, CTLFLAG_RD, - &destroy_count_socket, 0, "socket destroy calls"); + &destroy_count_socket, 0, "socket destroy calls", &Giant); static int destroy_count_socket_peerlabel; SYSCTL_INT(_security_mac_test, OID_AUTO, destroy_count_socket_peerlabel, CTLFLAG_RD, &destroy_count_socket_peerlabel, 0, - "socket_peerlabel destroy calls"); + "socket_peerlabel destroy calls", &Giant); static int destroy_count_pipe; SYSCTL_INT(_security_mac_test, OID_AUTO, destroy_count_pipe, CTLFLAG_RD, - &destroy_count_pipe, 0, "pipe destroy calls"); + &destroy_count_pipe, 0, "pipe destroy calls", &Giant); static int destroy_count_proc; SYSCTL_INT(_security_mac_test, OID_AUTO, destroy_count_proc, CTLFLAG_RD, - &destroy_count_proc, 0, "proc destroy calls"); + &destroy_count_proc, 0, "proc destroy calls", &Giant); static int destroy_count_vnode; SYSCTL_INT(_security_mac_test, OID_AUTO, destroy_count_vnode, CTLFLAG_RD, - &destroy_count_vnode, 0, "vnode destroy calls"); + &destroy_count_vnode, 0, "vnode destroy calls", &Giant); static int externalize_count; SYSCTL_INT(_security_mac_test, OID_AUTO, externalize_count, CTLFLAG_RD, - &externalize_count, 0, "Subject/object externalize calls"); + &externalize_count, 0, "Subject/object externalize calls", &Giant); static int internalize_count; SYSCTL_INT(_security_mac_test, OID_AUTO, internalize_count, CTLFLAG_RD, - &internalize_count, 0, "Subject/object internalize calls"); + &internalize_count, 0, "Subject/object internalize calls", &Giant); #ifdef KDB #define DEBUGGER(x) kdb_enter(x) @@ -1490,7 +1490,7 @@ void *arg1, int arg2, struct sysctl_req *req) { - ASSERT_CRED_LABEL(cred->cr_label); + ASSERT_CRED_LABEL(cred->cr_label, &Giant); return (0); } diff -ur /home/refugee/freebsd/current/src/sys/sparc64/sparc64/identcpu.c repl/sparc64/sparc64/identcpu.c --- /home/refugee/freebsd/current/src/sys/sparc64/sparc64/identcpu.c Sun Oct 31 04:50:11 2004 +++ repl/sparc64/sparc64/identcpu.c Tue Dec 14 00:49:38 2004 @@ -19,11 +19,11 @@ char machine[] = "sparc64"; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, - machine, 0, "Machine class"); + machine, 0, "Machine class", &Giant); static char cpu_model[128]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, - cpu_model, 0, "Machine model"); + cpu_model, 0, "Machine model", &Giant); int cpu_impl; diff -ur /home/refugee/freebsd/current/src/sys/sparc64/sparc64/pmap.c repl/sparc64/sparc64/pmap.c --- /home/refugee/freebsd/current/src/sys/sparc64/sparc64/pmap.c Sun Nov 14 03:56:48 2004 +++ repl/sparc64/sparc64/pmap.c Tue Dec 14 00:49:38 2004 @@ -170,7 +170,7 @@ */ #define PMAP_TSB_THRESH ((TSB_SIZE / 2) * PAGE_SIZE) -SYSCTL_NODE(_debug, OID_AUTO, pmap_stats, CTLFLAG_RD, 0, ""); +SYSCTL_NODE(_debug, OID_AUTO, pmap_stats, CTLFLAG_RD, 0, "", NULL); PMAP_STATS_VAR(pmap_nenter); PMAP_STATS_VAR(pmap_nenter_update); diff -ur /home/refugee/freebsd/current/src/sys/sparc64/sparc64/trap.c repl/sparc64/sparc64/trap.c --- /home/refugee/freebsd/current/src/sys/sparc64/sparc64/trap.c Wed Dec 8 20:41:16 2004 +++ repl/sparc64/sparc64/trap.c Tue Dec 14 00:49:38 2004 @@ -223,7 +223,7 @@ int debugger_on_signal = 0; SYSCTL_INT(_debug, OID_AUTO, debugger_on_signal, CTLFLAG_RW, - &debugger_on_signal, 0, ""); + &debugger_on_signal, 0, "", &Giant); void trap(struct trapframe *tf) diff -ur /home/refugee/freebsd/current/src/sys/ufs/ffs/ffs_alloc.c repl/ufs/ffs/ffs_alloc.c --- /home/refugee/freebsd/current/src/sys/ufs/ffs/ffs_alloc.c Sun Oct 31 05:10:01 2004 +++ repl/ufs/ffs/ffs_alloc.c Tue Dec 14 00:49:40 2004 @@ -392,13 +392,13 @@ * allocation will be used. */ -SYSCTL_NODE(_vfs, OID_AUTO, ffs, CTLFLAG_RW, 0, "FFS filesystem"); +SYSCTL_NODE(_vfs, OID_AUTO, ffs, CTLFLAG_RW, 0, "FFS filesystem", NULL); static int doasyncfree = 1; -SYSCTL_INT(_vfs_ffs, OID_AUTO, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, ""); +SYSCTL_INT(_vfs_ffs, OID_AUTO, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, "", &Giant); static int doreallocblks = 1; -SYSCTL_INT(_vfs_ffs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, ""); +SYSCTL_INT(_vfs_ffs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, "", &Giant); #ifdef DEBUG static volatile int prtrealloc = 0; @@ -2197,10 +2197,10 @@ * flags set (second parameter +1) or cleared (second parameter -1). */ -static int sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS); +static int sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS, &Giant); SYSCTL_PROC(_vfs_ffs, FFS_ADJ_REFCNT, adjrefcnt, CTLFLAG_WR|CTLTYPE_STRUCT, - 0, 0, sysctl_ffs_fsck, "S,fsck", "Adjust Inode Reference Count"); + 0, 0, sysctl_ffs_fsck, "S,fsck", "Adjust Inode Reference Count", &Giant); SYSCTL_NODE(_vfs_ffs, FFS_ADJ_BLKCNT, adjblkcnt, CTLFLAG_WR, sysctl_ffs_fsck, "Adjust Inode Used Blocks Count"); @@ -2219,7 +2219,7 @@ #ifdef DEBUG static int fsckcmds = 0; -SYSCTL_INT(_debug, OID_AUTO, fsckcmds, CTLFLAG_RW, &fsckcmds, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, fsckcmds, CTLFLAG_RW, &fsckcmds, 0, "", &Giant); #endif /* DEBUG */ static int diff -ur /home/refugee/freebsd/current/src/sys/ufs/ffs/ffs_rawread.c repl/ufs/ffs/ffs_rawread.c --- /home/refugee/freebsd/current/src/sys/ufs/ffs/ffs_rawread.c Sun Oct 31 05:10:01 2004 +++ repl/ufs/ffs/ffs_rawread.c Tue Dec 14 00:49:40 2004 @@ -78,15 +78,15 @@ static int ffsrawbufcnt = 4; SYSCTL_INT(_vfs_ffs, OID_AUTO, ffsrawbufcnt, CTLFLAG_RD, &ffsrawbufcnt, 0, - "Buffers available for raw reads"); + "Buffers available for raw reads", &Giant); static int allowrawread = 1; SYSCTL_INT(_vfs_ffs, OID_AUTO, allowrawread, CTLFLAG_RW, &allowrawread, 0, - "Flag to enable raw reads"); + "Flag to enable raw reads", &Giant); static int rawreadahead = 1; SYSCTL_INT(_vfs_ffs, OID_AUTO, rawreadahead, CTLFLAG_RW, &rawreadahead, 0, - "Flag to enable readahead for long raw reads"); + "Flag to enable readahead for long raw reads", &Giant); void diff -ur /home/refugee/freebsd/current/src/sys/ufs/ffs/ffs_snapshot.c repl/ufs/ffs/ffs_snapshot.c --- /home/refugee/freebsd/current/src/sys/ufs/ffs/ffs_snapshot.c Wed Dec 8 20:41:18 2004 +++ repl/ufs/ffs/ffs_snapshot.c Tue Dec 14 00:49:40 2004 @@ -115,12 +115,12 @@ #ifdef DEBUG #include -SYSCTL_INT(_debug, OID_AUTO, dopersistence, CTLFLAG_RW, &dopersistence, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, dopersistence, CTLFLAG_RW, &dopersistence, 0, "", &Giant); static int snapdebug = 0; -SYSCTL_INT(_debug, OID_AUTO, snapdebug, CTLFLAG_RW, &snapdebug, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, snapdebug, CTLFLAG_RW, &snapdebug, 0, "", &Giant); int collectsnapstats = 0; SYSCTL_INT(_debug, OID_AUTO, collectsnapstats, CTLFLAG_RW, &collectsnapstats, - 0, ""); + 0, "", &Giant); #endif /* DEBUG */ /* diff -ur /home/refugee/freebsd/current/src/sys/ufs/ffs/ffs_softdep.c repl/ufs/ffs/ffs_softdep.c --- /home/refugee/freebsd/current/src/sys/ufs/ffs/ffs_softdep.c Sun Oct 31 05:10:01 2004 +++ repl/ufs/ffs/ffs_softdep.c Tue Dec 14 00:49:40 2004 @@ -527,19 +527,19 @@ #ifdef DEBUG #include #include -SYSCTL_INT(_debug, OID_AUTO, max_softdeps, CTLFLAG_RW, &max_softdeps, 0, ""); -SYSCTL_INT(_debug, OID_AUTO, tickdelay, CTLFLAG_RW, &tickdelay, 0, ""); -SYSCTL_INT(_debug, OID_AUTO, maxindirdeps, CTLFLAG_RW, &maxindirdeps, 0, ""); -SYSCTL_INT(_debug, OID_AUTO, worklist_push, CTLFLAG_RW, &stat_worklist_push, 0,""); -SYSCTL_INT(_debug, OID_AUTO, blk_limit_push, CTLFLAG_RW, &stat_blk_limit_push, 0,""); -SYSCTL_INT(_debug, OID_AUTO, ino_limit_push, CTLFLAG_RW, &stat_ino_limit_push, 0,""); -SYSCTL_INT(_debug, OID_AUTO, blk_limit_hit, CTLFLAG_RW, &stat_blk_limit_hit, 0, ""); -SYSCTL_INT(_debug, OID_AUTO, ino_limit_hit, CTLFLAG_RW, &stat_ino_limit_hit, 0, ""); -SYSCTL_INT(_debug, OID_AUTO, sync_limit_hit, CTLFLAG_RW, &stat_sync_limit_hit, 0, ""); -SYSCTL_INT(_debug, OID_AUTO, indir_blk_ptrs, CTLFLAG_RW, &stat_indir_blk_ptrs, 0, ""); -SYSCTL_INT(_debug, OID_AUTO, inode_bitmap, CTLFLAG_RW, &stat_inode_bitmap, 0, ""); -SYSCTL_INT(_debug, OID_AUTO, direct_blk_ptrs, CTLFLAG_RW, &stat_direct_blk_ptrs, 0, ""); -SYSCTL_INT(_debug, OID_AUTO, dir_entry, CTLFLAG_RW, &stat_dir_entry, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, max_softdeps, CTLFLAG_RW, &max_softdeps, 0, "", &Giant); +SYSCTL_INT(_debug, OID_AUTO, tickdelay, CTLFLAG_RW, &tickdelay, 0, "", &Giant); +SYSCTL_INT(_debug, OID_AUTO, maxindirdeps, CTLFLAG_RW, &maxindirdeps, 0, "", &Giant); +SYSCTL_INT(_debug, OID_AUTO, worklist_push, CTLFLAG_RW, &stat_worklist_push, 0,"", &Giant); +SYSCTL_INT(_debug, OID_AUTO, blk_limit_push, CTLFLAG_RW, &stat_blk_limit_push, 0,"", &Giant); +SYSCTL_INT(_debug, OID_AUTO, ino_limit_push, CTLFLAG_RW, &stat_ino_limit_push, 0,"", &Giant); +SYSCTL_INT(_debug, OID_AUTO, blk_limit_hit, CTLFLAG_RW, &stat_blk_limit_hit, 0, "", &Giant); +SYSCTL_INT(_debug, OID_AUTO, ino_limit_hit, CTLFLAG_RW, &stat_ino_limit_hit, 0, "", &Giant); +SYSCTL_INT(_debug, OID_AUTO, sync_limit_hit, CTLFLAG_RW, &stat_sync_limit_hit, 0, "", &Giant); +SYSCTL_INT(_debug, OID_AUTO, indir_blk_ptrs, CTLFLAG_RW, &stat_indir_blk_ptrs, 0, "", &Giant); +SYSCTL_INT(_debug, OID_AUTO, inode_bitmap, CTLFLAG_RW, &stat_inode_bitmap, 0, "", &Giant); +SYSCTL_INT(_debug, OID_AUTO, direct_blk_ptrs, CTLFLAG_RW, &stat_direct_blk_ptrs, 0, "", &Giant); +SYSCTL_INT(_debug, OID_AUTO, dir_entry, CTLFLAG_RW, &stat_dir_entry, 0, "", &Giant); #endif /* DEBUG */ /* diff -ur /home/refugee/freebsd/current/src/sys/ufs/ffs/ffs_vfsops.c repl/ufs/ffs/ffs_vfsops.c --- /home/refugee/freebsd/current/src/sys/ufs/ffs/ffs_vfsops.c Wed Dec 8 20:41:18 2004 +++ repl/ufs/ffs/ffs_vfsops.c Tue Dec 14 00:49:40 2004 @@ -795,7 +795,7 @@ #include int bigcgs = 0; -SYSCTL_INT(_debug, OID_AUTO, bigcgs, CTLFLAG_RW, &bigcgs, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, bigcgs, CTLFLAG_RW, &bigcgs, 0, "", &Giant); /* * Sanity checks for loading old filesystem superblocks. diff -ur /home/refugee/freebsd/current/src/sys/ufs/ufs/ufs_dirhash.c repl/ufs/ufs/ufs_dirhash.c --- /home/refugee/freebsd/current/src/sys/ufs/ufs/ufs_dirhash.c Sun Oct 31 04:50:20 2004 +++ repl/ufs/ufs/ufs_dirhash.c Tue Dec 14 00:49:40 2004 @@ -64,21 +64,21 @@ static MALLOC_DEFINE(M_DIRHASH, "UFS dirhash", "UFS directory hash tables"); -SYSCTL_NODE(_vfs, OID_AUTO, ufs, CTLFLAG_RD, 0, "UFS filesystem"); +SYSCTL_NODE(_vfs, OID_AUTO, ufs, CTLFLAG_RD, 0, "UFS filesystem", NULL); static int ufs_mindirhashsize = DIRBLKSIZ * 5; SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_minsize, CTLFLAG_RW, &ufs_mindirhashsize, - 0, "minimum directory size in bytes for which to use hashed lookup"); + 0, "minimum directory size in bytes for which to use hashed lookup", &Giant); static int ufs_dirhashmaxmem = 2 * 1024 * 1024; SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_maxmem, CTLFLAG_RW, &ufs_dirhashmaxmem, - 0, "maximum allowed dirhash memory usage"); + 0, "maximum allowed dirhash memory usage", &Giant); static int ufs_dirhashmem; SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_mem, CTLFLAG_RD, &ufs_dirhashmem, - 0, "current dirhash memory usage"); + 0, "current dirhash memory usage", &Giant); static int ufs_dirhashcheck = 0; SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_docheck, CTLFLAG_RW, &ufs_dirhashcheck, - 0, "enable extra sanity tests"); + 0, "enable extra sanity tests", &Giant); static int ufsdirhash_hash(struct dirhash *dh, char *name, int namelen); diff -ur /home/refugee/freebsd/current/src/sys/ufs/ufs/ufs_extattr.c repl/ufs/ufs/ufs_extattr.c --- /home/refugee/freebsd/current/src/sys/ufs/ufs/ufs_extattr.c Sun Oct 31 04:50:20 2004 +++ repl/ufs/ufs/ufs_extattr.c Tue Dec 14 00:49:40 2004 @@ -71,7 +71,7 @@ static int ufs_extattr_sync = 0; SYSCTL_INT(_debug, OID_AUTO, ufs_extattr_sync, CTLFLAG_RW, &ufs_extattr_sync, - 0, ""); + 0, "", &Giant); static int ufs_extattr_valid_attrname(int attrnamespace, const char *attrname); diff -ur /home/refugee/freebsd/current/src/sys/ufs/ufs/ufs_lookup.c repl/ufs/ufs/ufs_lookup.c --- /home/refugee/freebsd/current/src/sys/ufs/ufs/ufs_lookup.c Sun Oct 31 04:50:20 2004 +++ repl/ufs/ufs/ufs_lookup.c Tue Dec 14 00:49:40 2004 @@ -71,7 +71,7 @@ static int dirchk = 0; #endif -SYSCTL_INT(_debug, OID_AUTO, dircheck, CTLFLAG_RW, &dirchk, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, dircheck, CTLFLAG_RW, &dirchk, 0, "", &Giant); /* true if old FS format...*/ #define OFSFMT(vp) ((vp)->v_mount->mnt_maxsymlinklen <= 0) diff -ur /home/refugee/freebsd/current/src/sys/ufs/ufs/ufs_quota.c repl/ufs/ufs/ufs_quota.c --- /home/refugee/freebsd/current/src/sys/ufs/ufs/ufs_quota.c Sun Oct 31 04:50:20 2004 +++ repl/ufs/ufs/ufs_quota.c Tue Dec 14 00:49:40 2004 @@ -60,7 +60,7 @@ static int unprivileged_get_quota = 0; SYSCTL_INT(_security_bsd, OID_AUTO, unprivileged_get_quota, CTLFLAG_RW, &unprivileged_get_quota, 0, - "Unprivileged processes may retrieve quotas for other uids and gids"); + "Unprivileged processes may retrieve quotas for other uids and gids", &Giant); static MALLOC_DEFINE(M_DQUOT, "UFS quota", "UFS quota entries"); diff -ur /home/refugee/freebsd/current/src/sys/vm/swap_pager.c repl/vm/swap_pager.c --- /home/refugee/freebsd/current/src/sys/vm/swap_pager.c Sun Nov 21 00:04:21 2004 +++ repl/vm/swap_pager.c Tue Dec 14 00:49:52 2004 @@ -204,7 +204,7 @@ SYSCTL_INT(_vm, OID_AUTO, swap_async_max, - CTLFLAG_RW, &swap_async_max, 0, "Maximum running async swap ops"); + CTLFLAG_RW, &swap_async_max, 0, "Maximum running async swap ops", &Giant); /* * "named" and "unnamed" anon region objects. Try to reduce the overhead @@ -260,7 +260,7 @@ static int nswap_hiwat = 512; /* in pages, swap_pager_almost_full warn */ SYSCTL_INT(_vm, OID_AUTO, dmmax, - CTLFLAG_RD, &dmmax, 0, "Maximum size of a swap block"); + CTLFLAG_RD, &dmmax, 0, "Maximum size of a swap block", &Giant); static void swp_sizecheck(void); static void swp_pager_async_iodone(struct buf *bp); @@ -2282,7 +2282,7 @@ } SYSCTL_INT(_vm, OID_AUTO, nswapdev, CTLFLAG_RD, &nswapdev, 0, - "Number of swap devices"); + "Number of swap devices", &Giant); SYSCTL_NODE(_vm, OID_AUTO, swap_info, CTLFLAG_RD, sysctl_vm_swap_info, "Swap statistics by device"); diff -ur /home/refugee/freebsd/current/src/sys/vm/uma_core.c repl/vm/uma_core.c --- /home/refugee/freebsd/current/src/sys/vm/uma_core.c Sun Nov 14 03:56:48 2004 +++ repl/vm/uma_core.c Tue Dec 14 00:49:53 2004 @@ -233,19 +233,19 @@ void uma_print_zone(uma_zone_t); void uma_print_stats(void); -static int sysctl_vm_zone(SYSCTL_HANDLER_ARGS); +static int sysctl_vm_zone(SYSCTL_HANDLER_ARGS, &Giant); #ifdef WITNESS static int nosleepwithlocks = 1; SYSCTL_INT(_debug, OID_AUTO, nosleepwithlocks, CTLFLAG_RW, &nosleepwithlocks, - 0, "Convert M_WAITOK to M_NOWAIT to avoid lock-held-across-sleep paths"); + 0, "Convert M_WAITOK to M_NOWAIT to avoid lock-held-across-sleep paths", &Giant); #else static int nosleepwithlocks = 0; SYSCTL_INT(_debug, OID_AUTO, nosleepwithlocks, CTLFLAG_RW, &nosleepwithlocks, - 0, "Convert M_WAITOK to M_NOWAIT to avoid lock-held-across-sleep paths"); + 0, "Convert M_WAITOK to M_NOWAIT to avoid lock-held-across-sleep paths", &Giant); #endif SYSCTL_OID(_vm, OID_AUTO, zone, CTLTYPE_STRING|CTLFLAG_RD, - NULL, 0, sysctl_vm_zone, "A", "Zone Info"); + NULL, 0, sysctl_vm_zone, "A", "Zone Info", &Giant); SYSINIT(uma_startup3, SI_SUB_VM_CONF, SI_ORDER_SECOND, uma_startup3, NULL); /* diff -ur /home/refugee/freebsd/current/src/sys/vm/vm_contig.c repl/vm/vm_contig.c --- /home/refugee/freebsd/current/src/sys/vm/vm_contig.c Wed Dec 8 20:41:18 2004 +++ repl/vm/vm_contig.c Tue Dec 14 00:49:52 2004 @@ -529,7 +529,7 @@ static int vm_old_contigmalloc = 0; SYSCTL_INT(_vm, OID_AUTO, old_contigmalloc, - CTLFLAG_RW, &vm_old_contigmalloc, 0, "Use the old contigmalloc algorithm"); + CTLFLAG_RW, &vm_old_contigmalloc, 0, "Use the old contigmalloc algorithm", &Giant); TUNABLE_INT("vm.old_contigmalloc", &vm_old_contigmalloc); void * diff -ur /home/refugee/freebsd/current/src/sys/vm/vm_glue.c repl/vm/vm_glue.c --- /home/refugee/freebsd/current/src/sys/vm/vm_glue.c Wed Dec 8 20:41:18 2004 +++ repl/vm/vm_glue.c Tue Dec 14 00:49:52 2004 @@ -675,7 +675,7 @@ */ static int swap_idle_threshold1 = 2; SYSCTL_INT(_vm, OID_AUTO, swap_idle_threshold1, CTLFLAG_RW, - &swap_idle_threshold1, 0, "Guaranteed swapped in time for a process"); + &swap_idle_threshold1, 0, "Guaranteed swapped in time for a process", &Giant); /* * Swap_idle_threshold2 is the time that a process can be idle before @@ -683,7 +683,7 @@ */ static int swap_idle_threshold2 = 10; SYSCTL_INT(_vm, OID_AUTO, swap_idle_threshold2, CTLFLAG_RW, - &swap_idle_threshold2, 0, "Time before a process will be swapped out"); + &swap_idle_threshold2, 0, "Time before a process will be swapped out", &Giant); /* * Swapout is driven by the pageout daemon. Very simple, we find eligible diff -ur /home/refugee/freebsd/current/src/sys/vm/vm_meter.c repl/vm/vm_meter.c --- /home/refugee/freebsd/current/src/sys/vm/vm_meter.c Sun Oct 31 04:52:25 2004 +++ repl/vm/vm_meter.c Tue Dec 14 00:49:52 2004 @@ -62,28 +62,28 @@ #endif TUNABLE_INT("debug.mpsafevm", &debug_mpsafevm); SYSCTL_INT(_debug, OID_AUTO, mpsafevm, CTLFLAG_RD, &debug_mpsafevm, 0, - "Enable/disable MPSAFE virtual memory support"); + "Enable/disable MPSAFE virtual memory support", &Giant); struct vmmeter cnt; int maxslp = MAXSLP; SYSCTL_UINT(_vm, VM_V_FREE_MIN, v_free_min, - CTLFLAG_RW, &cnt.v_free_min, 0, ""); + CTLFLAG_RW, &cnt.v_free_min, 0, "", &Giant); SYSCTL_UINT(_vm, VM_V_FREE_TARGET, v_free_target, - CTLFLAG_RW, &cnt.v_free_target, 0, ""); + CTLFLAG_RW, &cnt.v_free_target, 0, "", &Giant); SYSCTL_UINT(_vm, VM_V_FREE_RESERVED, v_free_reserved, - CTLFLAG_RW, &cnt.v_free_reserved, 0, ""); + CTLFLAG_RW, &cnt.v_free_reserved, 0, "", &Giant); SYSCTL_UINT(_vm, VM_V_INACTIVE_TARGET, v_inactive_target, - CTLFLAG_RW, &cnt.v_inactive_target, 0, ""); + CTLFLAG_RW, &cnt.v_inactive_target, 0, "", &Giant); SYSCTL_UINT(_vm, VM_V_CACHE_MIN, v_cache_min, - CTLFLAG_RW, &cnt.v_cache_min, 0, ""); + CTLFLAG_RW, &cnt.v_cache_min, 0, "", &Giant); SYSCTL_UINT(_vm, VM_V_CACHE_MAX, v_cache_max, - CTLFLAG_RW, &cnt.v_cache_max, 0, ""); + CTLFLAG_RW, &cnt.v_cache_max, 0, "", &Giant); SYSCTL_UINT(_vm, VM_V_PAGEOUT_FREE_MIN, v_pageout_free_min, - CTLFLAG_RW, &cnt.v_pageout_free_min, 0, ""); + CTLFLAG_RW, &cnt.v_pageout_free_min, 0, "", &Giant); SYSCTL_UINT(_vm, OID_AUTO, v_free_severe, - CTLFLAG_RW, &cnt.v_free_severe, 0, ""); + CTLFLAG_RW, &cnt.v_free_severe, 0, "", &Giant); static int sysctl_vm_loadavg(SYSCTL_HANDLER_ARGS) @@ -102,7 +102,7 @@ return SYSCTL_OUT(req, &averunnable, sizeof(averunnable)); } SYSCTL_PROC(_vm, VM_LOADAVG, loadavg, CTLTYPE_STRUCT|CTLFLAG_RD, - NULL, 0, sysctl_vm_loadavg, "S,loadavg", "Machine loadaverage history"); + NULL, 0, sysctl_vm_loadavg, "S,loadavg", "Machine loadaverage history", &Giant); static int vmtotal(SYSCTL_HANDLER_ARGS) @@ -118,10 +118,12 @@ totalp = &total; bzero(totalp, sizeof *totalp); + + mtx_lock(&Giant); + /* * Mark all objects as inactive. */ - GIANT_REQUIRED; mtx_lock(&vm_object_list_mtx); TAILQ_FOREACH(object, &vm_object_list, object_list) { if (!VM_OBJECT_TRYLOCK(object)) { @@ -237,7 +239,8 @@ } mtx_unlock(&vm_object_list_mtx); totalp->t_free = cnt.v_free_count + cnt.v_cache_count; - return (sysctl_handle_opaque(oidp, totalp, sizeof total, req)); + mtx_unlock(&Giant); + return (sysctl_handle_opaque(oidp, totalp, sizeof total, req), &Giant); } /* @@ -275,118 +278,118 @@ SYSCTL_PROC(_vm, VM_TOTAL, vmtotal, CTLTYPE_OPAQUE|CTLFLAG_RD, 0, sizeof(struct vmtotal), vmtotal, "S,vmtotal", - "System virtual memory statistics"); -SYSCTL_NODE(_vm, OID_AUTO, stats, CTLFLAG_RW, 0, "VM meter stats"); -SYSCTL_NODE(_vm_stats, OID_AUTO, sys, CTLFLAG_RW, 0, "VM meter sys stats"); -SYSCTL_NODE(_vm_stats, OID_AUTO, vm, CTLFLAG_RW, 0, "VM meter vm stats"); -SYSCTL_NODE(_vm_stats, OID_AUTO, misc, CTLFLAG_RW, 0, "VM meter misc stats"); + "System virtual memory statistics", &Giant); +SYSCTL_NODE(_vm, OID_AUTO, stats, CTLFLAG_RW, 0, "VM meter stats", NULL); +SYSCTL_NODE(_vm_stats, OID_AUTO, sys, CTLFLAG_RW, 0, "VM meter sys stats", NULL); +SYSCTL_NODE(_vm_stats, OID_AUTO, vm, CTLFLAG_RW, 0, "VM meter vm stats", NULL); +SYSCTL_NODE(_vm_stats, OID_AUTO, misc, CTLFLAG_RW, 0, "VM meter misc stats", NULL); SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_swtch, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_swtch, 0, vcnt, "IU", "Context switches"); + &cnt.v_swtch, 0, vcnt, "IU", "Context switches", &Giant); SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_trap, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_trap, 0, vcnt, "IU", "Traps"); + &cnt.v_trap, 0, vcnt, "IU", "Traps", &Giant); SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_syscall, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_syscall, 0, vcnt, "IU", "Syscalls"); + &cnt.v_syscall, 0, vcnt, "IU", "Syscalls", &Giant); SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_intr, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_intr, 0, vcnt, "IU", "Hardware interrupts"); + &cnt.v_intr, 0, vcnt, "IU", "Hardware interrupts", &Giant); SYSCTL_PROC(_vm_stats_sys, OID_AUTO, v_soft, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_soft, 0, vcnt, "IU", "Software interrupts"); + &cnt.v_soft, 0, vcnt, "IU", "Software interrupts", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vm_faults, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_vm_faults, 0, vcnt, "IU", "VM faults"); + &cnt.v_vm_faults, 0, vcnt, "IU", "VM faults", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cow_faults, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_cow_faults, 0, vcnt, "IU", "COW faults"); + &cnt.v_cow_faults, 0, vcnt, "IU", "COW faults", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cow_optim, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_cow_optim, 0, vcnt, "IU", "Optimized COW faults"); + &cnt.v_cow_optim, 0, vcnt, "IU", "Optimized COW faults", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_zfod, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_zfod, 0, vcnt, "IU", "Zero fill"); + &cnt.v_zfod, 0, vcnt, "IU", "Zero fill", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_ozfod, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_ozfod, 0, vcnt, "IU", "Optimized zero fill"); + &cnt.v_ozfod, 0, vcnt, "IU", "Optimized zero fill", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_swapin, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_swapin, 0, vcnt, "IU", "Swapin operations"); + &cnt.v_swapin, 0, vcnt, "IU", "Swapin operations", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_swapout, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_swapout, 0, vcnt, "IU", "Swapout operations"); + &cnt.v_swapout, 0, vcnt, "IU", "Swapout operations", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_swappgsin, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_swappgsin, 0, vcnt, "IU", "Swapin pages"); + &cnt.v_swappgsin, 0, vcnt, "IU", "Swapin pages", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_swappgsout, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_swappgsout, 0, vcnt, "IU", "Swapout pages"); + &cnt.v_swappgsout, 0, vcnt, "IU", "Swapout pages", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vnodein, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_vnodein, 0, vcnt, "IU", "Vnodein operations"); + &cnt.v_vnodein, 0, vcnt, "IU", "Vnodein operations", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vnodeout, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_vnodeout, 0, vcnt, "IU", "Vnodeout operations"); + &cnt.v_vnodeout, 0, vcnt, "IU", "Vnodeout operations", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vnodepgsin, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_vnodepgsin, 0, vcnt, "IU", "Vnodein pages"); + &cnt.v_vnodepgsin, 0, vcnt, "IU", "Vnodein pages", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vnodepgsout, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_vnodepgsout, 0, vcnt, "IU", "Vnodeout pages"); + &cnt.v_vnodepgsout, 0, vcnt, "IU", "Vnodeout pages", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_intrans, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_intrans, 0, vcnt, "IU", "In transit page blocking"); + &cnt.v_intrans, 0, vcnt, "IU", "In transit page blocking", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_reactivated, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_reactivated, 0, vcnt, "IU", "Reactivated pages"); + &cnt.v_reactivated, 0, vcnt, "IU", "Reactivated pages", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_pdwakeups, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_pdwakeups, 0, vcnt, "IU", "Pagedaemon wakeups"); + &cnt.v_pdwakeups, 0, vcnt, "IU", "Pagedaemon wakeups", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_pdpages, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_pdpages, 0, vcnt, "IU", "Pagedaemon page scans"); + &cnt.v_pdpages, 0, vcnt, "IU", "Pagedaemon page scans", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_dfree, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_dfree, 0, vcnt, "IU", ""); + &cnt.v_dfree, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_pfree, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_pfree, 0, vcnt, "IU", ""); + &cnt.v_pfree, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_tfree, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_tfree, 0, vcnt, "IU", ""); + &cnt.v_tfree, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_page_size, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_page_size, 0, vcnt, "IU", ""); + &cnt.v_page_size, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_page_count, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_page_count, 0, vcnt, "IU", ""); + &cnt.v_page_count, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_free_reserved, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_free_reserved, 0, vcnt, "IU", ""); + &cnt.v_free_reserved, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_free_target, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_free_target, 0, vcnt, "IU", ""); + &cnt.v_free_target, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_free_min, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_free_min, 0, vcnt, "IU", ""); + &cnt.v_free_min, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_free_count, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_free_count, 0, vcnt, "IU", ""); + &cnt.v_free_count, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_wire_count, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_wire_count, 0, vcnt, "IU", ""); + &cnt.v_wire_count, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_active_count, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_active_count, 0, vcnt, "IU", ""); + &cnt.v_active_count, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_inactive_target, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_inactive_target, 0, vcnt, "IU", ""); + &cnt.v_inactive_target, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_inactive_count, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_inactive_count, 0, vcnt, "IU", ""); + &cnt.v_inactive_count, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cache_count, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_cache_count, 0, vcnt, "IU", ""); + &cnt.v_cache_count, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cache_min, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_cache_min, 0, vcnt, "IU", ""); + &cnt.v_cache_min, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_cache_max, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_cache_max, 0, vcnt, "IU", ""); + &cnt.v_cache_max, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_pageout_free_min, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_pageout_free_min, 0, vcnt, "IU", ""); + &cnt.v_pageout_free_min, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_interrupt_free_min, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_interrupt_free_min, 0, vcnt, "IU", ""); + &cnt.v_interrupt_free_min, 0, vcnt, "IU", "", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_forks, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_forks, 0, vcnt, "IU", "Number of fork() calls"); + &cnt.v_forks, 0, vcnt, "IU", "Number of fork() calls", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vforks, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_vforks, 0, vcnt, "IU", "Number of vfork() calls"); + &cnt.v_vforks, 0, vcnt, "IU", "Number of vfork() calls", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_rforks, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_rforks, 0, vcnt, "IU", "Number of rfork() calls"); + &cnt.v_rforks, 0, vcnt, "IU", "Number of rfork() calls", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_kthreads, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_kthreads, 0, vcnt, "IU", "Number of fork() calls by kernel"); + &cnt.v_kthreads, 0, vcnt, "IU", "Number of fork() calls by kernel", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_forkpages, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_forkpages, 0, vcnt, "IU", "VM pages affected by fork()"); + &cnt.v_forkpages, 0, vcnt, "IU", "VM pages affected by fork()", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_vforkpages, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_vforkpages, 0, vcnt, "IU", "VM pages affected by vfork()"); + &cnt.v_vforkpages, 0, vcnt, "IU", "VM pages affected by vfork()", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_rforkpages, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_rforkpages, 0, vcnt, "IU", "VM pages affected by rfork()"); + &cnt.v_rforkpages, 0, vcnt, "IU", "VM pages affected by rfork()", &Giant); SYSCTL_PROC(_vm_stats_vm, OID_AUTO, v_kthreadpages, CTLTYPE_UINT|CTLFLAG_RD, - &cnt.v_kthreadpages, 0, vcnt, "IU", "VM pages affected by fork() by kernel"); + &cnt.v_kthreadpages, 0, vcnt, "IU", "VM pages affected by fork() by kernel", &Giant); SYSCTL_INT(_vm_stats_misc, OID_AUTO, - zero_page_count, CTLFLAG_RD, &vm_page_zero_count, 0, ""); + zero_page_count, CTLFLAG_RD, &vm_page_zero_count, 0, "", &Giant); #if 0 SYSCTL_INT(_vm_stats_misc, OID_AUTO, - page_mask, CTLFLAG_RD, &page_mask, 0, ""); + page_mask, CTLFLAG_RD, &page_mask, 0, "", &Giant); SYSCTL_INT(_vm_stats_misc, OID_AUTO, - page_shift, CTLFLAG_RD, &page_shift, 0, ""); + page_shift, CTLFLAG_RD, &page_shift, 0, "", &Giant); SYSCTL_INT(_vm_stats_misc, OID_AUTO, - first_page, CTLFLAG_RD, &first_page, 0, ""); + first_page, CTLFLAG_RD, &first_page, 0, "", &Giant); SYSCTL_INT(_vm_stats_misc, OID_AUTO, - last_page, CTLFLAG_RD, &last_page, 0, ""); + last_page, CTLFLAG_RD, &last_page, 0, "", &Giant); #endif diff -ur /home/refugee/freebsd/current/src/sys/vm/vm_mmap.c repl/vm/vm_mmap.c --- /home/refugee/freebsd/current/src/sys/vm/vm_mmap.c Sun Oct 31 04:52:25 2004 +++ repl/vm/vm_mmap.c Tue Dec 14 00:49:52 2004 @@ -86,7 +86,7 @@ #endif static int max_proc_mmap; -SYSCTL_INT(_vm, OID_AUTO, max_proc_mmap, CTLFLAG_RW, &max_proc_mmap, 0, ""); +SYSCTL_INT(_vm, OID_AUTO, max_proc_mmap, CTLFLAG_RW, &max_proc_mmap, 0, "", &Giant); /* * Set the maximum number of vm_map_entry structures per process. Roughly diff -ur /home/refugee/freebsd/current/src/sys/vm/vm_object.c repl/vm/vm_object.c --- /home/refugee/freebsd/current/src/sys/vm/vm_object.c Wed Dec 8 20:41:18 2004 +++ repl/vm/vm_object.c Tue Dec 14 00:49:52 2004 @@ -102,11 +102,11 @@ */ static int msync_flush_flags = MSYNC_FLUSH_HARDSEQ | MSYNC_FLUSH_SOFTSEQ; SYSCTL_INT(_vm, OID_AUTO, msync_flush_flags, - CTLFLAG_RW, &msync_flush_flags, 0, ""); + CTLFLAG_RW, &msync_flush_flags, 0, "", &Giant); static int old_msync; SYSCTL_INT(_vm, OID_AUTO, old_msync, CTLFLAG_RW, &old_msync, 0, - "Use old (insecure) msync behavior"); + "Use old (insecure) msync behavior", &Giant); static void vm_object_qcollapse(vm_object_t object); static int vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int curgeneration, int pagerflags); diff -ur /home/refugee/freebsd/current/src/sys/vm/vm_pageout.c repl/vm/vm_pageout.c --- /home/refugee/freebsd/current/src/sys/vm/vm_pageout.c Sun Nov 14 03:56:50 2004 +++ repl/vm/vm_pageout.c Tue Dec 14 00:49:52 2004 @@ -161,41 +161,41 @@ #endif SYSCTL_INT(_vm, VM_PAGEOUT_ALGORITHM, pageout_algorithm, - CTLFLAG_RW, &vm_pageout_algorithm, 0, "LRU page mgmt"); + CTLFLAG_RW, &vm_pageout_algorithm, 0, "LRU page mgmt", &Giant); SYSCTL_INT(_vm, OID_AUTO, max_launder, - CTLFLAG_RW, &vm_max_launder, 0, "Limit dirty flushes in pageout"); + CTLFLAG_RW, &vm_max_launder, 0, "Limit dirty flushes in pageout", &Giant); SYSCTL_INT(_vm, OID_AUTO, pageout_stats_max, - CTLFLAG_RW, &vm_pageout_stats_max, 0, "Max pageout stats scan length"); + CTLFLAG_RW, &vm_pageout_stats_max, 0, "Max pageout stats scan length", &Giant); SYSCTL_INT(_vm, OID_AUTO, pageout_full_stats_interval, - CTLFLAG_RW, &vm_pageout_full_stats_interval, 0, "Interval for full stats scan"); + CTLFLAG_RW, &vm_pageout_full_stats_interval, 0, "Interval for full stats scan", &Giant); SYSCTL_INT(_vm, OID_AUTO, pageout_stats_interval, - CTLFLAG_RW, &vm_pageout_stats_interval, 0, "Interval for partial stats scan"); + CTLFLAG_RW, &vm_pageout_stats_interval, 0, "Interval for partial stats scan", &Giant); #if defined(NO_SWAPPING) SYSCTL_INT(_vm, VM_SWAPPING_ENABLED, swap_enabled, - CTLFLAG_RD, &vm_swap_enabled, 0, ""); + CTLFLAG_RD, &vm_swap_enabled, 0, "", &Giant); SYSCTL_INT(_vm, OID_AUTO, swap_idle_enabled, - CTLFLAG_RD, &vm_swap_idle_enabled, 0, ""); + CTLFLAG_RD, &vm_swap_idle_enabled, 0, "", &Giant); #else SYSCTL_INT(_vm, VM_SWAPPING_ENABLED, swap_enabled, - CTLFLAG_RW, &vm_swap_enabled, 0, "Enable entire process swapout"); + CTLFLAG_RW, &vm_swap_enabled, 0, "Enable entire process swapout", &Giant); SYSCTL_INT(_vm, OID_AUTO, swap_idle_enabled, - CTLFLAG_RW, &vm_swap_idle_enabled, 0, "Allow swapout on idle criteria"); + CTLFLAG_RW, &vm_swap_idle_enabled, 0, "Allow swapout on idle criteria", &Giant); #endif SYSCTL_INT(_vm, OID_AUTO, defer_swapspace_pageouts, - CTLFLAG_RW, &defer_swap_pageouts, 0, "Give preference to dirty pages in mem"); + CTLFLAG_RW, &defer_swap_pageouts, 0, "Give preference to dirty pages in mem", &Giant); SYSCTL_INT(_vm, OID_AUTO, disable_swapspace_pageouts, - CTLFLAG_RW, &disable_swap_pageouts, 0, "Disallow swapout of dirty pages"); + CTLFLAG_RW, &disable_swap_pageouts, 0, "Disallow swapout of dirty pages", &Giant); static int pageout_lock_miss; SYSCTL_INT(_vm, OID_AUTO, pageout_lock_miss, - CTLFLAG_RD, &pageout_lock_miss, 0, "vget() lock misses during pageout"); + CTLFLAG_RD, &pageout_lock_miss, 0, "vget() lock misses during pageout", &Giant); #define VM_PAGEOUT_PAGE_COUNT 16 int vm_pageout_page_count = VM_PAGEOUT_PAGE_COUNT; diff -ur /home/refugee/freebsd/current/src/sys/vm/vm_zeroidle.c repl/vm/vm_zeroidle.c --- /home/refugee/freebsd/current/src/sys/vm/vm_zeroidle.c Sun Nov 14 03:56:50 2004 +++ repl/vm/vm_zeroidle.c Tue Dec 14 00:49:52 2004 @@ -57,16 +57,16 @@ static int cnt_prezero; SYSCTL_INT(_vm_stats_misc, OID_AUTO, cnt_prezero, CTLFLAG_RD, - &cnt_prezero, 0, ""); + &cnt_prezero, 0, "", &Giant); static int idlezero_enable_default = 1; TUNABLE_INT("vm.idlezero_enable", &idlezero_enable_default); /* Defer setting the enable flag until the kthread is running. */ static int idlezero_enable = 0; -SYSCTL_INT(_vm, OID_AUTO, idlezero_enable, CTLFLAG_RW, &idlezero_enable, 0, ""); +SYSCTL_INT(_vm, OID_AUTO, idlezero_enable, CTLFLAG_RW, &idlezero_enable, 0, "", &Giant); static int idlezero_maxrun = 16; -SYSCTL_INT(_vm, OID_AUTO, idlezero_maxrun, CTLFLAG_RW, &idlezero_maxrun, 0, ""); +SYSCTL_INT(_vm, OID_AUTO, idlezero_maxrun, CTLFLAG_RW, &idlezero_maxrun, 0, "", &Giant); TUNABLE_INT("vm.idlezero_maxrun", &idlezero_maxrun); /*