CVS commit: src/sys/arch/mips/mips

2016-12-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Dec 22 07:56:38 UTC 2016

Modified Files:
src/sys/arch/mips/mips: mips_machdep.c

Log Message:
fix lp64 kvm access for many kernel addresses.
in mm_md_kernacc() allow an address if it matches MIPS_KSEG0_P().

now a static n64 kvm-using binary runs sanely on an n64 kernel.
(dynamic n64 has problems with non-trivial programs.)

ok matt@.


To generate a diff of this commit:
cvs rdiff -u -r1.274 -r1.275 src/sys/arch/mips/mips/mips_machdep.c

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

Modified files:

Index: src/sys/arch/mips/mips/mips_machdep.c
diff -u src/sys/arch/mips/mips/mips_machdep.c:1.274 src/sys/arch/mips/mips/mips_machdep.c:1.275
--- src/sys/arch/mips/mips/mips_machdep.c:1.274	Sat Jul 30 05:55:34 2016
+++ src/sys/arch/mips/mips/mips_machdep.c	Thu Dec 22 07:56:38 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_machdep.c,v 1.274 2016/07/30 05:55:34 matt Exp $	*/
+/*	$NetBSD: mips_machdep.c,v 1.275 2016/12/22 07:56:38 mrg Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -111,7 +111,7 @@
  */
 
 #include 			/* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.274 2016/07/30 05:55:34 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.275 2016/12/22 07:56:38 mrg Exp $");
 
 #define __INTR_PRIVATE
 #include "opt_cputype.h"
@@ -2427,7 +2427,8 @@ mm_md_kernacc(void *ptr, vm_prot_t prot,
 	mips_round_page(MSGBUFSIZE))) {
 		return EFAULT;
 	}
