CVS commit: [netbsd-6] src/sys/kern

2018-05-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu May  3 15:00:38 UTC 2018

Modified Files:
src/sys/kern [netbsd-6]: uipc_mbuf.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1547):

sys/kern/uipc_mbuf.c: revision 1.211 (via patch)

Modify m_defrag, so that it never frees the first mbuf of the chain. While
here use the given 'flags' argument, and not M_DONTWAIT.

We have a problem with several drivers: they poll an mbuf chain from their
queues and call m_defrag on them, but m_defrag could update the mbuf
pointer, so the mbuf in the queue is no longer valid. It is not easy to
fix each driver, because doing pop+push will reorder the queue, and we
don't really want that to happen.

This problem was independently spotted by me, Kengo, Masanobu, and other
people too it seems (perhaps PR/53218).

Now m_defrag leaves the first mbuf in place, and compresses the chain
only starting from the second mbuf in the chain.

It is important not to compress the first mbuf with hacks, because the
storage of this first mbuf may be shared with other mbufs.


To generate a diff of this commit:
cvs rdiff -u -r1.145.2.1 -r1.145.2.2 src/sys/kern/uipc_mbuf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2017-08-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Aug 19 04:24:24 UTC 2017

Modified Files:
src/sys/kern [netbsd-6]: kern_ktrace.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1484):
sys/kern/kern_ktrace.c: revision 1.171 via patch
Clamp the length we use, not the length we don't.
Avoids uninitialized memory disclosure to userland.
>From Ilja Van Sprundel.


To generate a diff of this commit:
cvs rdiff -u -r1.160.2.1 -r1.160.2.2 src/sys/kern/kern_ktrace.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2017-08-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Aug 19 04:17:11 UTC 2017

Modified Files:
src/sys/kern [netbsd-6]: vfs_getcwd.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1482):
sys/kern/vfs_getcwd.c: revision 1.52
Don't walk off the end of the dirent buffer.
>From Ilja Van Sprundel.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.47.14.1 src/sys/kern/vfs_getcwd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2017-08-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Aug 18 14:53:10 UTC 2017

Modified Files:
src/sys/kern [netbsd-6]: kern_malloc.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1465):
sys/kern/kern_malloc.c: revision 1.146
Avoid integer overflow in kern_malloc(). Reported by Ilja Van Sprundel.


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.138.2.1 src/sys/kern/kern_malloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2017-07-13 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Jul 14 06:18:25 UTC 2017

Modified Files:
src/sys/kern [netbsd-6]: exec_elf.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1438):
sys/kern/exec_elf.c: revision 1.88 via patch
netbsd_elf_signature - look at note segments (phdrs) not note
sections.  They point to the same data in the file, but sections are
for linkers and are not necessarily present in an executable.
The original switch from phdrs to shdrs seems to be just a cop-out to
avoid parsing multiple notes per segment, which doesn't really avoid
the problem b/c sections also can contain multiple notes.


To generate a diff of this commit:
cvs rdiff -u -r1.37.2.2 -r1.37.2.3 src/sys/kern/exec_elf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2017-07-06 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Jul  6 15:20:00 UTC 2017

Modified Files:
src/sys/kern [netbsd-6]: subr_xcall.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1419):
sys/kern/subr_xcall.c: revision 1.19
Fix a race condition of low priority xcall
xc_lowpri and xc_thread are racy and xc_wait may return during/before
executing all xcall callbacks, resulting in a kernel panic at worst.
xc_lowpri serializes multiple jobs by a mutex and a cv. If all xcall
callbacks are done, xc_wait returns and also xc_lowpri accepts a next job.
The problem is that a counter that counts the number of finished xcall
callbacks is incremented *before* actually executing a xcall callback
(see xc_tailp++ in xc_thread). So xc_lowpri accepts a next job before
all xcall callbacks complete and a next job begins to run its xcall callbacks.
Even worse the counter is global and shared between jobs, so if a xcall
callback of the next job completes, the shared counter is incremented,
which confuses wc_wait of the previous job as all xcall callbacks of the
previous job are done and wc_wait of the previous job returns during/before
executing its xcall callbacks.
How to fix: there are actually two counters that count the number of finished
xcall callbacks for low priority xcall for historical reasons (I guess):
xc_tailp and xc_low_pri.xc_donep. xc_low_pri.xc_donep is incremented correctly
while xc_tailp is incremented wrongly, i.e., before executing a xcall callback.
We can fix the issue by dropping xc_tailp and using only xc_low_pri.xc_donep.
PR kern/51632


