freebsd-skq/sys/kern
bmilekic 49e9cba72e Make m_getm() always return the top of the newly allocated chain, as
opposed to returning the top of the old chain when there was one and
the top of the newly allocated chain if there was no old chain.

Actually, it should be noted that prior to this fix, although the
comment above m_getm() advertised that m_getm() would return the
top of the old chain (if an old chain was being passed in) it
actually [wrongly] was returning the tail mbuf in the old chain
instead.  This is a bug but since the one use of m_getm() in
the tree luckily did not depend on the behavior, it happened
to work out without notice.

Harti Brandt pointed out that the advertised behavior was actually
not the real behavior and so this change makes m_getm() ALWAYS
return the newly allocated chain (and fixes the comment).  This
is less confusing and is the best course of action as then the
caller is always able to have both a reference to the top of
the original chain (because it's passing it in in the call) and
a reference to the newly attached chain.  Although the API is
slightly modified, I don't think that any third-party code uses
m_getm() and if it does, it surely can't be working properly
because the old behavior was bogus.

API bug pointed out by: Harti Brandt <brandt@fokus.fraunhofer.de>
2003-02-14 16:50:13 +00:00
..
bus_if.m
clock_if.m
device_if.m
genassym.sh
imgact_aout.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
imgact_elf32.c
imgact_elf64.c
imgact_elf.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
imgact_gzip.c
imgact_shell.c
inflate.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
init_main.c It seems the extra precautions are no longer needed. 2003-02-13 10:05:20 +00:00
init_sysent.c Some KSE syscalls are MPSAFE. 2003-01-08 04:57:53 +00:00
kern_acct.c
kern_acl.c Bow to the whining masses and change a union back into void *. Retain 2003-01-13 00:33:17 +00:00
kern_alq.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
kern_clock.c A little infrastructure, preceding some upcoming changes 2003-02-08 02:58:16 +00:00
kern_condvar.c - Call sched_sleep() instead of rolling our own in cv_waitq_add(). 2003-01-26 04:00:39 +00:00
kern_conf.c Implement proper bounds-checking and truncation of device names, this has 2003-02-04 11:04:26 +00:00
kern_context.c
kern_descrip.c Don't lock FILEDESC under PROC. 2003-02-11 07:20:52 +00:00
kern_environment.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
kern_event.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
kern_exec.c Reversion of commit by Davidxu plus fixes since applied. 2003-02-01 12:17:09 +00:00
kern_exit.c A little infrastructure, preceding some upcoming changes 2003-02-08 02:58:16 +00:00
kern_fork.c Reversion of commit by Davidxu plus fixes since applied. 2003-02-01 12:17:09 +00:00
kern_idle.c
kern_intr.c Fix crash dumps on ata and scsi. 2003-02-14 13:10:40 +00:00
kern_jail.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
kern_kse.c Reversion of commit by Davidxu plus fixes since applied. 2003-02-01 12:17:09 +00:00
kern_kthread.c
kern_ktr.c
kern_ktrace.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
kern_linker.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
kern_lock.c The lockmanager has to keep track of locks per thread, not per process. 2003-02-05 19:36:58 +00:00
kern_lockf.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
kern_mac.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
kern_malloc.c Under #ifdef DIAGNOSTIC, fill malloc(9) allocations which do not have 2003-02-01 10:07:49 +00:00
kern_mib.c
kern_module.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
kern_mtxpool.c
kern_mutex.c There's absolutely no need for a struct-within-a-struct, so move the 2003-01-21 20:33:27 +00:00
kern_ntptime.c
kern_physio.c Close the remaining user address mapping races for physical 2003-01-20 17:46:48 +00:00
kern_poll.c
kern_proc.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
kern_prot.c Remove mtx_lock_giant from functions which are mp-safe. 2003-02-10 04:42:20 +00:00
kern_resource.c Add an XXX comment noting that getrusage() accesses p_stats->p_ru 2003-02-13 09:53:59 +00:00
kern_sema.c
kern_shutdown.c style. 2003-02-14 12:44:48 +00:00
kern_sig.c Reversion of commit by Davidxu plus fixes since applied. 2003-02-01 12:17:09 +00:00
kern_subr.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
kern_switch.c Reversion of commit by Davidxu plus fixes since applied. 2003-02-01 12:17:09 +00:00
kern_sx.c
kern_synch.c Print a backtrace in case we tsleep from inside of DDB. 2003-02-14 12:44:07 +00:00
kern_syscalls.c
kern_sysctl.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
kern_tc.c Move timecounters notion of frequency to 64 bits. 2003-01-29 11:29:22 +00:00
kern_thread.c Reversion of commit by Davidxu plus fixes since applied. 2003-02-01 12:17:09 +00:00
kern_time.c Split the global timezone structure into two integer fields to 2003-02-03 19:49:35 +00:00
kern_timeout.c Under DIAGNOSTIC, only report expensive timeouts if they are more expensive 2003-02-01 10:06:40 +00:00
kern_uuid.c
kern_xxx.c
ksched.c
link_elf_obj.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
link_elf.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
linker_if.m
Make.tags.inc
Makefile
makesyscalls.sh
md4c.c
md5c.c
p1003_1b.c Use copyout to access user memory. 2003-01-07 20:10:04 +00:00
posix4_mib.c
sched_4bsd.c - Unbreak world. I did not notice that libkvm was still used in some places 2003-01-13 03:42:41 +00:00
sched_ule.c - Enable STRICT_RESCHED until code that dynamically decides on resched 2003-02-10 14:11:23 +00:00
subr_acl_posix1e.c Bow to the whining masses and change a union back into void *. Retain 2003-01-13 00:33:17 +00:00
subr_autoconf.c
subr_blist.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
subr_bus.c Fix comment about what we do when there are no listeners. 2003-01-19 00:34:17 +00:00
subr_clist.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
subr_clock.c Split the global timezone structure into two integer fields to 2003-02-03 19:49:35 +00:00
subr_devstat.c
subr_disk.c NO_GEOM cleanup: remove #ifdef 2003-01-30 12:36:30 +00:00
subr_eventhandler.c
subr_hints.c
subr_kobj.c
subr_log.c
subr_mbuf.c Make m_getm() always return the top of the newly allocated chain, as 2003-02-14 16:50:13 +00:00
subr_mchain.c Make m_getm() always return the top of the newly allocated chain, as 2003-02-14 16:50:13 +00:00
subr_module.c
subr_param.c
subr_pcpu.c
subr_power.c
subr_prf.c Add vsnrprintf() which is just like vsnprintf() but takes a "radix" 2003-02-04 10:00:34 +00:00
subr_prof.c A little infrastructure, preceding some upcoming changes 2003-02-08 02:58:16 +00:00
subr_rman.c Implement rman_get_device 2003-02-12 07:00:59 +00:00
subr_rtc.c Split the global timezone structure into two integer fields to 2003-02-03 19:49:35 +00:00
subr_sbuf.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
subr_scanf.c
subr_smp.c
subr_taskqueue.c
subr_trap.c Reversion of commit by Davidxu plus fixes since applied. 2003-02-01 12:17:09 +00:00
subr_turnstile.c There's absolutely no need for a struct-within-a-struct, so move the 2003-01-21 20:33:27 +00:00
subr_witness.c Add a 'debug.witness_trace' sysctl (and tunable) when DDB is present. 2003-02-13 01:35:56 +00:00
subr_xxx.c
sys_generic.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
sys_pipe.c Use atomic ops to update amountpipekva. Amountpipekva represents the 2003-02-13 19:39:54 +00:00
sys_process.c
sys_socket.c Bow to the whining masses and change a union back into void *. Retain 2003-01-13 00:33:17 +00:00
syscalls.c Some KSE syscalls are MPSAFE. 2003-01-08 04:57:53 +00:00
syscalls.master Add const qualifier to data argument for msgsnd. 2003-01-26 20:09:34 +00:00
sysv_ipc.c It is possible for an active aio to prevent shared memory from being 2003-01-13 23:04:32 +00:00
sysv_msg.c fix warnings 2003-01-26 23:25:00 +00:00
sysv_sem.c Fix two fatal signedness errors introduced when i and j in semop() 2003-01-29 12:30:59 +00:00
sysv_shm.c Bring shm functions closer the the opengroup standards. 2003-01-25 21:33:05 +00:00
tty_compat.c
tty_conf.c
tty_cons.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
tty_pty.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
tty_subr.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
tty_tty.c NODEVFS cleanup: Unifdef. 2003-01-30 12:51:32 +00:00
tty.c Lock the proc around accessing p_siglist in ttycheckoutq() in the 2003-02-10 06:06:46 +00:00
uipc_accf.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
uipc_cow.c
uipc_domain.c
uipc_jumbo.c
uipc_mbuf2.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
uipc_mbuf.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
uipc_proto.c
uipc_sem.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
uipc_sockbuf.c Make the variable types, the sysctl macros and the sysctl handler for 2003-02-03 06:50:59 +00:00
uipc_socket2.c Make the variable types, the sysctl macros and the sysctl handler for 2003-02-03 06:50:59 +00:00
uipc_socket.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
uipc_syscalls.c Break out the bind and connect syscalls to intend to make calling 2003-02-03 17:36:52 +00:00
uipc_usrreq.c Remove vestiges of no longer needed unp_rvnode field. 2003-02-06 01:34:43 +00:00
vfs_acl.c Bow to the whining masses and change a union back into void *. Retain 2003-01-13 00:33:17 +00:00
vfs_aio.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
vfs_bio.c - Add a comment about a race that will happen without Giant. 2003-02-10 22:47:34 +00:00
vfs_cache.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
vfs_cluster.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
vfs_default.c - Claim we're 'fsync' and not 'spec_fsync' in vop_stdfsync. 2003-02-09 12:29:38 +00:00
vfs_export.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
vfs_extattr.c Correct handling of locking for chroot() and chdir() cases: rather 2003-01-31 21:13:25 +00:00
vfs_init.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
vfs_lookup.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
vfs_mount.c Style nit. 2003-02-14 13:30:25 +00:00
vfs_subr.c Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. 2003-01-21 08:56:16 +00:00
vfs_syscalls.c Correct handling of locking for chroot() and chdir() cases: rather 2003-01-31 21:13:25 +00:00
vfs_vnops.c Bow to the whining masses and change a union back into void *. Retain 2003-01-13 00:33:17 +00:00
vnode_if.src