freebsd-src/sys/kern
Pawel Jakub Dawidek 619f284195 In realloc(9), determine size of the original block based on
UMA_SLAB_MALLOC flag.
In some circumstances (I observed it when I was doing a lot of reallocs)
UMA_SLAB_MALLOC can be set even if us_keg != NULL.

If this is the case we have wonderful, silent data corruption, because less
data is copied to the newly allocated region than should be.

I'm not sure when this bug was introduced, it could be there undetected
for years now, as we don't have a lot of realloc(9) consumers and it was
hard to reproduce it...
...but what I know for sure, is that I don't want to know who introduce
the bug:) It took me two/three days to track it down (of course most of
the time I was looking for the bug in my own code).
2005-12-28 01:53:13 +00:00
..
bus_if.m
clock_if.m
cpufreq_if.m
device_if.m
genassym.sh
imgact_aout.c Maintain the lock on the vnode for most of exec_elfN_imgact(). 2005-12-24 04:57:50 +00:00
imgact_elf.c Fix breakage introduced in the previous commit. 2005-12-26 22:32:52 +00:00
imgact_elf32.c
imgact_elf64.c
imgact_gzip.c Maintain the lock on the vnode for most of exec_elfN_imgact(). 2005-12-24 04:57:50 +00:00
imgact_shell.c
inflate.c
init_main.c
init_sysent.c Regenerate sysent with new abort2 system call. 2005-12-23 11:58:42 +00:00
kern_acct.c
kern_acl.c
kern_alq.c
kern_clock.c Tweak how the MD code calls the fooclock() methods some. Instead of 2005-12-22 22:16:09 +00:00
kern_condvar.c Contributions from XFS for FreeBSD project: 2005-12-12 00:02:22 +00:00
kern_conf.c
kern_context.c
kern_cpu.c
kern_descrip.c Last step to make mq_notify conform to POSIX standard, If the process 2005-11-30 05:12:03 +00:00
kern_environment.c
kern_event.c
kern_exec.c Remove unneeded calls to pmap_remove_all(). The given page is not mapped. 2005-12-11 22:06:57 +00:00
kern_exit.c Regenerate sysent with new abort2 system call. 2005-12-23 11:58:42 +00:00
kern_fork.c
kern_idle.c
kern_intr.c
kern_jail.c
kern_kse.c
kern_kthread.c
kern_ktr.c
kern_ktrace.c
kern_linker.c
kern_lock.c - Remove and unused include. 2005-12-23 21:32:40 +00:00
kern_lockf.c
kern_mac.c
kern_malloc.c In realloc(9), determine size of the original block based on 2005-12-28 01:53:13 +00:00
kern_mbuf.c Hide the 4k mbuf clusters if the normal clusters are defined to be 2005-12-10 15:21:04 +00:00
kern_mib.c
kern_module.c
kern_mtxpool.c
kern_mutex.c Add a new 'show lock' command to ddb. If the argument has a valid lock 2005-12-13 23:14:35 +00:00
kern_ntptime.c
kern_physio.c
kern_pmc.c Fix -Wundef. 2005-12-04 02:12:43 +00:00
kern_poll.c
kern_proc.c
kern_prot.c
kern_resource.c
kern_sema.c
kern_shutdown.c
kern_sig.c Avoid kernel panic when attaching a process which may not be stopped 2005-12-24 02:59:29 +00:00
kern_subr.c
kern_switch.c Restore KTR_CRITICAL but conditionally compile it in as KTR_SCHED. 2005-12-18 18:10:57 +00:00
kern_sx.c Add a new 'show lock' command to ddb. If the argument has a valid lock 2005-12-13 23:14:35 +00:00
kern_synch.c When checking to see if a process has exceeded its time limit, flag the 2005-11-28 19:09:08 +00:00
kern_syscalls.c
kern_sysctl.c
kern_tc.c
kern_thr.c
kern_thread.c Now SIGCHLD is always queued. 2005-12-09 02:27:55 +00:00
kern_time.c Fix compiling warning on 64 bits system. 2005-12-09 13:16:48 +00:00
kern_timeout.c
kern_umtx.c
kern_uuid.c
kern_xxx.c
ksched.c
link_elf.c Make our ELF64 type definitions match standards. In particular this 2005-12-18 04:52:37 +00:00
link_elf_obj.c Make our ELF64 type definitions match standards. In particular this 2005-12-18 04:52:37 +00:00
linker_if.m
Make.tags.inc
Makefile
makesyscalls.sh
md4c.c
md5c.c
p1003_1b.c
posix4_mib.c
sched_4bsd.c
sched_ule.c Use variable i instead of variable cpus as an index to get correct kseq. 2005-12-27 12:02:03 +00:00
subr_acl_posix1e.c
subr_autoconf.c
subr_blist.c
subr_bus.c
subr_clist.c
subr_clock.c
subr_devstat.c
subr_disk.c
subr_eventhandler.c
subr_hints.c
subr_kdb.c
subr_kobj.c
subr_log.c
subr_mbpool.c
subr_mchain.c
subr_module.c
subr_msgbuf.c
subr_param.c
subr_pcpu.c
subr_power.c
subr_prf.c
subr_prof.c Change the addupc_*() functions to use the uintfptr_t type for pc rather 2005-12-16 22:08:32 +00:00
subr_rman.c
subr_rtc.c
subr_sbuf.c Make sbuf_copyin() return the number of bytes copied on success. 2005-12-23 11:49:53 +00:00
subr_scanf.c
subr_sleepqueue.c
subr_smp.c
subr_stack.c
subr_taskqueue.c Create the taskqueue_fast handler with INTR_MPSAFE so that it doesn't run 2005-12-23 06:18:33 +00:00
subr_trap.c
subr_turnstile.c
subr_unit.c
subr_witness.c Tweak witness handling of lock object to shave 2 pointers off of each 2005-12-05 20:45:24 +00:00
sys_generic.c
sys_pipe.c In pipe_write(): when uiomove() fails, do not spin on it forever. 2005-12-16 18:32:39 +00:00
sys_process.c Avoid kernel panic when attaching a process which may not be stopped 2005-12-24 02:59:29 +00:00
sys_socket.c
syscalls.c Regenerate sysent with new abort2 system call. 2005-12-23 11:58:42 +00:00
syscalls.master Add abort2() systemcall. 2005-12-23 11:54:11 +00:00
sysv_ipc.c
sysv_msg.c
sysv_sem.c
sysv_shm.c
tty.c
tty_compat.c
tty_conf.c
tty_cons.c
tty_pty.c
tty_subr.c
tty_tty.c
uipc_accf.c
uipc_cow.c
uipc_domain.c
uipc_mbuf.c When using m_dup(9) to copy more than MHLEN bytes of data, don't create an 2005-12-14 23:34:26 +00:00
uipc_mbuf2.c
uipc_mqueue.c Replace selwakeuppri with selwakeup, let scheduler figure out 2005-12-16 15:01:16 +00:00
uipc_proto.c
uipc_sem.c
uipc_sockbuf.c Fix a bug in the loop in sonewconn that makes room on the incomplete 2005-11-22 01:55:29 +00:00
uipc_socket.c Fix snderr() to not leak the socket buffer lock if an error occurs in 2005-11-29 23:07:14 +00:00
uipc_socket2.c Fix a bug in the loop in sonewconn that makes room on the incomplete 2005-11-22 01:55:29 +00:00
uipc_syscalls.c
uipc_usrreq.c Fix a bunch of SYSCTL_INT() that should have been SYSCTL_ULONG() to 2005-12-14 22:27:48 +00:00
vfs_acl.c
vfs_aio.c
vfs_bio.c Changes imported from XFS for FreeBSD project: 2005-12-07 03:39:08 +00:00
vfs_cache.c
vfs_cluster.c Changes imported from XFS for FreeBSD project: 2005-12-07 03:39:08 +00:00
vfs_default.c Eradicate caddr_t from the VFS API. 2005-12-14 00:49:52 +00:00
vfs_export.c
vfs_extattr.c Reduce Giant scope a bit, as fdrop() is believed to be MPSAFE. 2005-12-20 00:49:59 +00:00
vfs_hash.c
vfs_init.c
vfs_lookup.c
vfs_mount.c vfs_mount_alloc() always returns 0, but what we really want is newly 2005-12-20 00:43:51 +00:00
vfs_subr.c
vfs_syscalls.c Reduce Giant scope a bit, as fdrop() is believed to be MPSAFE. 2005-12-20 00:49:59 +00:00
vfs_vnops.c Eradicate caddr_t from the VFS API. 2005-12-14 00:49:52 +00:00
vnode_if.src Eradicate caddr_t from the VFS API. 2005-12-14 00:49:52 +00:00