-	if (MIPS_XKSEG_P(v) && v < MIPS_KSEG0_START) {
+	if (MIPS_KSEG0_P(v) ||
+	(MIPS_XKSEG_P(v) && v < MIPS_KSEG0_START)) {
 		*handled = true;
 		return 0;
 	}



CVS commit: src/sys/netinet

2016-12-21 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Thu Dec 22 04:54:54 UTC 2016

Modified Files:
src/sys/netinet: ip_encap.c

Log Message:
pserialize_perform() is required *after* PSLIST_WRITER_REMOVE.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/netinet/ip_encap.c

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

Modified files:

Index: src/sys/netinet/ip_encap.c
diff -u src/sys/netinet/ip_encap.c:1.61 src/sys/netinet/ip_encap.c:1.62
--- src/sys/netinet/ip_encap.c:1.61	Mon Jul  4 04:40:13 2016
+++ src/sys/netinet/ip_encap.c	Thu Dec 22 04:54:54 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_encap.c,v 1.61 2016/07/04 04:40:13 knakahara Exp $	*/
+/*	$NetBSD: ip_encap.c,v 1.62 2016/12/22 04:54:54 knakahara Exp $	*/
 /*	$KAME: ip_encap.c,v 1.73 2001/10/02 08:30:58 itojun Exp $	*/
 
 /*
@@ -68,7 +68,7 @@
 #define USE_RADIX
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ip_encap.c,v 1.61 2016/07/04 04:40:13 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_encap.c,v 1.62 2016/12/22 04:54:54 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mrouting.h"
@@ -966,12 +966,7 @@ encap_detach(const struct encaptab *cook
 	if (p == NULL)
 		return ENOENT;
 
-#ifndef USE_RADIX
-	/*
-	 * pserialize_perform(encaptab.psz) is already done in encap_remove().
-	 */
 	pserialize_perform(encaptab.psz);
-#endif
 	psref_target_destroy(>psref,
 	encaptab.elem_class);
 	if (!ep->func) {



CVS commit: src/sys

2016-12-21 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Dec 22 03:46:51 UTC 2016

Modified Files:
src/sys/net: if.h
src/sys/netinet6: nd6.c

Log Message:
Remove assertion that the lock isn't held

It's useless in this case, because without it we can know that
the lock is held or not on a next lock acquisition and even more
if LOCKDEBUG is enabled a failure on the acquisition will provide
useful information for debugging while an assertion failure will
provide just the fact that the assertion failed.


To generate a diff of this commit:
cvs rdiff -u -r1.232 -r1.233 src/sys/net/if.h
cvs rdiff -u -r1.222 -r1.223 src/sys/netinet6/nd6.c

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

Modified files:

Index: src/sys/net/if.h
diff -u src/sys/net/if.h:1.232 src/sys/net/if.h:1.233
--- src/sys/net/if.h:1.232	Tue Dec 13 02:05:48 2016
+++ src/sys/net/if.h	Thu Dec 22 03:46:51 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.h,v 1.232 2016/12/13 02:05:48 ozaki-r Exp $	*/
+/*	$NetBSD: if.h,v 1.233 2016/12/22 03:46:51 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -510,8 +510,6 @@ if_is_link_state_changeable(struct ifnet
 	KASSERT(rw_read_held((ifp)->if_afdata_lock))
 #define	IF_AFDATA_WLOCK_ASSERT(ifp)	\
 	KASSERT(rw_write_held((ifp)->if_afdata_lock))
-#define	IF_AFDATA_UNLOCK_ASSERT(ifp)	\
-	KASSERT(!rw_lock_held((ifp)->if_afdata_lock))
 
 /*
  * Output queues (ifp->if_snd) and internetwork datagram level (pup level 1)

Index: src/sys/netinet6/nd6.c
diff -u src/sys/netinet6/nd6.c:1.222 src/sys/netinet6/nd6.c:1.223
--- src/sys/netinet6/nd6.c:1.222	Wed Dec 21 08:47:02 2016
+++ src/sys/netinet6/nd6.c	Thu Dec 22 03:46:51 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6.c,v 1.222 2016/12/21 08:47:02 ozaki-r Exp $	*/
+/*	$NetBSD: nd6.c,v 1.223 2016/12/22 03:46:51 ozaki-r Exp $	*/
 /*	$KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.222 2016/12/21 08:47:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.223 2016/12/22 03:46:51 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -1146,7 +1146,6 @@ nd6_is_addr_neighbor(const struct sockad
 	}
 	ND6_UNLOCK();
 
-	IF_AFDATA_UNLOCK_ASSERT(ifp);
 	if (nd6_is_new_addr_neighbor(addr, ifp))
 		return 1;
 



CVS commit: src/usr.sbin/ac

2016-12-21 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec 21 22:49:15 UTC 2016

Modified Files:
src/usr.sbin/ac: ac.8

Log Message:
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/ac/ac.8

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

Modified files:

Index: src/usr.sbin/ac/ac.8
diff -u src/usr.sbin/ac/ac.8:1.17 src/usr.sbin/ac/ac.8:1.18
--- src/usr.sbin/ac/ac.8:1.17	Wed Dec 21 17:45:07 2016
+++ src/usr.sbin/ac/ac.8	Wed Dec 21 22:49:14 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: ac.8,v 1.17 2016/12/21 17:45:07 abhinav Exp $
+.\" $NetBSD: ac.8,v 1.18 2016/12/21 22:49:14 wiz Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -72,7 +72,8 @@ Display the connect times in 24 hour chu
 .It Fl p
 Display individual user totals.
 .It Fl t Ar tty
-Only do accounting logins on certain ttys.  The
+Only do accounting logins on certain ttys.
+The
 .Ar tty
 specification can start with
 .Ql \&!
@@ -102,8 +103,8 @@ system.
 The default
 .Pa wtmp
 file is an infinitely increasing file
-unless frequently truncated.  This is normally
-done by the daily daemon scripts scheduled by
+unless frequently truncated.
+This is normally done by the daily daemon scripts scheduled by
 .Xr cron 8 ,
 which rename and rotate the
 .Pa wtmp



CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3

2016-12-21 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Dec 21 21:55:46 UTC 2016

Modified Files:
src/external/gpl3/gcc/dist/libstdc++-v3/include/std: mutex
src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11: mutex.cc

Log Message:
Add a walkaround for TLS bug in libstdc++ exposed with std::call_once

Currently std::call_once with libstdc++ works only with static linking.
Disable code path using __thread types and introduce FIXME_PR_51139.
Problem discussed in PR 51139

Functional std::call_once is required in LLVM and LLDB codebase.

Example code to test std::call_once:
#include 
#include 
#include 
#include 
std::once_flag flag;
int main(int argc, char **argv)
{
std::call_once(flag, [](){ std::cout << "Simple example: called 
once\n"; });
return EXIT_SUCCESS;
}

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc

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

Modified files:

Index: src/external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex
diff -u src/external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex:1.1.1.4 src/external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex:1.2
--- src/external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex:1.1.1.4	Tue Jun  7 05:57:53 2016
+++ src/external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex	Wed Dec 21 21:55:46 2016
@@ -695,7 +695,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   call_once(once_flag& __once, _Callable&& __f, _Args&&... __args);
   };
 
-#ifdef _GLIBCXX_HAVE_TLS
+#if defined(_GLIBCXX_HAVE_TLS) && defined(FIXME_PR_51139)
   extern __thread void* __once_callable;
   extern __thread void (*__once_call)();
 
@@ -722,7 +722,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 void
 call_once(once_flag& __once, _Callable&& __f, _Args&&... __args)
 {
-#ifdef _GLIBCXX_HAVE_TLS
+#if defined(_GLIBCXX_HAVE_TLS) && defined(FIXME_PR_51139)
   auto __bound_functor = std::__bind_simple(std::forward<_Callable>(__f),
   std::forward<_Args>(__args)...);
   __once_callable = std::__addressof(__bound_functor);
@@ -737,7 +737,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   int __e = __gthread_once(&__once._M_once, &__once_proxy);
 
-#ifndef _GLIBCXX_HAVE_TLS
+#if !defined(_GLIBCXX_HAVE_TLS) || !defined(FIXME_PR_51139)
   if (__functor_lock)
 __set_once_functor_lock_ptr(0);
 #endif

Index: src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc
diff -u src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc:1.1.1.2 src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc:1.2
--- src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc:1.1.1.2	Sun Jan 24 06:05:43 2016
+++ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc	Wed Dec 21 21:55:46 2016
@@ -25,7 +25,7 @@
 #include 
 
 #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
-#ifndef _GLIBCXX_HAVE_TLS
+#if !defined(_GLIBCXX_HAVE_TLS) || !defined(FIXME_PR_51139)
 namespace
 {
   inline std::unique_lock*&
@@ -41,7 +41,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
-#ifdef _GLIBCXX_HAVE_TLS
+#if defined(_GLIBCXX_HAVE_TLS) && defined(FIXME_PR_51139)
   __thread void* __once_callable;
   __thread void (*__once_call)();
 #else
@@ -76,7 +76,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   {
 void __once_proxy()
 {
-#ifndef _GLIBCXX_HAVE_TLS
+#if !defined(_GLIBCXX_HAVE_TLS) || !defined(FIXME_PR_51139)
   function __once_call = std::move(__once_functor);
   if (unique_lock* __lock = __get_once_functor_lock_ptr())
   {



CVS commit: src/sys/dev/scsipi

2016-12-21 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Dec 21 21:28:30 UTC 2016

Modified Files:
src/sys/dev/scsipi: cd.c sd.c

Log Message:
really keep request queued after resource shortage


To generate a diff of this commit:
cvs rdiff -u -r1.337 -r1.338 src/sys/dev/scsipi/cd.c
cvs rdiff -u -r1.321 -r1.322 src/sys/dev/scsipi/sd.c

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

Modified files:

Index: src/sys/dev/scsipi/cd.c
diff -u src/sys/dev/scsipi/cd.c:1.337 src/sys/dev/scsipi/cd.c:1.338
--- src/sys/dev/scsipi/cd.c:1.337	Wed Dec 21 00:56:30 2016
+++ src/sys/dev/scsipi/cd.c	Wed Dec 21 21:28:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd.c,v 1.337 2016/12/21 00:56:30 mlelstv Exp $	*/
+/*	$NetBSD: cd.c,v 1.338 2016/12/21 21:28:30 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001, 2003, 2004, 2005, 2008 The NetBSD Foundation,
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.337 2016/12/21 00:56:30 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.338 2016/12/21 21:28:30 mlelstv Exp $");
 
 #include 
 #include 
@@ -847,7 +847,7 @@ cd_diskstart(device_t dev, struct buf *b
 		 * retry later.
 		 */
 		callout_reset(>sc_callout, hz / 2, cdrestart, cd);
-		error = 0;
+		error = EAGAIN;
 		goto out;
 	}
 

Index: src/sys/dev/scsipi/sd.c
diff -u src/sys/dev/scsipi/sd.c:1.321 src/sys/dev/scsipi/sd.c:1.322
--- src/sys/dev/scsipi/sd.c:1.321	Fri Dec 16 14:58:53 2016
+++ src/sys/dev/scsipi/sd.c	Wed Dec 21 21:28:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sd.c,v 1.321 2016/12/16 14:58:53 mlelstv Exp $	*/
+/*	$NetBSD: sd.c,v 1.322 2016/12/21 21:28:30 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.321 2016/12/16 14:58:53 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.322 2016/12/21 21:28:30 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_scsi.h"
@@ -754,7 +754,7 @@ sd_diskstart(device_t dev, struct buf *b
 		 * retry later.
 		 */
 		callout_reset(>sc_callout, hz / 2, sdrestart, sd);
-		error = 0;
+		error = EAGAIN;
 		goto out;
 	}
 



