freebsd-nq/sys/kern
Robert Watson ae11a989e6 When writing trailers in sendfile(2), don't call kern_writev()
while holding the socket buffer lock.  These leads to an
immediate panic due to recursing the socket buffer lock.  This
bug was introduced in uipc_syscalls.c:1.240, but masked by
another bug until that was fixed in uipc_syscalls.c:1.269.

Note that the current fix isn't perfect, but better than
panicking: normally we guarantee that simultaneous invocations
of a system call to write on a stream socket won't be
interlaced, which is ensured by use of the socket buffer sleep
lock.  This is guaranteed for the sendfile headers, but not
trailers.  In practice, this is likely not a problem, but
should be fixed.

MFC after:	3 days
Pointy hat to:	andre (1.240), cperciva (1.269)
2008-04-27 15:50:00 +00:00
..
bus_if.m Implement a BUS_BIND_INTR() method in the bus interface to bind an IRQ 2008-03-20 21:24:32 +00:00
clock_if.m
cpufreq_if.m
device_if.m
genassym.sh
imgact_aout.c
imgact_elf32.c
imgact_elf64.c
imgact_elf.c Remove kernel support for M:N threading. 2008-03-12 10:12:01 +00:00
imgact_gzip.c
imgact_shell.c
inflate.c
init_main.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
init_sysent.c Regen 2008-03-31 12:12:27 +00:00
kern_acct.c
kern_alq.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
kern_clock.c Implement per-cpu callout threads, wheels, and locks. 2008-04-02 11:20:30 +00:00
kern_condvar.c
kern_conf.c Add two missed chunks from the rev. 1.210, for the giant_read() and 2008-04-02 11:11:58 +00:00
kern_context.c
kern_cpu.c
kern_cpuset.c - Add the interrupt vector number to intr_event_create so MI code can 2008-04-11 03:26:41 +00:00
kern_descrip.c * Correct a mis-merge that leaked the PROC_LOCK [1] 2008-04-26 13:16:55 +00:00
kern_environment.c
kern_event.c - Convert two timeout users to the new callout_reset_curcpu() api. 2008-04-02 11:21:42 +00:00
kern_exec.c Implement the fexecve(2) syscall. 2008-03-31 12:05:52 +00:00
kern_exit.c In abort2(2): Accept a NULL arg pointer if nargs == 0 2008-03-22 16:32:52 +00:00
kern_fork.c Fix the leak of the vmspace on the fork when the process limits 2008-03-20 15:24:49 +00:00
kern_idle.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
kern_intr.c - Make SCHED_STATS more generic by adding a wrapper to create the 2008-04-17 04:20:10 +00:00
kern_jail.c Instead of rolling our own jail number allocation procedure, use 2008-04-11 21:31:15 +00:00
kern_kthread.c - Relax requirements for p_numthreads, p_threads, p_swtick, and p_nice from 2008-03-19 06:19:01 +00:00
kern_ktr.c
kern_ktrace.c
kern_linker.c Back-out previous revision. For now I can use _ddb() variants of stack(9) KPI, 2008-04-21 17:22:35 +00:00
kern_lock.c Use a "rel" memory barrier for disowning the lock as it cames from an 2008-04-13 01:21:56 +00:00
kern_lockf.c Fix compilation with LOCKF_DEBUG. 2008-04-16 14:08:12 +00:00
kern_malloc.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
kern_mbuf.c Reintroduce UMA_SLAB_KMAP; however, change its spelling to 2008-04-04 18:41:12 +00:00
kern_mib.c
kern_module.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
kern_mtxpool.c
kern_mutex.c
kern_ntptime.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
kern_physio.c
kern_pmc.c
kern_poll.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
kern_priv.c
kern_proc.c - Relax requirements for p_numthreads, p_threads, p_swtick, and p_nice from 2008-03-19 06:19:01 +00:00
kern_prot.c
kern_resource.c Remove extra uihold() call that accidentally sneak in during perforce 2008-03-19 07:52:07 +00:00
kern_rmlock.c
kern_rwlock.c - Add sysctls at debug.rwlock to control the behavior of the speculative 2008-04-04 10:00:46 +00:00
kern_sema.c
kern_shutdown.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
kern_sig.c - Add a new td flag TDF_NEEDSUSPCHK that is set whenever a thread needs 2008-03-21 08:23:25 +00:00
kern_subr.c - Make SCHED_STATS more generic by adding a wrapper to create the 2008-04-17 04:20:10 +00:00
kern_switch.c - Make SCHED_STATS more generic by adding a wrapper to create the 2008-04-17 04:20:10 +00:00
kern_sx.c
kern_synch.c - Make SCHED_STATS more generic by adding a wrapper to create the 2008-04-17 04:20:10 +00:00
kern_syscalls.c
kern_sysctl.c
kern_tc.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
kern_thr.c Remove commented out code, thread suspension is done in thread library. 2008-03-23 02:03:06 +00:00
kern_thread.c - Make SCHED_STATS more generic by adding a wrapper to create the 2008-04-17 04:20:10 +00:00
kern_time.c
kern_timeout.c - Correct a major error introduced in the per-cpu timeout commit. Sleep 2008-04-06 11:08:49 +00:00
kern_umtx.c let umtxq_busy() only spin on mp machine. make function name 2008-04-03 11:49:20 +00:00
kern_uuid.c
kern_xxx.c
ksched.c
link_elf_obj.c Fix panic on e.g. "kldload /dev/null". 2008-03-15 17:40:18 +00:00
link_elf.c Fix panic on e.g. "kldload /dev/null". 2008-03-15 17:40:18 +00:00
linker_if.m
Make.tags.inc
Makefile
makesyscalls.sh Generate another function for the DTrace syscall provider to specify 2008-03-27 01:53:44 +00:00
md4c.c
md5c.c
p1003_1b.c Remove kernel support for M:N threading. 2008-03-12 10:12:01 +00:00
posix4_mib.c
sched_4bsd.c - Add an integer argument to idle to indicate how likely we are to wake 2008-04-25 05:18:50 +00:00
sched_ule.c - Add an integer argument to idle to indicate how likely we are to wake 2008-04-25 05:18:50 +00:00
serdev_if.m
subr_acl_posix1e.c
subr_autoconf.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
subr_blist.c
subr_bus.c Implement a BUS_BIND_INTR() method in the bus interface to bind an IRQ 2008-03-20 21:24:32 +00:00
subr_clist.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
subr_clock.c Now that all platforms use genclock, shuffle things around slightly 2008-04-22 19:38:30 +00:00
subr_devstat.c
subr_disk.c
subr_eventhandler.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
subr_fattime.c
subr_firmware.c Do image loading in a context known to have a root directory: 2008-04-09 19:07:48 +00:00
subr_hints.c
subr_kdb.c
subr_kobj.c
subr_lock.c
subr_log.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
subr_mbpool.c
subr_mchain.c Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
subr_module.c
subr_msgbuf.c
subr_param.c
subr_pcpu.c
subr_power.c
subr_prf.c
subr_prof.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
subr_rman.c
subr_rtc.c Now that all platforms use genclock, shuffle things around slightly 2008-04-22 19:38:30 +00:00
subr_sbuf.c
subr_scanf.c
subr_sleepqueue.c - Make SCHED_STATS more generic by adding a wrapper to create the 2008-04-17 04:20:10 +00:00
subr_smp.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
subr_stack.c
subr_taskqueue.c Use kthread_exit() to terminate a taskqueue thread rather than kproc_exit() 2008-04-11 17:35:54 +00:00
subr_trap.c - Make SCHED_STATS more generic by adding a wrapper to create the 2008-04-17 04:20:10 +00:00
subr_turnstile.c - Make SCHED_STATS more generic by adding a wrapper to create the 2008-04-17 04:20:10 +00:00
subr_unit.c
subr_witness.c Convert pcbinfo and inpcb mutexes to rwlocks, and modify macros to 2008-04-17 21:38:18 +00:00
sys_generic.c - Remove stale comment. 2008-03-19 07:33:16 +00:00
sys_pipe.c
sys_process.c - Relax requirements for p_numthreads, p_threads, p_swtick, and p_nice from 2008-03-19 06:19:01 +00:00
sys_socket.c
syscalls.c Regen 2008-03-31 12:12:27 +00:00
syscalls.master Add the openat(), fexecve() and other *at() syscalls to the table. 2008-03-31 12:06:55 +00:00
systrace_args.c Regen 2008-03-31 12:12:27 +00:00
sysv_ipc.c
sysv_msg.c
sysv_sem.c
sysv_shm.c
tty_compat.c
tty_conf.c
tty_cons.c The "free-lance" timer in the i8254 is only used for the speaker 2008-03-26 20:09:21 +00:00
tty_pts.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
tty_pty.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
tty_subr.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
tty_tty.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
tty.c Implement POSIX function tcgetsid() which returns session id. 2008-04-15 08:33:32 +00:00
uipc_accf.c
uipc_cow.c
uipc_debug.c
uipc_domain.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
uipc_mbuf2.c
uipc_mbuf.c Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
uipc_mqueue.c - Use vget() to lock the vnode rather than refing without a lock and 2008-03-29 23:30:40 +00:00
uipc_sem.c
uipc_shm.c Initialize the vm object's flags to include OBJ_NOSPLIT, just like the 2008-04-13 21:08:34 +00:00
uipc_sockbuf.c
uipc_socket.c Add pru_flush routine so a transport can 2008-04-14 18:06:04 +00:00
uipc_syscalls.c When writing trailers in sendfile(2), don't call kern_writev() 2008-04-27 15:50:00 +00:00
uipc_usrreq.c
vfs_acl.c Add the support for the AT_FDCWD and fd-relative name lookups to the 2008-03-31 12:01:21 +00:00
vfs_aio.c
vfs_bio.c b_waiters cannot be adequately protected by the interlock because it is 2008-03-28 12:30:12 +00:00
vfs_cache.c - Use LK_TYPE_MASK where needed. Actually after sys/sys/lockmgr.h:1.69 it is 2008-04-09 20:19:55 +00:00
vfs_cluster.c - Complete part of the unfinished bufobj work by consistently using 2008-03-22 09:15:16 +00:00
vfs_default.c Move the head of byte-level advisory lock list from the 2008-04-16 11:33:32 +00:00
vfs_export.c
vfs_extattr.c Add the support for the AT_FDCWD and fd-relative name lookups to the 2008-03-31 12:01:21 +00:00
vfs_hash.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
vfs_init.c
vfs_lookup.c Implement the linux syscalls 2008-04-08 09:45:49 +00:00
vfs_mount.c Now that all platforms use genclock, shuffle things around slightly 2008-04-22 19:38:30 +00:00
vfs_subr.c Implement 'show mount' command in DDB. Without argument, it prints short 2008-04-26 13:04:48 +00:00
vfs_syscalls.c vfs_syscalls.c 1.452 mistakenly swapped the behavior of chown() and lchown(). 2008-04-07 00:29:32 +00:00
vfs_vnops.c Add the support for the O_EXEC open(2) mode, as specified by the 2008-03-31 11:57:18 +00:00
vnode_if.src Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00