To generate a diff of this commit:
cvs rdiff -u -r1.13.10.1 -r1.13.10.2 src/sys/kern/subr_xcall.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2016-11-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Nov 11 07:08:05 UTC 2016

Modified Files:
src/sys/kern [netbsd-6]: uipc_usrreq.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1415):
sys/kern/uipc_usrreq.c: revision 1.181
Memory leak, found by Mootja. It is easily triggerable from userland.


To generate a diff of this commit:
cvs rdiff -u -r1.136.8.3 -r1.136.8.4 src/sys/kern/uipc_usrreq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2016-07-13 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Jul 14 06:56:03 UTC 2016

Modified Files:
src/sys/kern [netbsd-6]: kern_softint.c

Log Message:
Pull up following revision(s) (requested by knakahara in ticket #1356):
sys/kern/kern_softint.c: revision 1.42
fix the following softint parallel operation problem.
(0) softint handler "handler A" is established
(1) CPU#X does softint_schedule() for "handler A"
- the softhand_t is set SOFTINT_PENDING flag
- the softhand_t is NOT set SOFTINT_ACTIVE flag yet
(2) CPU#X begins other H/W interrupt processing
(3) CPU#Y does softint_disestablish() for "handler A"
- waits until softhand_t's SOFTINT_ACTIVE of all CPUs is clear
- the softhand_t is set not SOFTINT_ACTIVE but SOFTINT_PENDING,
  so CPU#Y does not wait
- unset the function of "handler A"
(4) CPU#X does softint_execute()
- the function of "handler A" is already clear, so panic


To generate a diff of this commit:
cvs rdiff -u -r1.38.8.1 -r1.38.8.2 src/sys/kern/kern_softint.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2015-11-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Nov 15 20:44:10 UTC 2015

Modified Files:
src/sys/kern [netbsd-6]: kern_exit.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1336):
sys/kern/kern_exit.c: revision 1.248
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.
XXX Pull-ups for -7, -6{,-0,-1} and -5{,-0,-1,-2}


To generate a diff of this commit:
cvs rdiff -u -r1.236.2.4 -r1.236.2.5 src/sys/kern/kern_exit.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2015-11-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Nov 15 20:40:20 UTC 2015