CVS commit: src/external/gpl2/xcvs/dist/doc

2016-12-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 21 21:26:28 UTC 2016

Modified Files:
src/external/gpl2/xcvs/dist/doc: cvs.1

Log Message:
document -t for update


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/doc/cvs.1

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

Modified files:

Index: src/external/gpl2/xcvs/dist/doc/cvs.1
diff -u src/external/gpl2/xcvs/dist/doc/cvs.1:1.2 src/external/gpl2/xcvs/dist/doc/cvs.1:1.3
--- src/external/gpl2/xcvs/dist/doc/cvs.1:1.2	Sat Sep 24 08:02:58 2011
+++ src/external/gpl2/xcvs/dist/doc/cvs.1	Wed Dec 21 16:26:28 2016
@@ -3664,7 +3664,7 @@ supported beginning with \fBcvs\fR relea
 .IX "update (subcommand)"
 .SP
 .IP "\(bu" 2
-update [-ACdflPpR] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag[:date] | -D date] [-W spec] files\&...
+update [-ACdflPpRt] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag[:date] | -D date] [-W spec] files\&...
 .IP "\(bu" 2
 Requires: repository, working directory.
 .IP "\(bu" 2
@@ -3724,6 +3724,19 @@ Local; run only in current working direc
 Prune empty directories.  See see node `Moving directories\(aq in the CVS manual.
 .SP
 .IP "" 0
+\fB-t\fR
+.IP "" 2
+Preserve source timestamps.  Unlike \fBcheckout\fR where files are created
+using the original timestamp of the file in the repository, \fBupdate\fR
+updates files using the current time of the machine.  This is convenient
+because updated files appear newer than any other files on the system so
+.BR make ( 1 )
+knows that are their corresponding built artifacts are out of date and
+they will get rebuilt.  The \fB-t\fR flag instead preserves the timestamps
+of the original repository files, behaving exactly like \fBcheckout\fR.
+This is useful for maintaining a tree in the original checked-out state.
+.SP
+.IP "" 0
 \fB-p\fR
 .IP "" 2
 Pipe files to the standard output.



CVS commit: src/usr.bin/time

2016-12-21 Thread Abhinav Upadhyay
Module Name:src
Committed By:   abhinav
Date:   Wed Dec 21 18:01:21 UTC 2016

Modified Files:
src/usr.bin/time: time.1

Log Message:
Add an xref to wait4(2) in SEE ALSO as it has been referred to for the -l 
option.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/time/time.1

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

Modified files:

Index: src/usr.bin/time/time.1
diff -u src/usr.bin/time/time.1:1.25 src/usr.bin/time/time.1:1.26
--- src/usr.bin/time/time.1:1.25	Wed Nov  9 19:42:27 2011
+++ src/usr.bin/time/time.1	Wed Dec 21 18:01:21 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: time.1,v 1.25 2011/11/09 19:42:27 wiz Exp $
+.\"	$NetBSD: time.1,v 1.26 2016/12/21 18:01:21 abhinav Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -160,7 +160,8 @@ will be that of
 .Xr csh 1 ,
 .Xr ksh 1 ,
 .Xr clock_gettime 2 ,
-.Xr getrusage 2
+.Xr getrusage 2 ,
+.Xr wait4 2
 .Sh STANDARDS
 The
 .Nm



CVS commit: src/usr.sbin/ac

2016-12-21 Thread Abhinav Upadhyay
Module Name:src
Committed By:   abhinav
Date:   Wed Dec 21 17:45:07 UTC 2016

Modified Files:
src/usr.sbin/ac: ac.8

Log Message:
Move information about exit status to its own section.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/ac/ac.8

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

Modified files:

Index: src/usr.sbin/ac/ac.8
diff -u src/usr.sbin/ac/ac.8:1.16 src/usr.sbin/ac/ac.8:1.17
--- src/usr.sbin/ac/ac.8:1.16	Wed Apr  8 14:37:29 2009
+++ src/usr.sbin/ac/ac.8	Wed Dec 21 17:45:07 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: ac.8,v 1.16 2009/04/08 14:37:29 joerg Exp $
+.\" $NetBSD: ac.8,v 1.17 2016/12/21 17:45:07 abhinav Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -120,10 +120,6 @@ allows times recorded in
 .Pa modems
 to be charged out at a different rate than
 .Pa other .
-.Pp
-The
-.Nm
-utility exits 0 on success, and \*[Gt]0 if a fatal error occurs.
 .Sh FILES
 .Bl -tag -width /var/log/wtmp.[0-7] -compact
 .It Pa /var/log/wtmp
@@ -131,6 +127,8 @@ connect time accounting file
 .It Pa /var/log/wtmp.[0-7]
 rotated files
 .El
+.Sh EXIT STATUS
+.Ex -std ac
 .Sh SEE ALSO
 .Xr login 1 ,
 .Xr utmp 5 ,



CVS commit: src/usr.sbin/lpr/lpq

2016-12-21 Thread Abhinav Upadhyay
Module Name:src
Committed By:   abhinav
Date:   Wed Dec 21 17:29:22 UTC 2016

Modified Files:
src/usr.sbin/lpr/lpq: lpq.1

Log Message:
s/results/result
Also remove .Pp before .Bl


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/lpr/lpq/lpq.1

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

Modified files:

Index: src/usr.sbin/lpr/lpq/lpq.1
diff -u src/usr.sbin/lpr/lpq/lpq.1:1.15 src/usr.sbin/lpr/lpq/lpq.1:1.16
--- src/usr.sbin/lpr/lpq/lpq.1:1.15	Thu Mar 22 07:58:20 2012
+++ src/usr.sbin/lpr/lpq/lpq.1	Wed Dec 21 17:29:22 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: lpq.1,v 1.15 2012/03/22 07:58:20 wiz Exp $
+.\"	$NetBSD: lpq.1,v 1.16 2016/12/21 17:29:22 abhinav Exp $
 .\"
 .\" Copyright (c) 1983, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -53,7 +53,6 @@ invoked
 without any arguments reports on any jobs currently in the queue.
 .Pp
 Options:
-.Pp
 .Bl -tag -width indent
 .It Fl P
 Specify a particular printer, otherwise the default
@@ -134,4 +133,4 @@ Due to the dynamic nature of the informa
 .Nm
 may report unreliably.
 Output formatting is sensitive to the line length of the terminal;
-this can results in widely spaced columns.
+this can result in widely spaced columns.



CVS commit: src/usr.sbin/rarpd

2016-12-21 Thread Abhinav Upadhyay
Module Name:src
Committed By:   abhinav
Date:   Wed Dec 21 12:03:48 UTC 2016

Modified Files:
src/usr.sbin/rarpd: rarpd.8

Log Message:
Add xref for ethers(5) and hosts(5).
Remove extra white space in the middle of a sentence.
Use more markup for AUTHORS section.

ok wiz@


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/rarpd/rarpd.8

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

Modified files:

Index: src/usr.sbin/rarpd/rarpd.8
diff -u src/usr.sbin/rarpd/rarpd.8:1.13 src/usr.sbin/rarpd/rarpd.8:1.14
--- src/usr.sbin/rarpd/rarpd.8:1.13	Wed Mar 11 14:00:00 2009
+++ src/usr.sbin/rarpd/rarpd.8	Wed Dec 21 12:03:48 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rarpd.8,v 1.13 2009/03/11 14:00:00 joerg Exp $
+.\"	$NetBSD: rarpd.8,v 1.14 2016/12/21 12:03:48 abhinav Exp $
 .\"
 .\" Copyright (c) 1988-1990 The Regents of the University of California.
 .\" All rights reserved.
@@ -86,9 +86,11 @@ Log all requests to syslog.
 .\" .It Pa /tftpboot
 .El
 .Sh SEE ALSO
-.Xr bpf 4
+.Xr bpf 4 ,
+.Xr ethers 5 ,
+.Xr hosts 5
 .Rs
-.%R A Reverse Address  Resolution Protocol
+.%R A Reverse Address Resolution Protocol
 .%N RFC 903
 .%A Finlayson, R.
 .%A Mann, T.
@@ -96,5 +98,8 @@ Log all requests to syslog.
 .%A Theimer, M.
 .Re
 .Sh AUTHORS
-Craig Leres (le...@ee.lbl.gov) and Steven McCanne (mcca...@ee.lbl.gov).
+.An -nosplit
+.An Craig Leres Aq Mt le...@ee.lbl.gov
+and
+.An Steven McCanne Aq Mt mcca...@ee.lbl.gov .
 Lawrence Berkeley Laboratory, University of California, Berkeley, CA.



CVS commit: src/sys/dev/pci

2016-12-21 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Wed Dec 21 11:56:55 UTC 2016

Modified Files:
src/sys/dev/pci: if_alc.c

Log Message:
Less magic. 0x0c00 is equal to PCIE_LCAP_ASPM.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/if_alc.c

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

Modified files:

Index: src/sys/dev/pci/if_alc.c
diff -u src/sys/dev/pci/if_alc.c:1.23 src/sys/dev/pci/if_alc.c:1.24
--- src/sys/dev/pci/if_alc.c:1.23	Thu Dec 15 09:28:05 2016
+++ src/sys/dev/pci/if_alc.c	Wed Dec 21 11:56:55 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_alc.c,v 1.23 2016/12/15 09:28:05 ozaki-r Exp $	*/
+/*	$NetBSD: if_alc.c,v 1.24 2016/12/21 11:56:55 maya Exp $	*/
 /*	$OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $	*/
 /*-
  * Copyright (c) 2009, Pyun YongHyeon 
@@ -1272,7 +1272,7 @@ alc_attach(device_t parent, device_t sel
 			/* Disable ASPM L0S and L1. */
 			cap = pci_conf_read(sc->sc_pct, sc->sc_pcitag,
 			base + PCIE_LCAP) >> 16;
-			if ((cap & 0x0c00) != 0) {
+			if ((cap & PCIE_LCAP_ASPM) != 0) {
 ctl = pci_conf_read(sc->sc_pct, sc->sc_pcitag,
 base + PCIE_LCSR) >> 16;
 if ((ctl & 0x08) != 0)



CVS commit: src/tests/net/if_gif

2016-12-21 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Dec 21 09:46:39 UTC 2016

Modified Files:
src/tests/net/if_gif: t_gif.sh

Log Message:
Enable DEBUG to see what happened on babylon5


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/net/if_gif/t_gif.sh

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

Modified files:

Index: src/tests/net/if_gif/t_gif.sh
diff -u src/tests/net/if_gif/t_gif.sh:1.8 src/tests/net/if_gif/t_gif.sh:1.9
--- src/tests/net/if_gif/t_gif.sh:1.8	Fri Nov 25 08:51:16 2016
+++ src/tests/net/if_gif/t_gif.sh	Wed Dec 21 09:46:39 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: t_gif.sh,v 1.8 2016/11/25 08:51:16 ozaki-r Exp $
+#	$NetBSD: t_gif.sh,v 1.9 2016/12/21 09:46:39 ozaki-r Exp $
 #
 # Copyright (c) 2015 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -61,7 +61,7 @@ ROUTER2_GIFIP6_DUMMY=fc00:14::1
 ROUTER2_GIFIP6_RECURSIVE1=fc00:104::1
 ROUTER2_GIFIP6_RECURSIVE2=fc00:204::1
 
-DEBUG=${DEBUG:-false}
+DEBUG=${DEBUG:-true}
 TIMEOUT=5
 
 setup_router()



CVS commit: src/libexec/httpd

2016-12-21 Thread Abhinav Upadhyay
Module Name:src
Committed By:   abhinav
Date:   Wed Dec 21 09:33:08 UTC 2016

Modified Files:
src/libexec/httpd: bozohttpd.8

Log Message:
Fix sentences at a couple of places.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/libexec/httpd/bozohttpd.8

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

Modified files:

Index: src/libexec/httpd/bozohttpd.8
diff -u src/libexec/httpd/bozohttpd.8:1.62 src/libexec/httpd/bozohttpd.8:1.63
--- src/libexec/httpd/bozohttpd.8:1.62	Sun Dec 11 20:40:41 2016
+++ src/libexec/httpd/bozohttpd.8	Wed Dec 21 09:33:08 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bozohttpd.8,v 1.62 2016/12/11 20:40:41 mrg Exp $
+.\"	$NetBSD: bozohttpd.8,v 1.63 2016/12/21 09:33:08 abhinav Exp $
 .\"
 .\"	$eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\"
@@ -190,7 +190,7 @@ when a URL in the form
 is being accessed.
 The function is passed three tables as arguments, the server
 environment, the request headers, and the decoded query string
-plus any data that was send as application/x-www-form-urlencoded.
+plus any data that was sent as application/x-www-form-urlencoded.
 .It Fl M Ar suffix type encoding encoding11
 Adds a new entry to the table that converts file suffixes to
 content type and encoding.
@@ -446,7 +446,7 @@ with
 on the compiler command line.
 .Ss COMPRESSION
 .Nm
-supports a very basic form compression.
+supports a very basic form of compression.
 .Nm
 will serve the requested file postpended with
 .Dq Pa .gz



CVS commit: src/usr.bin/sort

2016-12-21 Thread Abhinav Upadhyay
Module Name:src
Committed By:   abhinav
Date:   Wed Dec 21 09:06:24 UTC 2016

Modified Files:
src/usr.bin/sort: sort.1

Log Message:
Add missing full stop.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/sort/sort.1

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

Modified files:

Index: src/usr.bin/sort/sort.1
diff -u src/usr.bin/sort/sort.1:1.36 src/usr.bin/sort/sort.1:1.37
--- src/usr.bin/sort/sort.1:1.36	Wed Jun  1 08:24:03 2016
+++ src/usr.bin/sort/sort.1	Wed Dec 21 09:06:24 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sort.1,v 1.36 2016/06/01 08:24:03 wiz Exp $
+.\"	$NetBSD: sort.1,v 1.37 2016/12/21 09:06:24 abhinav Exp $
 .\"
 .\" Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -459,7 +459,7 @@ On disorder (or non-uniqueness) with the
 .Fl c
 (or
 .Fl C )
-option
+option.
 .It 2
 An error occurred.
 .El



CVS commit: src/sys

2016-12-21 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Dec 21 08:47:02 UTC 2016

Modified Files:
src/sys/net: if_llatbl.c if_llatbl.h
src/sys/netinet6: in6.c nd6.c

Log Message:
Fix deadlock between llentry timers and destruction of llentry

llentry timer (of nd6) holds both llentry's lock and softnet_lock.
A caller also holds them and calls callout_halt to wait for the
timer to quit. However we can pass only one lock to callout_halt,
so passing either of them can cause a deadlock. Fix it by avoid
calling callout_halt without holding llentry's lock.

BTW in the first place we cannot pass llentry's lock to callout_halt
because it's a rwlock...


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/net/if_llatbl.c
cvs rdiff -u -r1.9 -r1.10 src/sys/net/if_llatbl.h
cvs rdiff -u -r1.225 -r1.226 src/sys/netinet6/in6.c
cvs rdiff -u -r1.221 -r1.222 src/sys/netinet6/nd6.c

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

Modified files:

Index: src/sys/net/if_llatbl.c
diff -u src/sys/net/if_llatbl.c:1.15 src/sys/net/if_llatbl.c:1.16
--- src/sys/net/if_llatbl.c:1.15	Tue Oct 11 12:32:30 2016
+++ src/sys/net/if_llatbl.c	Wed Dec 21 08:47:02 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_llatbl.c,v 1.15 2016/10/11 12:32:30 roy Exp $	*/
+/*	$NetBSD: if_llatbl.c,v 1.16 2016/12/21 08:47:02 ozaki-r Exp $	*/
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -424,8 +424,24 @@ lltable_purge_entries(struct lltable *ll
 	IF_AFDATA_WUNLOCK(llt->llt_ifp);
 
 	LIST_FOREACH_SAFE(lle, , lle_chain, next) {
-		if (callout_halt(>la_timer, >lle_lock))
-			LLE_REMREF(lle);
+		/*
+		 * We need to release the lock here to lle_timer proceeds;
+		 * lle_timer should stop immediately if LLE_LINKED isn't set.
+		 * Note that we cannot pass lle->lle_lock to callout_halt
+		 * because it's a rwlock.
+		 */
+		LLE_ADDREF(lle);
+		LLE_WUNLOCK(lle);
+#ifdef NET_MPSAFE
+		callout_halt(>la_timer, NULL);
+#else
+		if (mutex_owned(softnet_lock))
+			callout_halt(>la_timer, softnet_lock);
+		else
+			callout_halt(>la_timer, NULL);
+#endif
+		LLE_WLOCK(lle);
+		LLE_REMREF(lle);
 		llentry_free(lle);
 	}
 
@@ -557,6 +573,13 @@ lltable_unlink_entry(struct lltable *llt
 }
 
 void
+lltable_free_entry(struct lltable *llt, struct llentry *lle)
+{
+
+	llt->llt_free_entry(llt, lle);
+}
+
+void
 lltable_fill_sa_entry(const struct llentry *lle, struct sockaddr *sa)
 {
 	struct lltable *llt;

Index: src/sys/net/if_llatbl.h
diff -u src/sys/net/if_llatbl.h:1.9 src/sys/net/if_llatbl.h:1.10
--- src/sys/net/if_llatbl.h:1.9	Mon Apr  4 07:37:07 2016
+++ src/sys/net/if_llatbl.h	Wed Dec 21 08:47:02 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_llatbl.h,v 1.9 2016/04/04 07:37:07 ozaki-r Exp $	*/
+/*	$NetBSD: if_llatbl.h,v 1.10 2016/12/21 08:47:02 ozaki-r Exp $	*/
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -273,6 +273,7 @@ struct llentry *lltable_create_lle(struc
 const void *paddr);
 void lltable_link_entry(struct lltable *llt, struct llentry *lle);
 void lltable_unlink_entry(struct lltable *llt, struct llentry *lle);
+void lltable_free_entry(struct lltable *llt, struct llentry *lle);
 void lltable_fill_sa_entry(const struct llentry *lle, struct sockaddr *sa);
 struct ifnet *lltable_get_ifp(const struct lltable *llt);
 int lltable_get_af(const struct lltable *llt);

Index: src/sys/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.225 src/sys/netinet6/in6.c:1.226
--- src/sys/netinet6/in6.c:1.225	Mon Dec 19 07:51:34 2016
+++ src/sys/netinet6/in6.c	Wed Dec 21 08:47:02 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.225 2016/12/19 07:51:34 ozaki-r Exp $	*/
+/*	$NetBSD: in6.c,v 1.226 2016/12/21 08:47:02 ozaki-r Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.225 2016/12/19 07:51:34 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.226 2016/12/21 08:47:02 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2362,28 +2362,42 @@ in6_lltable_match_prefix(const struct so
 static void
 in6_lltable_free_entry(struct lltable *llt, struct llentry *lle)
 {
-	struct ifnet *ifp __diagused;
+	struct ifnet *ifp = llt->llt_ifp;
 
+	IF_AFDATA_WLOCK_ASSERT(ifp);
 	LLE_WLOCK_ASSERT(lle);
-	KASSERT(llt != NULL);
 
 	/* Unlink entry from table */
 	if ((lle->la_flags & LLE_LINKED) != 0) {
 
-		ifp = llt->llt_ifp;
-		IF_AFDATA_WLOCK_ASSERT(ifp);
 		lltable_unlink_entry(llt, lle);
+		KASSERT((lle->la_flags & LLE_LINKED) == 0);
 	}
+	/*
+	 * We need to release the lock here to lle_timer proceeds;
+	 * lle_timer should stop immediately if LLE_LINKED isn't set.
+	 * Note that we cannot pass lle->lle_lock to callout_halt
+	 * because it's a rwlock.
+	 */
+	LLE_ADDREF(lle);
+	LLE_WUNLOCK(lle);
+	IF_AFDATA_WUNLOCK(ifp);