CVS commit: [netbsd-5-1] src/sys/kern

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:42:59 UTC 2015

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

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1979):
sys/kern/kern_synch.c: revision 1.309
sys/kern/kern_exit.c: revisions 1.246, 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
--
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
--
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
--
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


To generate a diff of this commit:
cvs rdiff -u -r1.280.4.3 -r1.280.4.3.6.1 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.214.4.2 -r1.214.4.2.2.1 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.254.2.6 -r1.254.2.6.6.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-5-1] src/sys/kern

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:46:38 UTC 2015

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

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1980):
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.


To generate a diff of this commit:
cvs rdiff -u -r1.289.4.6.2.1 -r1.289.4.6.2.2 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-5-1] src/sys/kern

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:49:19 UTC 2015

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

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1981):
sys/kern/kern_exit.c: revision 1.248
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.


To generate a diff of this commit:
cvs rdiff -u -r1.214.4.2.2.1 -r1.214.4.2.2.2 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-5-1] src/sys/kern

2010-11-21 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Nov 22 02:53:19 UTC 2010

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

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1477):
sys/kern/vfs_wapbl.c: revision 1.38
Wapbl_register_deallocation(): the taken reader lock is not sufficient to
protect wl_dealloc* members.  Take the mutex here and change the lock
requirements of these fields to "writer lock or mutex".
This error lead to file system corruption and "freeing free block" panics.


To generate a diff of this commit:
cvs rdiff -u -r1.3.8.2 -r1.3.8.2.2.1 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-5-1] src/sys/kern

2011-03-06 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Mar  7 04:09:55 UTC 2011

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

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1543):
sys/kern/vfs_wapbl.c: revision 1.27
sys/kern/vfs_wapbl.c: revision 1.28
Turn a KASSERT into a panic.  I don't want us to be randomly
overwriting memory on non-DIAGNOSTIC kernels if resource estimation
fails.
Add dealloccnt to list of things to be considered in the stetson-harrison
decision making algorithm for flushing a wapbl transation.


To generate a diff of this commit:
cvs rdiff -u -r1.3.8.2.2.1 -r1.3.8.2.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-5-1] src/sys/kern

2011-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Mar  7 17:08:18 UTC 2011

Modified Files:
src/sys/kern [netbsd-5-1]: init_sysctl.c

Log Message:
Apply patch (requested by joerg in ticket 1575):
Sanitize arguments before memory allocation.


To generate a diff of this commit:
cvs rdiff -u -r1.149.4.7 -r1.149.4.7.2.1 src/sys/kern/init_sysctl.c

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



CVS commit: [netbsd-5-1] src/sys/kern

2011-03-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Mar 20 21:20:12 UTC 2011

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

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1567):
sys/kern/vfs_syscalls.c: revision 1.415 via patch
Check for bogus flags to access() up front. Otherwise we end up
calling VOP_ACCESS with flags 0 and something asserts deep in the
bowels of kauth. PR 44648 from Taylor Campbell. (I moved the check
earlier relative to the suggested patch.)
Pullup candidate.


To generate a diff of this commit:
cvs rdiff -u -r1.376.4.5 -r1.376.4.5.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-5-1] src/sys/kern

2011-06-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jun 18 16:35:56 UTC 2011

Modified Files:
src/sys/kern [netbsd-5-1]: kern_fork.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #1629):
sys/kern/kern_fork.c: revision 1.181
Inherit proc_t::p_mqueue_cnt on fork().


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.171.12.1 src/sys/kern/kern_fork.c

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



CVS commit: [netbsd-5-1] src/sys/kern

2011-11-19 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Sat Nov 19 22:22:56 UTC 2011

Modified Files:
src/sys/kern [netbsd-5-1]: kern_event.c

Log Message:
Pull up the following revisions(s) (requested by rmind in ticket #1695):
sys/kern/kern_event.c:  revision 1.74

kqueue_register: avoid calling fd_getfile() with filedesc_t::fd_lock held.
Fixes PR/45479 by KOGULE Ryo.


To generate a diff of this commit:
cvs rdiff -u -r1.60.6.2 -r1.60.6.2.2.1 src/sys/kern/kern_event.c

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



CVS commit: [netbsd-5-1] src/sys/kern

2012-02-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Feb  5 12:28:20 UTC 2012

Modified Files:
src/sys/kern [netbsd-5-1]: kern_fork.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #1628):
sys/kern/kern_fork.c: revision 1.184 via patch
fork1: fix stop-on-fork case, lend a correct lock to LWP for LSSTOP state.
Fixes PR/44935.


To generate a diff of this commit:
cvs rdiff -u -r1.171.12.1 -r1.171.12.2 src/sys/kern/kern_fork.c

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



CVS commit: [netbsd-5-1] src/sys/kern

2012-02-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Feb  5 12:30:38 UTC 2012

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

Log Message:
Pull up following revision(s) (requested by rmind in ticket #1718):
sys/kern/vfs_bio.c: revision 1.233
sysctl_dobuf: re-acquire the sysctl lock on retry path.  PR/45827.


To generate a diff of this commit:
cvs rdiff -u -r1.210 -r1.210.10.1 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-5-1] src/sys/kern

2012-03-17 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Mar 17 19:15:12 UTC 2012

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

Log Message:
Pull up following revision(s) (requested by christos in ticket #1741):
sys/kern/kern_sig.c: revision 1.300
kpsignal2: do not make the signal pending twice when tracing the process,
also update a comment and add an assert.  Fixes PR/42309 by Nicolas Joly.


To generate a diff of this commit:
cvs rdiff -u -r1.289.4.6 -r1.289.4.6.2.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-5-1] src/sys/kern

2012-06-03 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sun Jun  3 08:47:36 UTC 2012

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

Log Message:
Pull up revision 1.137 (requested by martin in ticket #1766).

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.119.4.3 -r1.119.4.3.2.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-5-1] src/sys/kern

2015-04-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 24 05:46:33 UTC 2015

Modified Files:
src/sys/kern [netbsd-5-1]: sys_select.c

Log Message:
Pull up following revision(s) (requested by prlw1 in ticket #1957):

sys/kern/sys_select.c   patch

Limit nfds arg to poll() to a large enough value that user programs
cannot allocate indefinite sized blocks of kvm. If the limit is
exceeded, then return EINVAL instead of silently truncating the list.
Addresses PR/17507.
[prlw1, ticket #1957]


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.10.1 src/sys/kern/sys_select.c

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



CVS commit: [netbsd-5-1] src/sys/kern

2014-04-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Apr 16 06:56:03 UTC 2014

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

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1899):
sys/kern/kern_verifiedexec.c1.132

Reorder code to avoid use-after-free on error. From Maxime Villard.


To generate a diff of this commit:
cvs rdiff -u -r1.111.4.1 -r1.111.4.1.6.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-5-1] src/sys/kern

2014-07-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul 14 09:10:18 UTC 2014

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

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1914):
sys/kern/sys_module.c: revision 1.15 via patch
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.8.4.1 -r1.8.4.1.2.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.