Modified Files:
src/sys/kern [netbsd-6]: kern_sig.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1334):
sys/kern/kern_sig.c: revision 1.321
When delivering a signal, it's possible that the process's state in
p_stat is SACTIVE yet p_sflag is PS_STOPPING (while waiting for other
lwp's to stop).  In that case, we don't want to adjust the parent's
p_nstopchild count.
Found by Robert Elz.
XXX Pullups to: NetBSD-7, -6{,-0,-1}, and -5{,-0,-1,-2}


To generate a diff of this commit:
cvs rdiff -u -r1.316 -r1.316.8.1 src/sys/kern/kern_sig.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2015-11-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Nov 15 20:37:04 UTC 2015

Modified Files:
src/sys/kern [netbsd-6]: kern_exec.c kern_exit.c kern_synch.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1333):
sys/kern/kern_exec.c: revision 1.420
sys/kern/kern_synch.c: revision 1.309
sys/kern/kern_exit.c: revision 1.246
sys/kern/kern_exit.c: revision 1.247
sys/kern/kern_exec.c: revision 1.419
In execve_runproc(), update the p_waited entry for the process being
moved to SSTOP state, not for its parent.  (It is correct to update
the parent's p_nstopchild count.)  If the value is not already zero,
it could prevent its parent from waiting for the process.
Fixes PR kern/50298
Pullups will be requested for:
NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
When clearing out the scheduler queues during system shutdown, we move
all processes to the SSTOP state.  Make sure we update each process's
p_waited and the parents' p_nstopchild counters to maintain consistent
values.  Should not make any real difference this late in the shutdown
process, but we should still be consistent just in case.
Fixes PR kern/50318
Pullups will be requested for:
NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
Currently, if a process is exiting and its parent has indicated no intent
of reaping the process (nor any other children), the process wil get
reparented to init.  Since the state of the exiting process at this point
is SDEAD, proc_reparent() will not update either the old or new parent's
p_nstopchild counters.
This change causes both old and new parents to be properly updated.
Fixes PR kern/50300
Pullups will be requested for:
NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
For processes marked with PS_STOPEXIT, update the process's p_waited
value, and update its parent's p_nstopchild value when marking the
process's p_stat to SSTOP.  The process needed to be SACTIVE to get
here, so this transition represents an additional process for which
the parent needs to wait.
Fixes PR kern/50308
Pullups will be requested for:
NetBSD-7, -6, -6-0, -6-1, -5, -5-0, -5-1, and -5-2
In spawn_return() we temporarily move the process state to SSTOP, but
without updating its p_waited value or its parent's p_nstopchild
counter.  Later, we restore the original state, again without any
adjustment of the related values.  This leaves a relatively short
window when the values are inconsistent and could interfere with the
proper operation of sys_wait() for the parent (if it manages to be
scheduled;  it's not totally clear what, if anything, prevents
scheduling/execution of the parent).
If during this window, any of the checks being made result in an
error, we call exit1() which will eventually migrate the process's
state to SDEAD (with an intermediate transition to SDYING).  At
this point the other variables get updated, and we finally restore
a consistent state.
This change updates the p_waited and parent's p_nstopchild at each
step to eliminate any windows during which the values could lead to
incorrect decisions.
Fixes PR kern/50330
Pullups will be requested for NetBSD-7, -6, -6-0, and -6-1


To generate a diff of this commit:
cvs rdiff -u -r1.339.2.9 -r1.339.2.10 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.236.2.3 -r1.236.2.4 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.297.2.1 -r1.297.2.2 src/sys/kern/kern_synch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2015-11-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Nov 15 17:36:32 UTC 2015

Modified Files:
src/sys/kern [netbsd-6]: sys_pset.c

Log Message:
Pull up following revision(s) (requested by oster in ticket #1320):
sys/kern/sys_pset.c: revision 1.19
Don't forget to unlock the LWP.
ok rmind@


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.17.8.1 src/sys/kern/sys_pset.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2014-11-03 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Nov  3 15:27:46 UTC 2014

Modified Files:
src/sys/kern [netbsd-6]: kern_rndpool.c kern_rndq.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1118):
sys/kern/kern_rndq.c: revision 1.27
sys/kern/kern_rndpool.c: revision 1.7
buf is not guaranteed to be aligned; don't *(uint32_t *) it in kern_rndq.c.
done is not guaranteed to be aligned; don't *(uint32_t *) it in kern_rndq.c.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/kern/kern_rndpool.c
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/kern/kern_rndq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2014-10-26 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Oct 27 05:41:21 UTC 2014

Modified Files:
src/sys/kern [netbsd-6]: subr_pcq.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1132):
sys/kern/subr_pcq.c: revision 1.7
__HAVE_ATOMIC_AS_MEMBAR is spelled with two leading underscores.
This underscores the need to replace this error-prone cpp API by
unconditionally defined {pre,post}atomic_membar_*.
This change should only remove unnecessary membar_producers on x86.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/kern/subr_pcq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2014-07-13 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 14 06:32:31 UTC 2014

Modified Files:
src/sys/kern [netbsd-6]: sys_module.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1098):
sys/kern/sys_module.c: revision 1.15
Fix a user-controlled memory allocation. kmem_alloc(0) will panic the system.
ok christos@


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.8.1 src/sys/kern/sys_module.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2014-07-13 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 14 06:21:22 UTC 2014

Modified Files:
src/sys/kern [netbsd-6]: kern_core.c

Log Message:
Pull up following revision(s) (requested by maxt in ticket #1097):
sys/kern/kern_core.c: revision 1.23
Fix a read-beyond-end string read.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.8.1 src/sys/kern/kern_core.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2014-05-21 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed May 21 21:04:31 UTC 2014

Modified Files:
src/sys/kern [netbsd-6]: kern_exit.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1061):
sys/kern/kern_exit.c: revision 1.244
Free pid for linux processes. Reported by Mark Davies, fix by dsl@
XXX: pullup 6


To generate a diff of this commit:
cvs rdiff -u -r1.236.2.2 -r1.236.2.3 src/sys/kern/kern_exit.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2014-05-21 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed May 21 20:34:38 UTC 2014

Modified Files:
src/sys/kern [netbsd-6]: subr_pool.c

