1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-28 11:57:28 +00:00
freebsd/sys/kern
Don Lewis 9d2b090975 We can't call fsetown() from sonewconn() because sonewconn() is be called
from an interrupt context and fsetown() wants to peek at curproc, call
malloc(..., M_WAITOK), and fiddle with various unprotected data structures.
The fix is to move the code that duplicates the F_SETOWN/FIOSETOWN state
of the original socket to the new socket from sonewconn() to accept1(),
since accept1() runs in the correct context.  Deferring this until the
process calls accept() is harmless since the process can't do anything
useful with SIGIO on the new socket until it has the descriptor for that
socket.

One could make the case for not bothering to duplicate the
F_SETOWN/FIOSETOWN state and requiring the process to explicitly make the
fcntl() or ioctl() call on the new socket, but this would be incompatible
with the previous implementation and might break programs which rely on
the old semantics.

This bug was discovered by Andrew Gallatin <gallatin@cs.duke.edu>.
1998-11-23 00:45:39 +00:00
..
bus_if.m My changes to the new device interface: 1998-11-14 21:58:51 +00:00
device_if.m My changes to the new device interface: 1998-11-14 21:58:51 +00:00
imgact_aout.c *gulp*. Jordan specifically OK'ed this.. 1998-10-16 03:55:01 +00:00
imgact_elf.c Nitpicking and dusting performed on a train. Removes trivial warnings 1998-10-25 17:44:59 +00:00
imgact_gzip.c *gulp*. Jordan specifically OK'ed this.. 1998-10-16 03:55:01 +00:00
imgact_shell.c *gulp*. Jordan specifically OK'ed this.. 1998-10-16 03:55:01 +00:00
inflate.c kzipboot uses kern/inflate.c outside the kernel by providing its own 1998-11-10 09:08:49 +00:00
init_main.c Fix sysinit_add(). 1998-10-15 17:09:19 +00:00
init_sysent.c regenerate (+kldsym) 1998-11-11 12:57:05 +00:00
kern_acct.c Moved limit frobbing (and the resulting limcopy()) that occurs for 1998-06-05 21:44:20 +00:00
kern_clock.c Fixed breakage of the GPROF case of statclock() in the previous commit. 1998-10-26 06:13:18 +00:00
kern_conf.c My changes to the new device interface: 1998-11-14 21:58:51 +00:00
kern_descrip.c I got another batch of suggestions for cosmetic changes from bde. 1998-11-11 10:56:07 +00:00
kern_environment.c Don't try to initialise the environment out of a sysinit, it's handled 1998-10-09 21:21:34 +00:00
kern_exec.c Added a second argument, "activate" to the vm_page_unwire() call so that 1998-10-28 13:37:02 +00:00
kern_exit.c Installed the second patch attached to kern/7899 with some changes suggested 1998-11-11 10:04:13 +00:00
kern_fork.c If the session leader dies, s_leader is set to NULL and getsid() may 1998-11-09 15:08:04 +00:00
kern_intr.c add #include <sys/kernel.h> where it's needed by MALLOC_DEFINE() 1998-11-10 09:16:29 +00:00
kern_ktrace.c add #include <sys/kernel.h> where it's needed by MALLOC_DEFINE() 1998-11-10 09:16:29 +00:00
kern_linker.c kldsym(2) prototype implementation 1998-11-11 13:04:40 +00:00
kern_lkm.c Register and unregister vnodeops the new way rather than leaking on 1998-11-10 09:12:40 +00:00
kern_lock.c
kern_lockf.c add #include <sys/kernel.h> where it's needed by MALLOC_DEFINE() 1998-11-10 09:16:29 +00:00
kern_malloc.c Have MALLOC_DECLARE() initialize malloc types explicitly, and have them 1998-11-10 08:46:24 +00:00
kern_mib.c - hw.machine_arch returns cpu architecture type. 1998-08-31 08:41:58 +00:00
kern_module.c put a \n on an error message printf 1998-11-06 02:18:57 +00:00
kern_ntptime.c Introduce std_pps_ioctl() to automagically DTRT. 1998-06-13 09:30:26 +00:00
kern_physio.c Nitpicking and dusting performed on a train. Removes trivial warnings 1998-10-25 17:44:59 +00:00
kern_proc.c I got another batch of suggestions for cosmetic changes from bde. 1998-11-11 10:56:07 +00:00
kern_prot.c add #include <sys/kernel.h> where it's needed by MALLOC_DEFINE() 1998-11-10 09:16:29 +00:00
kern_random.c Converted add_interrupt_randomness() to take a `void *' arg. Rewrote 1998-06-21 11:33:32 +00:00
kern_resource.c Fixed double counting of runtime after a process exits. The last 1998-07-27 19:16:21 +00:00
kern_shutdown.c Don't count non-local dirty buffers as outstanding when shutting down. 1998-11-13 22:40:37 +00:00
kern_sig.c Installed the second patch attached to kern/7899 with some changes suggested 1998-11-11 10:04:13 +00:00
kern_subr.c remove nonsense code. 1998-08-04 09:21:04 +00:00
kern_synch.c Oops, back out some local changes that shouldn't have been in the 1998-10-25 20:11:36 +00:00
kern_sysctl.c *gulp*. Jordan specifically OK'ed this.. 1998-10-16 03:55:01 +00:00
kern_tc.c Fixed breakage of the GPROF case of statclock() in the previous commit. 1998-10-26 06:13:18 +00:00
kern_threads.c Nitpicking and dusting performed on a train. Removes trivial warnings 1998-10-25 17:44:59 +00:00
kern_time.c Nitpicking and dusting performed on a train. Removes trivial warnings 1998-10-25 17:44:59 +00:00
kern_timeout.c
kern_xxx.c Change various syscalls to use size_t arguments instead of u_int. 1998-08-24 08:39:39 +00:00
ksched.c
link_aout.c The handle for the kernel is common. With this fix, ELF kernels can load 1998-11-04 15:20:58 +00:00
link_elf_obj.c Don't put aggregate structs 4K large on the kernel stack, especially when 1998-11-06 15:16:07 +00:00
link_elf.c Don't put aggregate structs 4K large on the kernel stack, especially when 1998-11-06 15:16:07 +00:00
Make.tags.inc
makedevops.pl "Here is the most recent version of makedevops.pl. I've made the parsing 1998-11-08 18:33:11 +00:00
makedevops.sh Use the interface name as well as the method name when creating the method 1998-10-15 09:50:45 +00:00
Makefile
makesyscalls.sh Add trailing newline to sys/syscall.mk so that diff doesn't choke on it. 1998-06-28 10:01:52 +00:00
md5c.c This commit fixes various 64bit portability problems required for 1998-06-07 17:13:14 +00:00
p1003_1b.c Set PAGE_SIZE for _SC_PAGESIZE sysconf(). 1998-06-01 21:54:43 +00:00
posix4_mib.c
subr_autoconf.c
subr_bus.c A couple of minor sanity checks. 1998-11-15 18:11:21 +00:00
subr_clist.c Cast pointers to uintptr_t/intptr_t instead of to u_long/long, 1998-07-15 02:32:35 +00:00
subr_devstat.c Now that the wd driver is fixed (Thanks Bruce!), re-enable the 1998-11-15 23:57:22 +00:00
subr_disklabel.c Use only the correct raw partition for writing labels. Don't use the 1998-10-17 07:49:04 +00:00
subr_diskmbr.c The machine dependent disk slice manager does not recognize 1998-08-10 07:22:14 +00:00
subr_diskslice.c Overload the correct errno for attempts to set an in-core label with 1998-10-17 09:46:42 +00:00
subr_dkbad.c
subr_log.c I got another batch of suggestions for cosmetic changes from bde. 1998-11-11 10:56:07 +00:00
subr_module.c Align to sizeof(long) rather than sizeof(int32_t). It needs to be 1998-10-14 05:07:23 +00:00
subr_param.c Implemented zero-copy TCP/IP extensions via sendfile(2) - send a 1998-11-05 14:28:26 +00:00
subr_prf.c Store formatted panic string in static buffer to make it available later 1998-09-06 06:25:18 +00:00
subr_prof.c Fixed bogotification of pseudocode for syscall args by rev.1.53 of 1998-09-05 14:30:11 +00:00
subr_rlist.c Move assignment of cur_rlp to after the acquisition of the list lock. 1998-08-05 14:06:04 +00:00
subr_rman.c The new resource manager, hopefully in a reasonably stable form. 1998-10-29 01:48:36 +00:00
subr_smp.c mp_machdep.c: Set a vector to boot code (PC-98). 1998-10-10 13:37:16 +00:00
subr_trap.c Fixed printf format errors. 1998-08-23 10:16:26 +00:00
subr_xxx.c * Fix a couple of places in the device pager where an address was 1998-11-08 12:39:07 +00:00
sys_generic.c Installed the second patch attached to kern/7899 with some changes suggested 1998-11-11 10:04:13 +00:00
sys_pipe.c Installed the second patch attached to kern/7899 with some changes suggested 1998-11-11 10:04:13 +00:00
sys_process.c Only access an int for READU/WRITEU since that is what ptrace is declared to 1998-07-29 18:41:30 +00:00
sys_socket.c Installed the second patch attached to kern/7899 with some changes suggested 1998-11-11 10:04:13 +00:00
syscalls.c regenerate (+kldsym) 1998-11-11 12:57:05 +00:00
syscalls.master A kldsym(2) syscall prototype for extracting information from the in-kernel 1998-11-11 12:45:14 +00:00
sysv_ipc.c
sysv_msg.c
sysv_sem.c
sysv_shm.c Fixed two potentially serious classes of bugs: 1998-10-13 08:24:45 +00:00
tty_compat.c This commit fixes various 64bit portability problems required for 1998-06-07 17:13:14 +00:00
tty_conf.c This commit fixes various 64bit portability problems required for 1998-06-07 17:13:14 +00:00
tty_cons.c Added D_TTY to the cdevswitch flags for all tty drivers. This is required 1998-08-23 08:26:42 +00:00
tty_pty.c Added D_TTY to the cdevswitch flags for all tty drivers. This is required 1998-08-23 08:26:42 +00:00
tty_snoop.c This commit fixes various 64bit portability problems required for 1998-06-07 17:13:14 +00:00
tty_subr.c Cast pointers to uintptr_t/intptr_t instead of to u_long/long, 1998-07-15 02:32:35 +00:00
tty_tb.c
tty_tty.c Added D_TTY to the cdevswitch flags for all tty drivers. This is required 1998-08-23 08:26:42 +00:00
tty.c Fixed some missing cases in the check for ioctls that involve modification. 1998-11-22 09:04:09 +00:00
uipc_domain.c
uipc_mbuf.c Only call m_reclaim() if M_WAIT since calling it from an interrupt can 1998-07-27 03:59:48 +00:00
uipc_proto.c Yow! Completely change the way socket options are handled, eliminating 1998-08-23 03:07:17 +00:00
uipc_sockbuf.c We can't call fsetown() from sonewconn() because sonewconn() is be called 1998-11-23 00:45:39 +00:00
uipc_socket2.c We can't call fsetown() from sonewconn() because sonewconn() is be called 1998-11-23 00:45:39 +00:00
uipc_socket.c Installed the second patch attached to kern/7899 with some changes suggested 1998-11-11 10:04:13 +00:00
uipc_syscalls.c We can't call fsetown() from sonewconn() because sonewconn() is be called 1998-11-23 00:45:39 +00:00
uipc_usrreq.c Nitpicking and dusting performed on a train. Removes trivial warnings 1998-10-25 17:44:59 +00:00
vfs_aio.c Nitpicking and dusting performed on a train. Removes trivial warnings 1998-10-25 17:44:59 +00:00
vfs_bio.c Closed a very narrow and rare race condition that involved net interrupts, 1998-11-18 09:00:47 +00:00
vfs_cache.c Don't use CTL_VFS at the wrong level. This caused loops in the sysctl 1998-09-09 07:41:41 +00:00
vfs_cluster.c Because buffers may be tossed and recreated at will under the new VM 1998-11-17 00:31:12 +00:00
vfs_conf.c Remove the SLICE code. 1998-09-14 19:56:42 +00:00
vfs_default.c Make the vnode opv vector construction fully dynamic. Previously we 1998-11-10 09:04:09 +00:00
vfs_export.c Convert lists for bufs attached to vnodes from a LIST to a TAILQ. 1998-10-31 14:20:39 +00:00
vfs_extattr.c make mount(2) automatically kldload modules if the requested filesystem 1998-11-03 14:29:09 +00:00
vfs_init.c Fixed the type of vfs_modevent (a little late, to match the corresponding 1998-11-15 15:18:30 +00:00
vfs_lookup.c This commit fixes various 64bit portability problems required for 1998-06-07 17:13:14 +00:00
vfs_mount.c Remove the SLICE code. 1998-09-14 19:56:42 +00:00
vfs_subr.c Convert lists for bufs attached to vnodes from a LIST to a TAILQ. 1998-10-31 14:20:39 +00:00
vfs_syscalls.c make mount(2) automatically kldload modules if the requested filesystem 1998-11-03 14:29:09 +00:00
vfs_vnops.c Only do one VOP_ACCESS() per open() instead of two. This should reduce 1998-11-02 02:36:16 +00:00
vnode_if.pl Make the vnode opv vector construction fully dynamic. Previously we 1998-11-10 09:04:09 +00:00
vnode_if.sh Make the vnode opv vector construction fully dynamic. Previously we 1998-11-10 09:04:09 +00:00
vnode_if.src Add a new vnode op, VOP_FREEBLKS(), which filesystems can use to inform 1998-09-05 14:13:12 +00:00