Log Message:
Pull up following revision(s) (requested by abs in ticket #1054):
sys/kern/subr_pool.c: revision 1.202
Ensure pool_head is non static - for "vmstat -i"


To generate a diff of this commit:
cvs rdiff -u -r1.194.2.1 -r1.194.2.2 src/sys/kern/subr_pool.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2014-04-21 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Apr 21 10:00:11 UTC 2014

Modified Files:
src/sys/kern [netbsd-6]: kern_exec.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1048):
sys/kern/kern_exec.c: revision 1.403
'error' is not set on failure. This is a true bug: everything is freed
and unlocked while zero is returned. Since there's no error, execve_runproc()
will get called and will try to use those freed things.


To generate a diff of this commit:
cvs rdiff -u -r1.339.2.8 -r1.339.2.9 src/sys/kern/kern_exec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2014-03-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Mar 18 09:21:30 UTC 2014

Modified Files:
src/sys/kern [netbsd-6]: kern_verifiedexec.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1034):
sys/kern/kern_verifiedexec.c: revision 1.132
Reorder code to avoid use-after-free on error. From Maxime Villard


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.128.4.1 src/sys/kern/kern_verifiedexec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2014-02-14 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Feb 14 23:21:20 UTC 2014

Modified Files:
src/sys/kern [netbsd-6]: exec_elf.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1028):
sys/kern/exec_elf.c: revision 1.55
Fix memory leak.
ok christos@ agc@


To generate a diff of this commit:
cvs rdiff -u -r1.37.2.1 -r1.37.2.2 src/sys/kern/exec_elf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-12-14 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Dec 14 19:36:33 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: uipc_syscalls.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #996):
sys/kern/uipc_syscalls.c: revision 1.163
PR/47591: Michael Plass: If the unix socket is closed before accept,
unp->unp_conn will be NULL in PRU_ACCEPT, as called from
sys_accept->so_accept. This will cause the usrreq to return with
no error, leaving the mbuf gotten from m_get() with an uninitialized
length, containing junk from a previous call. Initialize m_len to
be 0 to handle this case. This is yet another reason why Beverly's
idea of setting m_len = 0 in m_get() makes a lot of sense. Arguably
this could be an error, since the data we return now has 0 family
and length.


To generate a diff of this commit:
cvs rdiff -u -r1.154.2.4 -r1.154.2.5 src/sys/kern/uipc_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-11-25 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Nov 25 08:26:33 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: uipc_socket.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #988):
sys/kern/uipc_socket.c: revision 1.220
PR/48098: Brian Marcotte: panic: kernel diagnostic assertion "cred != NULL":
Fix from Michael van Elst, tcpdrop crashes kernel on ebryonic connections.


To generate a diff of this commit:
cvs rdiff -u -r1.209.2.3 -r1.209.2.4 src/sys/kern/uipc_socket.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-07-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 29 06:00:35 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: subr_disk_mbr.c

Log Message:
Pull up following revision(s) (requested by matt in ticket #910):
sys/kern/subr_disk_mbr.c: revision 1.46
If the MBR is a protective MBR, don't bother looking at it.


To generate a diff of this commit:
cvs rdiff -u -r1.42.8.1 -r1.42.8.2 src/sys/kern/subr_disk_mbr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-05-11 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat May 11 21:43:06 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: kern_drvctl.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #883):
sys/kern/kern_drvctl.c: revision 1.34
Fix memory leak on the following cases when device attached or detached:
  - No one open drvctl.
  - kmem_alloc() failed in devmon_insert().
XXX pullup to both netbsd-5 and netbsd-6.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.32.8.1 src/sys/kern/kern_drvctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-04-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Apr 20 10:17:55 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: subr_kmem.c

Log Message:
Pull up following revision(s) (requested by para in ticket #876):
sys/kern/subr_kmem.c: revision 1.47
addresses PR/47512
properly return NULL for failed allocations not 0x8 with size checks
enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.42.2.2 -r1.42.2.3 src/sys/kern/subr_kmem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-04-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Apr 20 10:05:23 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: subr_xcall.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #868):
sys/kern/subr_xcall.c: revision 1.15
xc_highpri: fix assert.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.10.1 src/sys/kern/subr_xcall.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-03-28 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar 29 00:44:29 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: subr_cprng.c

Log Message:
Pull up following revision(s) (requested by tls in ticket #859):
sys/kern/subr_cprng.c: revision 1.16
Re-fix 'fix' for SA-2013-003.  Because the original fix evaluated a flag
backwards, in low-entropy conditions there was a time interval in which
/dev/urandom could still output bits on an unacceptably short key.  Output
from /dev/random was *NOT* impacted.
Eliminate the flag in question -- it's safest to always fill the requested
key buffer with output from the entropy-pool, even if we let the caller
know we couldn't provide bytes with the full entropy it requested.
Advisory will be updated soon with a full worst-case analysis of the
/dev/urandom output path in the presence of either variant of the
SA-2013-003 bug.  Fortunately, because a large amount of other input
is mixed in before users can obtain any output, it doesn't look as dangerous
in practice as I'd feared it might be.


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.7 -r1.5.2.8 src/sys/kern/subr_cprng.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-02-18 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 18 22:00:49 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: uipc_syscalls.c uipc_usrreq.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #831):
sys/kern/uipc_usrreq.c: revision 1.141
sys/kern/uipc_syscalls.c: revision 1.159
Fix some screw cases in cmsg file descriptor passing.
- Don't leave garbage in the control buffer if allocating file
descriptors fails in unp_externalize.
- Scrub the space between CMSG_LEN and CMSG_SPACE to avoid kernel
memory disclosure in unp_externalize.
- Don't read past cmsg_len when closing file descriptors that
couldn't get delivered, in free_rights.
ok christos


To generate a diff of this commit:
cvs rdiff -u -r1.154.2.3 -r1.154.2.4 src/sys/kern/uipc_syscalls.c
cvs rdiff -u -r1.136.8.2 -r1.136.8.3 src/sys/kern/uipc_usrreq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-02-14 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Thu Feb 14 22:13:59 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: uipc_socket.c uipc_syscalls.c

Log Message:
Pull up revisions:
  src/sys/kern/uipc_socket.c revision 1.213
  src/sys/kern/uipc_syscalls.c revision 1.160
(requested by christos in ticket #822).

PR/47569: Valery Ushakov: SOCK_NONBLOCK does not work because it does not
set SS_NBIO.
XXX: there are too many flags that mean the same thing in too many places=
,
and too many flags that mean the same thing and are different.


To generate a diff of this commit:
cvs rdiff -u -r1.209.2.1 -r1.209.2.2 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.154.2.2 -r1.154.2.3 src/sys/kern/uipc_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-02-11 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Feb 11 20:42:32 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: subr_pserialize.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #811):
sys/kern/subr_pserialize.c: revision 1.7
- pserialize_switchpoint: check for passing twice, not more than needed.
- pserialize_perform: avoid a possible race with softint handler.
Reported by hannken@.


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.1 -r1.5.2.2 src/sys/kern/subr_pserialize.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:28:07 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: kern_rndq.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #790):
sys/kern/kern_rndq.c: revision 1.7
  Set resource limit. The rnd_process_events() function is called every tick
and process the sample queue. Without limitation, if a lot of rnd_add_*()
are called, all kernel memory may be eaten up.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/kern/kern_rndq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-02-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb  8 20:22:03 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: subr_vmem.c

Log Message:
Pull up following revision(s) (requested by para in ticket #789):
sys/kern/subr_vmem.c: revision 1.81
sys/kern/subr_vmem.c: revision 1.77
fix a lock order reversal during global boundary tag refill.
thanks to chuq@
xxx: request pullup
Fix release of vmem_btag_lock (don't release twice in error path)


To generate a diff of this commit:
cvs rdiff -u -r1.72.2.1 -r1.72.2.2 src/sys/kern/subr_vmem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-01-26 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 26 21:35:23 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: subr_cprng.c

Log Message:
Pull up following revision(s) (requested by tls in ticket #800):
sys/kern/subr_cprng.c: revision 1.15
Fix a security issue: when we are reseeding a PRNG seeded early in boot
before we had ever had any entropy, if something else has consumed the
entropy that triggered the immediate reseed, we can reseed with as little
as sizeof(int) bytes of entropy.


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.6 -r1.5.2.7 src/sys/kern/subr_cprng.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-01-07 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Jan  7 16:53:19 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: uipc_syscalls.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #778):
sys/kern/uipc_syscalls.c: revision 1.157
sys/kern/uipc_syscalls.c: revision 1.158
If an untraced process sleeps in recvmsg/sendmsg, the syscall does not
allocate an iov structure for ktrace. When tracing is then enabled
and the process wakes up, it crashes the kernel.
Undo the last commit which introduced this error path.
Avoid the mentioned kmem_alloc assertion by adding a sanity check analog
to similar code in sys_generic.c for I/O on file handles instead of
sockets.
This also causes the syscall to return EMSGSIZE if the msg_iovlen member
of the msg structure is less than or equal to 0, as defined in
recvmsg(2)/sendmsg(2).
The sanity check prevented messages that carry only ancillary data.


To generate a diff of this commit:
cvs rdiff -u -r1.154.2.1 -r1.154.2.2 src/sys/kern/uipc_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2013-01-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Jan  2 23:23:15 UTC 2013

Modified Files:
src/sys/kern [netbsd-6]: vfs_wapbl.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #758):
sys/kern/vfs_wapbl.c: revision 1.53
sys/kern/vfs_wapbl.c: revision 1.54
wapbl_biodone: Release the buffer before reclaiming the log.
   wapbl_flush() may wait for the log to become empty and
   all buffers should be unbusy before it returns.
Try to coalesce writes to the journal in MAXPHYS sized and aligned blocks.
Speeds up wapbl_flush() on raid5 by a factor of 3-4.
Discussed on tech-kern.
Needs pullup to NetBSD-6.


To generate a diff of this commit:
cvs rdiff -u -r1.51.2.1 -r1.51.2.2 src/sys/kern/vfs_wapbl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-11-24 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Nov 24 20:58:00 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: subr_cprng.c

Log Message:
Pull up revision 1.14 (requested by msaitoh in ticket #714).

Pass correct wait channel string.


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.5 -r1.5.2.6 src/sys/kern/subr_cprng.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-11-24 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Nov 24 20:50:16 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: kern_runq.c

Log Message:
Pull up revision 1.34 (requested by para in ticket #712).

change sched_upreempt_pri default to 0 as discussed on tech-kern@
should improve interactive performance on SMP machines
as user preemption happens immediately in x-cpu wakeup case now


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.33.4.1 src/sys/kern/kern_runq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-11-23 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Nov 23 16:16:56 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: kern_rndq.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #696):
sys/kern/kern_rndq.c: revision 1.6
Fix hardware RNGs -- accept their entropy estimates *rather than* using
timestamps to estimate the entropy of their input.  I'd accidentally
made it so no entropy was ever counted from them at all.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/kern/kern_rndq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-11-22 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Nov 22 18:50:23 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: vfs_vnode.c vfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #692):
sys/kern/vfs_vnode.c: revision 1.17
sys/kern/vfs_vnops.c: revision 1.186
Bring back Manuel Bouyers patch to resolve races between vget() and vrelel()
resulting in vget() returning dead vnodes.
It is impossible to resolve these races in vn_lock().
Needs pullup to NetBSD-6.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.2.1 src/sys/kern/vfs_vnode.c
cvs rdiff -u -r1.183.8.1 -r1.183.8.2 src/sys/kern/vfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-11-20 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Nov 20 21:32:24 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: kern_exec.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #670):
sys/kern/kern_exec.c: revision 1.358
If you are going to dick around with p_stat, remember to put it
back so that spawn processes with attributes don't end up starting
up stopped!
XXX: pullup to 6.


To generate a diff of this commit:
cvs rdiff -u -r1.339.2.5 -r1.339.2.6 src/sys/kern/kern_exec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-10-09 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Oct  9 23:45:21 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: uipc_usrreq.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #593):
sys/kern/uipc_usrreq.c: revision 1.140
Avoid crash dereferencing a NULL fp in fd_affix() in unp_externalize
caused by the sequence of passing two fd's with two sendmsg()'s,
then doing a read() and a recvmsg(). The read() calls dom_dispose()
which discards both messages in the mbuf, and sets the fp's in the
array to NULL. Linux dequeues only one message per read() so the
second recvmsg() gets the fd from the second message.  This fix
just avoids the NULL pointer de-reference, making the second
recvmsg() to fail. It is dubious to pass fd's with stream sockets
and expect mixing read() and recvmsg() to work. Plus processing
one control message per read() changes the current semantics and
should be examined before applied. In addition there is a race between
dom_externalize() and dom_dispose(): what happens in a multi-threaded
network stack when one thread disposes where the other externalizes
the same array?
NB: Pullup to 6.


To generate a diff of this commit:
cvs rdiff -u -r1.136.8.1 -r1.136.8.2 src/sys/kern/uipc_usrreq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-08-20 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug 20 19:15:36 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: tty.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #516):
sys/kern/tty.c: revision 1.251
sys/kern/tty.c: revision 1.252
sys/kern/tty.c: revision 1.253
Better (not racy fix) from Paul Goyette.
Use the queue of the tty not garbage from the stack (Paul Goyette)
PR/46780: Dennis Ferguson: Take the easy way out and return EBUSY when changing
the queue size if the output queue is not empty. Other solutions seemed too
complex/fragile.


To generate a diff of this commit:
cvs rdiff -u -r1.249.8.1 -r1.249.8.2 src/sys/kern/tty.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-08-19 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Aug 19 17:36:42 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: kern_synch.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #513):
sys/kern/kern_synch.c: revision 1.303
PR/46811: Tetsua Isaki: Don't handle cpu limits when runtime is negative.


To generate a diff of this commit:
cvs rdiff -u -r1.297 -r1.297.2.1 src/sys/kern/kern_synch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-08-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 12 19:02:33 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: subr_disk_mbr.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #482):
sys/kern/subr_disk_mbr.c: revision 1.43
Apply workaround for installcd mountroot failure on some i386 machines


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.42.8.1 src/sys/kern/subr_disk_mbr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-08-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Aug 12 14:45:31 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: subr_kmem.c

Log Message:
Pull up following revision(s) (requested by para in ticket #486):
sys/kern/subr_kmem.c: revision 1.46 (via patch)
split allocation lookup table to decrease overall memory used
making allocator more flexible for allocations larger then 4kb
move the encoded "size" under DEBUG back to the begining of allocated
chunk


To generate a diff of this commit:
cvs rdiff -u -r1.42.2.1 -r1.42.2.2 src/sys/kern/subr_kmem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-07-20 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jul 21 00:00:14 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: sys_sig.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #430):
sys/kern/sys_sig.c: revision 1.38
>From Roger Pau Monne: kill(2) called for a zombie process should return 0,
according to:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/kill.html


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.36.6.1 src/sys/kern/sys_sig.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-07-20 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 20 23:10:07 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: uipc_syscalls.c

Log Message:
Pull up following revision(s) (requested by njoly in ticket #423):
sys/kern/uipc_syscalls.c: revision 1.156
Avoid kmem_alloc KASSERT for 0 byte allocation, when tracing processes
that use empty messages with sendmsg/recvmsg.


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.154.2.1 src/sys/kern/uipc_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-07-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Jul 12 17:11:17 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: uipc_socket.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #408):
sys/kern/uipc_socket.c: revision 1.211
in soreceive(), handle uios larger than 31 bits.
fixes the remaining problem in PR 43240.


To generate a diff of this commit:
cvs rdiff -u -r1.209 -r1.209.2.1 src/sys/kern/uipc_socket.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-06-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jun 12 17:16:28 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: vfs_bio.c

Log Message:
Pull up following revision(s) (requested by dsl in ticket #307):
sys/kern/vfs_bio.c: revision 1.239
Use separate temporaries for the 'int' percentage and the 'long'
  water marks.
Previous paniced on sparc64 due to a misaligned copy.


To generate a diff of this commit:
cvs rdiff -u -r1.236.2.1 -r1.236.2.2 src/sys/kern/vfs_bio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-06-11 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Jun 11 23:20:38 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: uipc_usrreq.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #304):
sys/kern/uipc_usrreq.c: revision 1.137
Stopgap fix for PR kern/46463: disallow passing of kqueue descriptors
via SCM_RIGHT anxiliary socket messages.


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.136.8.1 src/sys/kern/uipc_usrreq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-05-19 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat May 19 15:29:21 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: vfs_subr.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #267):
sys/kern/vfs_subr.c: revision 1.435
remove a bogus optimization introduced in the previous change.
fixes hangs in the rump/rumpvfs/t_etfs test.


To generate a diff of this commit:
cvs rdiff -u -r1.432.2.1 -r1.432.2.2 src/sys/kern/vfs_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-05-19 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat May 19 15:01:36 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: vfs_mount.c vfs_syscalls.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #259):
sys/kern/vfs_syscalls.c: revision 1.456
sys/kern/vfs_mount.c: revision 1.14
sys/kern/vfs_syscalls.c: revision 1.452
sys/kern/vfs_syscalls.c: revision 1.453
sys/kern/vfs_syscalls.c: revision 1.454
Do not use vp after mount_domount() call as it sets it to NULL on success.
This fixes a panic when starting extended attributes.
Fix mount -o extattr : previous patch fixed a panic but caused operation
to happen on the mount point instead of the mounted filesystem.
Fix the extattr start fix. Looking up the filesystemroot vnode again
does not seems to be reliable. Instead save it before mount_domount()
sets it to NULL.
Move VFS_EXTATTRCTL to mount_domount().  This makes the
fs/puffs/t_fuzz:mountfuzz7, fs/puffs/t_fuzz:mountfuzz8,
and fs/zfs/t_zpool:create tests pass again.  Patch from
manu, discussed on tech-kern and committed at his request.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.6.1 src/sys/kern/vfs_mount.c
cvs rdiff -u -r1.449.2.1 -r1.449.2.2 src/sys/kern/vfs_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-05-17 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu May 17 18:12:13 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: vfs_syscalls.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #246):
sys/kern/vfs_syscalls.c: revision 1.455
do_open: move pathbuf destruction to the callers, thus simplify and fix a
memory leak on error path.


To generate a diff of this commit:
cvs rdiff -u -r1.449 -r1.449.2.1 src/sys/kern/vfs_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-04-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Apr 16 15:28:19 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: kern_exec.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #181):
sys/kern/kern_exec.c: revision 1.350
Fix leak in a posix_spawn error path, from Greg Oster.


To generate a diff of this commit:
cvs rdiff -u -r1.339.2.4 -r1.339.2.5 src/sys/kern/kern_exec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-04-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Apr 12 17:15:23 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: vfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #179):
sys/kern/vfs_vnops.c: revision 1.184
Fix vn_lock() to return an invalid (dead, clean) vnode
only if the caller requested it by setting LK_RETRY.
Should fix PR #46221: Kernel panic in NFS server code


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.183.8.1 src/sys/kern/vfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-03-22 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Mar 22 22:56:55 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: kern_sysctl.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #135):
sys/kern/kern_sysctl.c: revision 1.234
Fix query of IMMEDIATE bool values (copy & pasto).


To generate a diff of this commit:
cvs rdiff -u -r1.233 -r1.233.4.1 src/sys/kern/kern_sysctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-03-19 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Mar 19 23:23:11 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: tty.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #128):
sys/kern/tty.c: revision 1.250
PR/41673: Stathis Kamperis: tcsetpgrp returns EINVAL, but should return EPERM.


To generate a diff of this commit:
cvs rdiff -u -r1.249 -r1.249.8.1 src/sys/kern/tty.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-03-10 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Mar 10 16:49:01 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: kern_exec.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #107):
sys/kern/kern_exec.c: revision 1.345
sys/kern/kern_exec.c: revision 1.346
Make sure the child of a posix_spawn operation is not preempted during
the times when it does not have any vm_space.
Should fix PR kern/46153.
Remove a KPREEMPT_ENABLE() in an error path I overlooked in the previous
change - pointed out by Manuel Bouyer.
While there, add a KASSERT() to make sure we have preemption enabled in
the success case.


To generate a diff of this commit:
cvs rdiff -u -r1.339.2.2 -r1.339.2.3 src/sys/kern/kern_exec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-6] src/sys/kern

2012-02-22 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Feb 22 18:43:35 UTC 2012

Modified Files:
src/sys/kern [netbsd-6]: kern_exec.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #17):
sys/kern/kern_exec.c: revision 1.342
sys/kern/kern_exec.c: revision 1.343
sys/kern/kern_exec.c: revision 1.344
Posix spawn fixes:
- split the file actions allocation and freeing into separate functions
- use pnbuf
- don't play games with pointers (partially freeing stuff etc), only check
  fa and sa and free as needed using the same code.
- use copyinstr properly
- KM_SLEEP allocation can't fail
- if path allocation failed midway, we would be possibily freeing
  userland strings.
- use sizeof(*var) instead sizeof(type)
fix fae free'ing, from enami.
keep track of the original array length so we can pass it to kmem_free, from
enami


To generate a diff of this commit:
cvs rdiff -u -r1.339.2.1 -r1.339.2.2 src/sys/kern/kern_exec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.