From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 16 01:48:00 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C19C5106564A; Sun, 16 Oct 2011 01:48:00 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-yx0-f177.google.com (mail-yx0-f177.google.com [209.85.213.177]) by mx1.freebsd.org (Postfix) with ESMTP id 6F5F68FC1D; Sun, 16 Oct 2011 01:47:59 +0000 (UTC) Received: by yxk36 with SMTP id 36so2552719yxk.8 for ; Sat, 15 Oct 2011 18:47:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=GNw6A1J30hIkA4wKteidZDwSMhmRbWBA8RdRn0JnCbc=; b=tSysL1SvhCyq0j0yKrtcK+V1XGo3qUDAZS/VHCetQSZDJ23R40wC46GzUVB7HlPtL+ 3g4FSQgXDVw7Y6fSMKQzW9tbNOJsXWaQKWXW9LY5wZvH3hM2iUnUYNnz3tCk5qLYSPek 7/qRCZSoBMXjOWqnT8dDSxrzwGYGd27CJkMxQ= MIME-Version: 1.0 Received: by 10.236.178.41 with SMTP id e29mr19389524yhm.117.1318728297954; Sat, 15 Oct 2011 18:24:57 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.236.95.147 with HTTP; Sat, 15 Oct 2011 18:24:57 -0700 (PDT) In-Reply-To: <201110152123.p9FLN5Ht031202@svn.freebsd.org> References: <201110152123.p9FLN5Ht031202@svn.freebsd.org> Date: Sun, 16 Oct 2011 09:24:57 +0800 X-Google-Sender-Auth: FJmXmEaqmzXsqw_2uZEc7vwEpuY Message-ID: From: Adrian Chadd To: Ken Smith Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r226405 - in stable/9: . etc/defaults lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf sys/powerpc/conf sys/sparc64/conf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 01:48:00 -0000 Hi! Would you consider leaving these in but just commenting them out? That way if a user hits a deadlock or memory corruption issue, we can just say "uncomment the section marked _debugging_ in your config file." Thanks, Adrian From owner-svn-src-stable-9@FreeBSD.ORG Sun Oct 16 15:55:24 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14F05106566C; Sun, 16 Oct 2011 15:55:24 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03E778FC0A; Sun, 16 Oct 2011 15:55:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GFtNpe069359; Sun, 16 Oct 2011 15:55:23 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GFtNmT069357; Sun, 16 Oct 2011 15:55:23 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201110161555.p9GFtNmT069357@svn.freebsd.org> From: Ken Smith Date: Sun, 16 Oct 2011 15:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226438 - stable/9/sys/conf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 15:55:24 -0000 Author: kensmith Date: Sun Oct 16 15:55:23 2011 New Revision: 226438 URL: http://svn.freebsd.org/changeset/base/226438 Log: Ready for RC1. Approved by: re (implicit) Modified: stable/9/sys/conf/newvers.sh Modified: stable/9/sys/conf/newvers.sh ============================================================================== --- stable/9/sys/conf/newvers.sh Sun Oct 16 15:08:43 2011 (r226437) +++ stable/9/sys/conf/newvers.sh Sun Oct 16 15:55:23 2011 (r226438) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.0" -BRANCH="BETA3" +BRANCH="RC1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 17 03:35:24 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC51B106566C; Mon, 17 Oct 2011 03:35:24 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB9538FC1A; Mon, 17 Oct 2011 03:35:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9H3ZOYf092948; Mon, 17 Oct 2011 03:35:24 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9H3ZOsT092946; Mon, 17 Oct 2011 03:35:24 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110170335.p9H3ZOsT092946@svn.freebsd.org> From: Qing Li Date: Mon, 17 Oct 2011 03:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226455 - stable/9/sys/netinet6 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 03:35:25 -0000 Author: qingli Date: Mon Oct 17 03:35:24 2011 New Revision: 226455 URL: http://svn.freebsd.org/changeset/base/226455 Log: MFC 226453 The code change made in r226040 was incomplete and resulted in routes such as fe80::1%lo0 no being installed. This patch completes the original intended fix. Reviewed by: hrs. bz Approved by: re (ken) Modified: stable/9/sys/netinet6/in6.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Mon Oct 17 00:05:31 2011 (r226454) +++ stable/9/sys/netinet6/in6.c Mon Oct 17 03:35:24 2011 (r226455) @@ -1805,14 +1805,17 @@ in6_ifinit(struct ifnet *ifp, struct in6 if (error != 0) return (error); ia->ia_flags |= IFA_ROUTE; + /* + * Handle the case for ::1 . + */ + if (ifp->if_flags & IFF_LOOPBACK) + ia->ia_flags |= IFA_RTSELF; } /* * add a loopback route to self */ - if (!(ia->ia_flags & IFA_RTSELF) - && (V_nd6_useloopback - && !(ifp->if_flags & IFF_LOOPBACK))) { + if (!(ia->ia_flags & IFA_RTSELF) && V_nd6_useloopback) { error = ifa_add_loopback_route((struct ifaddr *)ia, (struct sockaddr *)&ia->ia_addr); if (error == 0) From owner-svn-src-stable-9@FreeBSD.ORG Mon Oct 17 14:48:12 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 109CE106566B; Mon, 17 Oct 2011 14:48:12 +0000 (UTC) (envelope-from kensmith@buffalo.edu) Received: from localmailA.acsu.buffalo.edu (localmaila.acsu.buffalo.edu [128.205.5.196]) by mx1.freebsd.org (Postfix) with ESMTP id CE9E78FC17; Mon, 17 Oct 2011 14:48:11 +0000 (UTC) Received: from localmailA.acsu.buffalo.edu (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 28493F911; Mon, 17 Oct 2011 10:40:15 -0400 (EDT) Received: from localmailA.acsu.buffalo.edu (localhost [127.0.0.1]) by localmailA.acsu.buffalo.edu (Postfix) with ESMTP id 6DA3BF8EF; Mon, 17 Oct 2011 10:40:14 -0400 (EDT) Received: from smtp4.acsu.buffalo.edu (smtp4.acsu.buffalo.edu [128.205.5.229]) by localmailA.acsu.buffalo.edu (Prefixe) with ESMTP id 634DBF2DE; Mon, 17 Oct 2011 10:40:14 -0400 (EDT) Received: from [128.205.32.76] (bauer.cse.buffalo.edu [128.205.32.76]) (Authenticated sender: kensmith@buffalo.edu) by smtp4.acsu.buffalo.edu (Postfix) with ESMTPSA id 381DA4584E; Mon, 17 Oct 2011 10:40:14 -0400 (EDT) From: Ken Smith To: Adrian Chadd In-Reply-To: References: <201110152123.p9FLN5Ht031202@svn.freebsd.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-wIC/k1ayJsLMkn1msOta" Date: Mon, 17 Oct 2011 10:40:13 -0400 Message-ID: <1318862413.55691.12.camel@bauer.cse.buffalo.edu> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port X-PM-EL-Spam-Prob: : 8% Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r226405 - in stable/9: . etc/defaults lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf sys/powerpc/conf sys/sparc64/conf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 14:48:12 -0000 --=-wIC/k1ayJsLMkn1msOta Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Sun, 2011-10-16 at 09:24 +0800, Adrian Chadd wrote: > Hi! >=20 > Would you consider leaving these in but just commenting them out? >=20 > That way if a user hits a deadlock or memory corruption issue, we can > just say "uncomment the section marked _debugging_ in your config > file." >=20 > Thanks, I'm not completely against it. My *slight* hesitation in doing it would be that from my experience these knobs aren't a one-size-fits-all thing for people trying to debug stuff in production. So you sorta need to know a bit more about what you're doing when fiddling with them. Turning them all on is probably OK for a workstation user but less likely to be OK for a server admin. Some may want/need to add in KDB_UNATTENDED depending on their circumstances, etc. --=20 Ken Smith - From there to here, from here to | kensmith@buffalo.edu there, funny things are everywhere. | - Theodor Geisel | --=-wIC/k1ayJsLMkn1msOta Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAk6cPkMACgkQ/G14VSmup/ZfTgCgkHNoPAY2pbKhsVOsJ+pVYab6 0TsAn19tx0AJv/BaeIEGptFGzmg7UzsK =1jvF -----END PGP SIGNATURE----- --=-wIC/k1ayJsLMkn1msOta-- From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 18 13:48:32 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 585511065675; Tue, 18 Oct 2011 13:48:32 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 474898FC13; Tue, 18 Oct 2011 13:48:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9IDmWHQ076156; Tue, 18 Oct 2011 13:48:32 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9IDmWii076154; Tue, 18 Oct 2011 13:48:32 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201110181348.p9IDmWii076154@svn.freebsd.org> From: Ken Smith Date: Tue, 18 Oct 2011 13:48:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226511 - stable/9/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 13:48:32 -0000 Author: kensmith Date: Tue Oct 18 13:48:31 2011 New Revision: 226511 URL: http://svn.freebsd.org/changeset/base/226511 Log: MFC r226507: > Escape the newline so we get a proper line continuation. Without this > the text of the menu selections doesn't get displayed properly and it > makes the installer appear to lock up for no obvious reason. > > Reviewed by: nwhitehorn Insta-MFC being done because 9.0-RC1 builds are being held for this. Approved by: re (kib, bz) Modified: stable/9/usr.sbin/bsdinstall/scripts/auto Directory Properties: stable/9/usr.sbin/bsdinstall/ (props changed) Modified: stable/9/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/auto Tue Oct 18 13:45:16 2011 (r226510) +++ stable/9/usr.sbin/bsdinstall/scripts/auto Tue Oct 18 13:48:31 2011 (r226511) @@ -158,7 +158,7 @@ finalconfig() { REVISIT=$(dialog --backtitle "FreeBSD Installer" \ --title "Final Configuration" --no-cancel --menu \ "Setup of your FreeBSD system is nearly complete. You can now modify your configuration choices or apply more complex changes using a shell." 0 0 0 \ - "Exit" "Apply configuration and exit installer" + "Exit" "Apply configuration and exit installer" \ "Add User" "Add a user to the system" \ "Root Password" "Change root password" \ "Hostname" "Set system hostname" \ From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 19 23:02:58 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38978106564A; Wed, 19 Oct 2011 23:02:58 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2782F8FC0C; Wed, 19 Oct 2011 23:02:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9JN2wEj046252; Wed, 19 Oct 2011 23:02:58 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9JN2w8C046249; Wed, 19 Oct 2011 23:02:58 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201110192302.p9JN2w8C046249@svn.freebsd.org> From: Ken Smith Date: Wed, 19 Oct 2011 23:02:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226548 - in stable/9: . sys/ia64/conf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 23:02:58 -0000 Author: kensmith Date: Wed Oct 19 23:02:57 2011 New Revision: 226548 URL: http://svn.freebsd.org/changeset/base/226548 Log: Remove the last of the debugging support (INVARIANT*) from the ia64 GENERIC config file, the ia64 kernel runs OK without it. Reviewed by: marcel Approved by: re (implicit) Modified: stable/9/UPDATING stable/9/sys/ia64/conf/GENERIC Modified: stable/9/UPDATING ============================================================================== --- stable/9/UPDATING Wed Oct 19 21:55:20 2011 (r226547) +++ stable/9/UPDATING Wed Oct 19 23:02:57 2011 (r226548) @@ -9,11 +9,6 @@ handbook. Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. -NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.x IS SLOW ON IA64: - For ia64 the INVARIANTS and INVARIANT_SUPPORT kernel options - were left in the GENERIC kernel because the kernel does not - work properly without them. - 20110913: This commit modifies vfs_register() so that it uses a hash calculation to set vfc_typenum, which is enabled by default. Modified: stable/9/sys/ia64/conf/GENERIC ============================================================================== --- stable/9/sys/ia64/conf/GENERIC Wed Oct 19 21:55:20 2011 (r226547) +++ stable/9/sys/ia64/conf/GENERIC Wed Oct 19 23:02:57 2011 (r226548) @@ -33,8 +33,6 @@ options GEOM_LABEL # Provides labelizat options INCLUDE_CONFIG_FILE # Include this file in kernel options INET # InterNETworking options INET6 # IPv6 communications protocols -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # required by INVARIANTS options KTRACE # ktrace(1) syscall trace support options MAC # TrustedBSD MAC Framework options MD_ROOT # MD usable as root device From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 20 14:45:17 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27D7B1065674; Thu, 20 Oct 2011 14:45:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1704A8FC12; Thu, 20 Oct 2011 14:45:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KEjGT6078880; Thu, 20 Oct 2011 14:45:16 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KEjG2h078878; Thu, 20 Oct 2011 14:45:16 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201110201445.p9KEjG2h078878@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 20 Oct 2011 14:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226565 - stable/9/usr.sbin/usbdump X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 14:45:17 -0000 Author: hselasky Date: Thu Oct 20 14:45:16 2011 New Revision: 226565 URL: http://svn.freebsd.org/changeset/base/226565 Log: MFC r226474: Make the usbdump utility work again by using the correct BPF structures. Approved by: re (kib) Modified: stable/9/usr.sbin/usbdump/usbdump.c Directory Properties: stable/9/usr.sbin/usbdump/ (props changed) Modified: stable/9/usr.sbin/usbdump/usbdump.c ============================================================================== --- stable/9/usr.sbin/usbdump/usbdump.c Thu Oct 20 13:41:37 2011 (r226564) +++ stable/9/usr.sbin/usbdump/usbdump.c Thu Oct 20 14:45:16 2011 (r226565) @@ -283,7 +283,7 @@ hexdump(const uint8_t *region, uint32_t } static void -print_apacket(const struct bpf_xhdr *hdr, const uint8_t *ptr, int ptr_len) +print_apacket(const struct bpf_hdr *hdr, const uint8_t *ptr, int ptr_len) { struct tm *tm; struct usbpf_pkthdr up_temp; @@ -318,8 +318,8 @@ print_apacket(const struct bpf_xhdr *hdr up->up_packet_count = le32toh(up->up_packet_count); up->up_endpoint = le32toh(up->up_endpoint); - tv.tv_sec = hdr->bh_tstamp.bt_sec; - tv.tv_usec = hdr->bh_tstamp.bt_frac; + tv.tv_sec = hdr->bh_tstamp.tv_sec; + tv.tv_usec = hdr->bh_tstamp.tv_usec; tm = localtime(&tv.tv_sec); len = strftime(buf, sizeof(buf), "%H:%M:%S", tm); @@ -386,12 +386,12 @@ print_apacket(const struct bpf_xhdr *hdr static void print_packets(uint8_t *data, const int datalen) { - const struct bpf_xhdr *hdr; + const struct bpf_hdr *hdr; uint8_t *ptr; uint8_t *next; for (ptr = data; ptr < (data + datalen); ptr = next) { - hdr = (const struct bpf_xhdr *)ptr; + hdr = (const struct bpf_hdr *)ptr; next = ptr + BPF_WORDALIGN(hdr->bh_hdrlen + hdr->bh_caplen); if (w_arg == NULL) { From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 20 15:34:18 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D1C9106566C; Thu, 20 Oct 2011 15:34:18 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 327708FC08; Thu, 20 Oct 2011 15:34:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KFYIsK080475; Thu, 20 Oct 2011 15:34:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KFYIZQ080473; Thu, 20 Oct 2011 15:34:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110201534.p9KFYIZQ080473@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 20 Oct 2011 15:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226567 - stable/9/sys/powerpc/powerpc X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 15:34:18 -0000 Author: nwhitehorn Date: Thu Oct 20 15:34:17 2011 New Revision: 226567 URL: http://svn.freebsd.org/changeset/base/226567 Log: MFC r226410: Enforce a memory barrier in stream operations, as is done on other bus_space calls. This makes ath(4) work correctly on PowerPC. Submitted by: adrian Tested by: andreast Approved by: re (kib) Modified: stable/9/sys/powerpc/powerpc/bus_machdep.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/powerpc/powerpc/bus_machdep.c ============================================================================== --- stable/9/sys/powerpc/powerpc/bus_machdep.c Thu Oct 20 14:56:44 2011 (r226566) +++ stable/9/sys/powerpc/powerpc/bus_machdep.c Thu Oct 20 15:34:17 2011 (r226567) @@ -293,6 +293,7 @@ bs_be_ws_1(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); *addr = val; + __asm __volatile("eieio; sync"); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -303,6 +304,7 @@ bs_be_ws_2(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); *addr = val; + __asm __volatile("eieio; sync"); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -313,6 +315,7 @@ bs_be_ws_4(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); *addr = val; + __asm __volatile("eieio; sync"); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -323,6 +326,7 @@ bs_be_ws_8(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); *addr = val; + __asm __volatile("eieio; sync"); } static void @@ -488,6 +492,7 @@ bs_le_rs_1(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); res = *addr; + __asm __volatile("eieio; sync"); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } @@ -500,6 +505,7 @@ bs_le_rs_2(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); __asm __volatile("lhbrx %0, 0, %1" : "=r"(res) : "r"(addr)); + __asm __volatile("eieio; sync"); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } @@ -512,6 +518,7 @@ bs_le_rs_4(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); __asm __volatile("lwbrx %0, 0, %1" : "=r"(res) : "r"(addr)); + __asm __volatile("eieio; sync"); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 20 15:53:27 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34743106566B; Thu, 20 Oct 2011 15:53:27 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2283C8FC14; Thu, 20 Oct 2011 15:53:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KFrRnB081194; Thu, 20 Oct 2011 15:53:27 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KFrRa9081192; Thu, 20 Oct 2011 15:53:27 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110201553.p9KFrRa9081192@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 20 Oct 2011 15:53:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226570 - stable/9/sys/netinet6 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 15:53:27 -0000 Author: glebius Date: Thu Oct 20 15:53:26 2011 New Revision: 226570 URL: http://svn.freebsd.org/changeset/base/226570 Log: MFhead r226338: Restore functions in6_ifaddloop() and in6_ifremloop() that were inlined by Qing Li in his big new-ARP commit. I am going to utilize them in my newcarp work, and also these functions left declared in in6_var.h for all the time they were absent. Reviewed by: bz Approved by: re (kib) Modified: stable/9/sys/netinet6/in6.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Thu Oct 20 15:46:54 2011 (r226569) +++ stable/9/sys/netinet6/in6.c Thu Oct 20 15:53:26 2011 (r226570) @@ -136,7 +136,89 @@ static void in6_unlink_ifa(struct in6_if int (*faithprefix_p)(struct in6_addr *); +#define ifa2ia6(ifa) ((struct in6_ifaddr *)(ifa)) +#define ia62ifa(ia6) (&((ia6)->ia_ifa)) + +void +in6_ifaddloop(struct ifaddr *ifa) +{ + struct sockaddr_dl gateway; + struct sockaddr_in6 mask, addr; + struct rtentry rt; + struct in6_ifaddr *ia; + struct ifnet *ifp; + struct llentry *ln; + + ia = ifa2ia6(ifa); + ifp = ifa->ifa_ifp; + IF_AFDATA_LOCK(ifp); + ifa->ifa_rtrequest = NULL; + + /* XXX QL + * we need to report rt_newaddrmsg + */ + ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | + LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr); + IF_AFDATA_UNLOCK(ifp); + if (ln != NULL) { + ln->la_expire = 0; /* for IPv6 this means permanent */ + ln->ln_state = ND6_LLINFO_REACHABLE; + /* + * initialize for rtmsg generation + */ + bzero(&gateway, sizeof(gateway)); + gateway.sdl_len = sizeof(gateway); + gateway.sdl_family = AF_LINK; + gateway.sdl_nlen = 0; + gateway.sdl_alen = 6; + memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned, + sizeof(ln->ll_addr)); + LLE_WUNLOCK(ln); + } + + bzero(&rt, sizeof(rt)); + rt.rt_gateway = (struct sockaddr *)&gateway; + memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask)); + memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr)); + rt_mask(&rt) = (struct sockaddr *)&mask; + rt_key(&rt) = (struct sockaddr *)&addr; + rt.rt_flags = RTF_UP | RTF_HOST | RTF_STATIC; + rt_newaddrmsg(RTM_ADD, ifa, 0, &rt); +} + +void +in6_ifremloop(struct ifaddr *ifa) +{ + struct sockaddr_dl gateway; + struct sockaddr_in6 mask, addr; + struct rtentry rt0; + struct in6_ifaddr *ia; + struct ifnet *ifp; + ia = ifa2ia6(ifa); + ifp = ifa->ifa_ifp; + IF_AFDATA_LOCK(ifp); + lla_lookup(LLTABLE6(ifp), (LLE_DELETE | LLE_IFADDR), + (struct sockaddr *)&ia->ia_addr); + IF_AFDATA_UNLOCK(ifp); + + /* + * initialize for rtmsg generation + */ + bzero(&gateway, sizeof(gateway)); + gateway.sdl_len = sizeof(gateway); + gateway.sdl_family = AF_LINK; + gateway.sdl_nlen = 0; + gateway.sdl_alen = ifp->if_addrlen; + bzero(&rt0, sizeof(rt0)); + rt0.rt_gateway = (struct sockaddr *)&gateway; + memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask)); + memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr)); + rt_mask(&rt0) = (struct sockaddr *)&mask; + rt_key(&rt0) = (struct sockaddr *)&addr; + rt0.rt_flags = RTF_HOST | RTF_STATIC; + rt_newaddrmsg(RTM_DELETE, ifa, 0, &rt0); +} int in6_mask2len(struct in6_addr *mask, u_char *lim0) @@ -174,9 +256,6 @@ in6_mask2len(struct in6_addr *mask, u_ch return x * 8 + y; } -#define ifa2ia6(ifa) ((struct in6_ifaddr *)(ifa)) -#define ia62ifa(ia6) (&((ia6)->ia_ifa)) - #ifdef COMPAT_FREEBSD32 struct in6_ndifreq32 { char ifname[IFNAMSIZ]; @@ -1218,9 +1297,6 @@ in6_purgeaddr(struct ifaddr *ifa) struct in6_ifaddr *ia = (struct in6_ifaddr *) ifa; struct in6_multi_mship *imm; struct sockaddr_in6 mltaddr, mltmask; - struct rtentry rt0; - struct sockaddr_dl gateway; - struct sockaddr_in6 mask, addr; int plen, error; struct rtentry *rt; struct ifaddr *ifa0, *nifa; @@ -1259,28 +1335,7 @@ in6_purgeaddr(struct ifaddr *ifa) /* stop DAD processing */ nd6_dad_stop(ifa); - IF_AFDATA_LOCK(ifp); - lla_lookup(LLTABLE6(ifp), (LLE_DELETE | LLE_IFADDR), - (struct sockaddr *)&ia->ia_addr); - IF_AFDATA_UNLOCK(ifp); - - /* - * initialize for rtmsg generation - */ - bzero(&gateway, sizeof(gateway)); - gateway.sdl_len = sizeof(gateway); - gateway.sdl_family = AF_LINK; - gateway.sdl_nlen = 0; - gateway.sdl_alen = ifp->if_addrlen; - /* */ - bzero(&rt0, sizeof(rt0)); - rt0.rt_gateway = (struct sockaddr *)&gateway; - memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask)); - memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr)); - rt_mask(&rt0) = (struct sockaddr *)&mask; - rt_key(&rt0) = (struct sockaddr *)&addr; - rt0.rt_flags = RTF_HOST | RTF_STATIC; - rt_newaddrmsg(RTM_DELETE, ifa, 0, &rt0); + in6_ifremloop(ifa); /* * leave from multicast groups we have joined for the interface @@ -1823,46 +1878,8 @@ in6_ifinit(struct ifnet *ifp, struct in6 } /* Add ownaddr as loopback rtentry, if necessary (ex. on p2p link). */ - if (newhost) { - struct llentry *ln; - struct rtentry rt; - struct sockaddr_dl gateway; - struct sockaddr_in6 mask, addr; - - IF_AFDATA_LOCK(ifp); - ia->ia_ifa.ifa_rtrequest = NULL; - - /* XXX QL - * we need to report rt_newaddrmsg - */ - ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | LLE_EXCLUSIVE), - (struct sockaddr *)&ia->ia_addr); - IF_AFDATA_UNLOCK(ifp); - if (ln != NULL) { - ln->la_expire = 0; /* for IPv6 this means permanent */ - ln->ln_state = ND6_LLINFO_REACHABLE; - /* - * initialize for rtmsg generation - */ - bzero(&gateway, sizeof(gateway)); - gateway.sdl_len = sizeof(gateway); - gateway.sdl_family = AF_LINK; - gateway.sdl_nlen = 0; - gateway.sdl_alen = 6; - memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned, sizeof(ln->ll_addr)); - /* */ - LLE_WUNLOCK(ln); - } - - bzero(&rt, sizeof(rt)); - rt.rt_gateway = (struct sockaddr *)&gateway; - memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask)); - memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr)); - rt_mask(&rt) = (struct sockaddr *)&mask; - rt_key(&rt) = (struct sockaddr *)&addr; - rt.rt_flags = RTF_UP | RTF_HOST | RTF_STATIC; - rt_newaddrmsg(RTM_ADD, &ia->ia_ifa, 0, &rt); - } + if (newhost) + in6_ifaddloop(&(ia->ia_ifa)); return (error); } From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 20 15:55:02 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37537106566B; Thu, 20 Oct 2011 15:55:02 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05E0A8FC0A; Thu, 20 Oct 2011 15:55:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KFt13A081296; Thu, 20 Oct 2011 15:55:01 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KFt1jR081295; Thu, 20 Oct 2011 15:55:01 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110201555.p9KFt1jR081295@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 20 Oct 2011 15:55:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226571 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 15:55:02 -0000 Author: glebius Date: Thu Oct 20 15:55:01 2011 New Revision: 226571 URL: http://svn.freebsd.org/changeset/base/226571 Log: MFhead r226367: Never switch directly from INIT to MASTER, since this produces nasty status flaps. PR: kern/161123 Submitted by: Damien Fleuriot OpenBSD: ip_carp.c, rev. 1.115 Approved by: re (kib) Modified: stable/9/sys/netinet/ip_carp.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/netinet/ip_carp.c ============================================================================== --- stable/9/sys/netinet/ip_carp.c Thu Oct 20 15:53:26 2011 (r226570) +++ stable/9/sys/netinet/ip_carp.c Thu Oct 20 15:55:01 2011 (r226571) @@ -1424,24 +1424,10 @@ carp_setrun(struct carp_softc *sc, sa_fa switch (sc->sc_state) { case INIT: - if (carp_opts[CARPCTL_PREEMPT] && !carp_suppress_preempt) { - carp_send_ad_locked(sc); -#ifdef INET - carp_send_arp(sc); -#endif -#ifdef INET6 - carp_send_na(sc); -#endif /* INET6 */ - CARP_LOG("%s: INIT -> MASTER (preempting)\n", - SC2IFP(sc)->if_xname); - carp_set_state(sc, MASTER); - carp_setroute(sc, RTM_ADD); - } else { - CARP_LOG("%s: INIT -> BACKUP\n", SC2IFP(sc)->if_xname); - carp_set_state(sc, BACKUP); - carp_setroute(sc, RTM_DELETE); - carp_setrun(sc, 0); - } + CARP_LOG("%s: INIT -> BACKUP\n", SC2IFP(sc)->if_xname); + carp_set_state(sc, BACKUP); + carp_setroute(sc, RTM_DELETE); + carp_setrun(sc, 0); break; case BACKUP: callout_stop(&sc->sc_ad_tmo); From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 20 15:58:06 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23317106566B; Thu, 20 Oct 2011 15:58:06 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10EE28FC12; Thu, 20 Oct 2011 15:58:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KFw5eu081446; Thu, 20 Oct 2011 15:58:05 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KFw550081440; Thu, 20 Oct 2011 15:58:05 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110201558.p9KFw550081440@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 20 Oct 2011 15:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226572 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 15:58:06 -0000 Author: glebius Date: Thu Oct 20 15:58:05 2011 New Revision: 226572 URL: http://svn.freebsd.org/changeset/base/226572 Log: MFhead 226401,226402: Remove last remnants of classful addressing: - Remove ia_net, ia_netmask, ia_netbroadcast from struct in_ifaddr. - Remove net.inet.ip.subnetsarelocal, I bet no one need it in 2011. - fix bug when we were not forwarding to a host which matches classful net address. For example router having 192.168.x.y/16 network attached, would not forward traffic to 192.168.*.0, which are legal IPs in CIDR world. - For compatibility, leave autoguessing of mask based on class. Reviewed by: andre, bz, rwatson Add support for IPv4 /31 prefixes, as described in RFC3021. To run a /31 network, participating hosts MUST drop support for directed broadcasts, and treat the first and last addresses on subnet as unicast. The broadcast address for the prefix should be the link local broadcast address, INADDR_BROADCAST. Approved by: re (kib) Modified: stable/9/sys/netinet/in.c stable/9/sys/netinet/in.h stable/9/sys/netinet/in_debug.c stable/9/sys/netinet/in_var.h stable/9/sys/netinet/ip_input.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/netinet/in.c ============================================================================== --- stable/9/sys/netinet/in.c Thu Oct 20 15:55:01 2011 (r226571) +++ stable/9/sys/netinet/in.c Thu Oct 20 15:58:05 2011 (r226572) @@ -76,11 +76,6 @@ static int in_ifinit(struct ifnet *, struct in_ifaddr *, struct sockaddr_in *, int); static void in_purgemaddrs(struct ifnet *); -static VNET_DEFINE(int, subnetsarelocal); -#define V_subnetsarelocal VNET(subnetsarelocal) -SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, - &VNET_NAME(subnetsarelocal), 0, - "Treat all subnets as directly connected"); static VNET_DEFINE(int, sameprefixcarponly); #define V_sameprefixcarponly VNET(sameprefixcarponly) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG_RW, @@ -95,9 +90,7 @@ VNET_DECLARE(struct arpstat, arpstat); /* * Return 1 if an internet address is for a ``local'' host - * (one to which we have a connection). If subnetsarelocal - * is true, this includes other subnets of the local net. - * Otherwise, it includes only the directly-connected (sub)nets. + * (one to which we have a connection). */ int in_localaddr(struct in_addr in) @@ -106,19 +99,10 @@ in_localaddr(struct in_addr in) register struct in_ifaddr *ia; IN_IFADDR_RLOCK(); - if (V_subnetsarelocal) { - TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) { - if ((i & ia->ia_netmask) == ia->ia_net) { - IN_IFADDR_RUNLOCK(); - return (1); - } - } - } else { - TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) { - if ((i & ia->ia_subnetmask) == ia->ia_subnet) { - IN_IFADDR_RUNLOCK(); - return (1); - } + TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) { + if ((i & ia->ia_subnetmask) == ia->ia_subnet) { + IN_IFADDR_RUNLOCK(); + return (1); } } IN_IFADDR_RUNLOCK(); @@ -890,23 +874,19 @@ in_ifinit(struct ifnet *ifp, struct in_i in_ifscrub(ifp, ia, LLE_STATIC); ia->ia_ifa.ifa_addr = (struct sockaddr *)&ia->ia_addr; } - if (IN_CLASSA(i)) - ia->ia_netmask = IN_CLASSA_NET; - else if (IN_CLASSB(i)) - ia->ia_netmask = IN_CLASSB_NET; - else - ia->ia_netmask = IN_CLASSC_NET; /* - * The subnet mask usually includes at least the standard network part, - * but may may be smaller in the case of supernetting. - * If it is set, we believe it. + * Be compatible with network classes, if netmask isn't supplied, + * guess it based on classes. */ if (ia->ia_subnetmask == 0) { - ia->ia_subnetmask = ia->ia_netmask; + if (IN_CLASSA(i)) + ia->ia_subnetmask = IN_CLASSA_NET; + else if (IN_CLASSB(i)) + ia->ia_subnetmask = IN_CLASSB_NET; + else + ia->ia_subnetmask = IN_CLASSC_NET; ia->ia_sockmask.sin_addr.s_addr = htonl(ia->ia_subnetmask); - } else - ia->ia_netmask &= ia->ia_subnetmask; - ia->ia_net = i & ia->ia_netmask; + } ia->ia_subnet = i & ia->ia_subnetmask; in_socktrim(&ia->ia_sockmask); /* @@ -919,10 +899,11 @@ in_ifinit(struct ifnet *ifp, struct in_i */ ia->ia_ifa.ifa_metric = ifp->if_metric; if (ifp->if_flags & IFF_BROADCAST) { - ia->ia_broadaddr.sin_addr.s_addr = - htonl(ia->ia_subnet | ~ia->ia_subnetmask); - ia->ia_netbroadcast.s_addr = - htonl(ia->ia_net | ~ ia->ia_netmask); + if (ia->ia_subnetmask == IN_RFC3021_MASK) + ia->ia_broadaddr.sin_addr.s_addr = INADDR_BROADCAST; + else + ia->ia_broadaddr.sin_addr.s_addr = + htonl(ia->ia_subnet | ~ia->ia_subnetmask); } else if (ifp->if_flags & IFF_LOOPBACK) { ia->ia_dstaddr = ia->ia_addr; flags |= RTF_HOST; @@ -1253,11 +1234,12 @@ in_broadcast(struct in_addr in, struct i TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) if (ifa->ifa_addr->sa_family == AF_INET && (in.s_addr == ia->ia_broadaddr.sin_addr.s_addr || - in.s_addr == ia->ia_netbroadcast.s_addr || /* - * Check for old-style (host 0) broadcast. + * Check for old-style (host 0) broadcast, but + * taking into account that RFC 3021 obsoletes it. */ - t == ia->ia_subnet || t == ia->ia_net) && + (ia->ia_subnetmask != IN_RFC3021_MASK && + t == ia->ia_subnet)) && /* * Check for an all one subnetmask. These * only exist when an interface gets a secondary Modified: stable/9/sys/netinet/in.h ============================================================================== --- stable/9/sys/netinet/in.h Thu Oct 20 15:55:01 2011 (r226571) +++ stable/9/sys/netinet/in.h Thu Oct 20 15:58:05 2011 (r226572) @@ -392,6 +392,8 @@ __END_DECLS #define IN_LOOPBACKNET 127 /* official! */ +#define IN_RFC3021_MASK (u_int32_t)0xfffffffe + /* * Options for use with [gs]etsockopt at the IP level. * First word of comment is data type; bool is stored in int. Modified: stable/9/sys/netinet/in_debug.c ============================================================================== --- stable/9/sys/netinet/in_debug.c Thu Oct 20 15:55:01 2011 (r226571) +++ stable/9/sys/netinet/in_debug.c Thu Oct 20 15:58:05 2011 (r226572) @@ -86,11 +86,8 @@ in_show_in_ifaddr(struct in_ifaddr *ia) #define IA_DB_RPINTF_DPTR(f, e) db_printf("\t *%s = " f "\n", #e, *ia->e); db_printf("\tin_ifaddr = %p\n", ia); IA_DB_RPINTF_PTR("%p", ia_ifa); - IA_DB_RPINTF("0x%08lx", ia_net); - IA_DB_RPINTF("0x%08lx", ia_netmask); IA_DB_RPINTF("0x%08lx", ia_subnet); IA_DB_RPINTF("0x%08lx", ia_subnetmask); - IA_DB_RPINTF("0x%08x", ia_netbroadcast.s_addr); IA_DB_RPINTF("%p", ia_hash.le_next); IA_DB_RPINTF("%p", ia_hash.le_prev); IA_DB_RPINTF_DPTR("%p", ia_hash.le_prev); Modified: stable/9/sys/netinet/in_var.h ============================================================================== --- stable/9/sys/netinet/in_var.h Thu Oct 20 15:55:01 2011 (r226571) +++ stable/9/sys/netinet/in_var.h Thu Oct 20 15:58:05 2011 (r226572) @@ -60,12 +60,9 @@ struct in_ifaddr { struct ifaddr ia_ifa; /* protocol-independent info */ #define ia_ifp ia_ifa.ifa_ifp #define ia_flags ia_ifa.ifa_flags - /* ia_{,sub}net{,mask} in host order */ - u_long ia_net; /* network number of interface */ - u_long ia_netmask; /* mask of net part */ - u_long ia_subnet; /* subnet number, including net */ - u_long ia_subnetmask; /* mask of subnet part */ - struct in_addr ia_netbroadcast; /* to recognize net broadcasts */ + /* ia_subnet{,mask} in host order */ + u_long ia_subnet; /* subnet address */ + u_long ia_subnetmask; /* mask of subnet */ LIST_ENTRY(in_ifaddr) ia_hash; /* entry in bucket of inet addresses */ TAILQ_ENTRY(in_ifaddr) ia_link; /* list of internet addresses */ struct sockaddr_in ia_addr; /* reserve space for interface name */ Modified: stable/9/sys/netinet/ip_input.c ============================================================================== --- stable/9/sys/netinet/ip_input.c Thu Oct 20 15:55:01 2011 (r226571) +++ stable/9/sys/netinet/ip_input.c Thu Oct 20 15:58:05 2011 (r226572) @@ -622,11 +622,6 @@ passin: IF_ADDR_UNLOCK(ifp); goto ours; } - if (ia->ia_netbroadcast.s_addr == ip->ip_dst.s_addr) { - ifa_ref(ifa); - IF_ADDR_UNLOCK(ifp); - goto ours; - } #ifdef BOOTP_COMPAT if (IA_SIN(ia)->sin_addr.s_addr == INADDR_ANY) { ifa_ref(ifa); From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 20 16:08:11 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B2DD1065673; Thu, 20 Oct 2011 16:08:11 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8965C8FC14; Thu, 20 Oct 2011 16:08:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KG8BOs081808; Thu, 20 Oct 2011 16:08:11 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KG8BUO081802; Thu, 20 Oct 2011 16:08:11 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201110201608.p9KG8BUO081802@svn.freebsd.org> From: Gabor Kovesdan Date: Thu, 20 Oct 2011 16:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226573 - in stable/9/usr.bin/grep: . regex X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 16:08:11 -0000 Author: gabor Date: Thu Oct 20 16:08:11 2011 New Revision: 226573 URL: http://svn.freebsd.org/changeset/base/226573 Log: MFC r226432, r226273: - Use getprogname() instead of __progname - Allow disabling bzip2 support with WITHOUT_BZIP2 - Fix handling patterns that start with a dot - Remove superfluous semicolon - Fix counting of match limit (-m) Approved by: re (kib), delphij (mentor, implicit) Modified: stable/9/usr.bin/grep/Makefile stable/9/usr.bin/grep/file.c stable/9/usr.bin/grep/grep.c stable/9/usr.bin/grep/regex/tre-fastmatch.c stable/9/usr.bin/grep/util.c Directory Properties: stable/9/usr.bin/grep/ (props changed) Modified: stable/9/usr.bin/grep/Makefile ============================================================================== --- stable/9/usr.bin/grep/Makefile Thu Oct 20 15:58:05 2011 (r226572) +++ stable/9/usr.bin/grep/Makefile Thu Oct 20 16:08:11 2011 (r226573) @@ -26,9 +26,6 @@ LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/zgrep \ ${BINDIR}/grep ${BINDIR}/zegrep \ ${BINDIR}/grep ${BINDIR}/zfgrep \ - ${BINDIR}/grep ${BINDIR}/bzgrep \ - ${BINDIR}/grep ${BINDIR}/bzegrep \ - ${BINDIR}/grep ${BINDIR}/bzfgrep \ ${BINDIR}/grep ${BINDIR}/xzgrep \ ${BINDIR}/grep ${BINDIR}/xzegrep \ ${BINDIR}/grep ${BINDIR}/xzfgrep \ @@ -41,9 +38,6 @@ MLINKS= grep.1 egrep.1 \ grep.1 zgrep.1 \ grep.1 zegrep.1 \ grep.1 zfgrep.1 \ - grep.1 bzgrep.1 \ - grep.1 bzegrep.1 \ - grep.1 bzfgrep.1 \ grep.1 xzgrep.1 \ grep.1 xzegrep.1 \ grep.1 xzfgrep.1 \ @@ -52,8 +46,22 @@ MLINKS= grep.1 egrep.1 \ grep.1 lzfgrep.1 .endif -LDADD= -lz -lbz2 -llzma -DPADD= ${LIBZ} ${LIBBZ2} ${LIBLZMA} +LDADD= -lz -llzma +DPADD= ${LIBZ} ${LIBLZMA} + +.if !defined(WITHOUT_BZIP2) +LDADD+= -lbz2 +DPADD+= ${LIBBZ2} + +LINKS+= ${BINDIR}/grep ${BINDIR}/bzgrep \ + ${BINDIR}/grep ${BINDIR}/bzegrep \ + ${BINDIR}/grep ${BINDIR}/bzfgrep +MLINKS+= grep.1 bzgrep.1 \ + grep.1 bzegrep.1 \ + grep.1 bzfgrep.1 +.else +CFLAGS+= -DWITHOUT_BZIP2 +.endif .if !defined(WITHOUT_GNU_COMPAT) CFLAGS+= -I/usr/include/gnu Modified: stable/9/usr.bin/grep/file.c ============================================================================== --- stable/9/usr.bin/grep/file.c Thu Oct 20 15:58:05 2011 (r226572) +++ stable/9/usr.bin/grep/file.c Thu Oct 20 16:08:11 2011 (r226573) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -51,14 +50,20 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef WITHOUT_BZIP2 +#include +#endif + #include "grep.h" #define MAXBUFSIZ (32 * 1024) #define LNBUFBUMP 80 static gzFile gzbufdesc; -static BZFILE* bzbufdesc; static lzma_stream lstrm = LZMA_STREAM_INIT; +#ifndef WITHOUT_BZIP2 +static BZFILE* bzbufdesc; +#endif static unsigned char *buffer; static unsigned char *bufpos; @@ -72,7 +77,6 @@ static inline int grep_refill(struct file *f) { ssize_t nr; - int bzerr; if (filebehave == FILE_MMAP) return (0); @@ -80,9 +84,12 @@ grep_refill(struct file *f) bufpos = buffer; bufrem = 0; - if (filebehave == FILE_GZIP) + if (filebehave == FILE_GZIP) { nr = gzread(gzbufdesc, buffer, MAXBUFSIZ); - else if (filebehave == FILE_BZIP && bzbufdesc != NULL) { +#ifndef WITHOUT_BZIP2 + } else if (filebehave == FILE_BZIP && bzbufdesc != NULL) { + int bzerr; + nr = BZ2_bzRead(&bzerr, bzbufdesc, buffer, MAXBUFSIZ); switch (bzerr) { case BZ_OK: @@ -108,6 +115,7 @@ grep_refill(struct file *f) /* Make sure we exit with an error */ nr = -1; } +#endif } else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) { lzma_action action = LZMA_RUN; uint8_t in_buf[MAXBUFSIZ]; @@ -271,9 +279,11 @@ grep_open(const char *path) (gzbufdesc = gzdopen(f->fd, "r")) == NULL) goto error2; +#ifndef WITHOUT_BZIP2 if (filebehave == FILE_BZIP && (bzbufdesc = BZ2_bzdopen(f->fd, "r")) == NULL) goto error2; +#endif /* Fill read buffer, also catches errors early */ if (bufrem == 0 && grep_refill(f) != 0) Modified: stable/9/usr.bin/grep/grep.c ============================================================================== --- stable/9/usr.bin/grep/grep.c Thu Oct 20 15:58:05 2011 (r226572) +++ stable/9/usr.bin/grep/grep.c Thu Oct 20 16:08:11 2011 (r226573) @@ -150,15 +150,13 @@ bool prev; /* flag whether or not the int tail; /* lines left to print */ bool notfound; /* file not found */ -extern char *__progname; - /* * Prints usage information and returns 2. */ static void usage(void) { - fprintf(stderr, getstr(4), __progname); + fprintf(stderr, getstr(4), getprogname()); fprintf(stderr, "%s", getstr(5)); fprintf(stderr, "%s", getstr(5)); fprintf(stderr, "%s", getstr(6)); @@ -332,7 +330,8 @@ int main(int argc, char *argv[]) { char **aargv, **eargv, *eopts; - char *pn, *ep; + char *ep; + const char *pn; unsigned long long l; unsigned int aargc, eargc, i; int c, lastc, needpattern, newarg, prevoptind; @@ -346,7 +345,7 @@ main(int argc, char *argv[]) /* Check what is the program name of the binary. In this way we can have all the funcionalities in one binary without the need of scripting and using ugly hacks. */ - pn = __progname; + pn = getprogname(); if (pn[0] == 'b' && pn[1] == 'z') { filebehave = FILE_BZIP; pn += 2; @@ -508,6 +507,10 @@ main(int argc, char *argv[]) cflags |= REG_ICASE; break; case 'J': +#ifdef WITHOUT_BZIP2 + errno = EOPNOTSUPP; + err(2, "bzip2 support was disabled at compile-time"); +#endif filebehave = FILE_BZIP; break; case 'L': @@ -568,7 +571,7 @@ main(int argc, char *argv[]) filebehave = FILE_MMAP; break; case 'V': - printf(getstr(9), __progname, VERSION); + printf(getstr(9), getprogname(), VERSION); exit(0); case 'v': vflag = true; Modified: stable/9/usr.bin/grep/regex/tre-fastmatch.c ============================================================================== --- stable/9/usr.bin/grep/regex/tre-fastmatch.c Thu Oct 20 15:58:05 2011 (r226572) +++ stable/9/usr.bin/grep/regex/tre-fastmatch.c Thu Oct 20 16:08:11 2011 (r226573) @@ -1,4 +1,4 @@ -/* $FreeBSD$ */ +/* $FreeBSD$ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -548,7 +548,7 @@ tre_compile_fast(fastmatch_t *fg, const int cflags) { tre_char_t *tmp; - size_t pos = 0, hasdot = 0, whasdot = 0;; + size_t pos = 0, hasdot = 0, whasdot = 0; ssize_t firstdot = -1, wfirstdot = -1; bool escaped = false; bool *_escmap = NULL; @@ -694,7 +694,7 @@ badpat: return REG_BADPAT; } - fg->hasdot = whasdot; + fg->hasdot = wfirstdot > -1; /* * The pattern has been processed and copied to tmp as a literal string Modified: stable/9/usr.bin/grep/util.c ============================================================================== --- stable/9/usr.bin/grep/util.c Thu Oct 20 15:58:05 2011 (r226572) +++ stable/9/usr.bin/grep/util.c Thu Oct 20 16:08:11 2011 (r226573) @@ -233,7 +233,7 @@ procfile(const char *fn) linesqueued++; } c += t; - if (mflag && mcount < 0) + if (mflag && mcount <= 0) break; } if (Bflag > 0) From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 20 16:40:38 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8317E106566B; Thu, 20 Oct 2011 16:40:38 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 0F5F58FC14; Thu, 20 Oct 2011 16:40:38 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 2A89F25D388E; Thu, 20 Oct 2011 16:40:37 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 76BFABD3C46; Thu, 20 Oct 2011 16:40:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 3WnsghmqY3Bq; Thu, 20 Oct 2011 16:40:35 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id D2A42BD3C31; Thu, 20 Oct 2011 16:40:34 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201110201558.p9KFw550081440@svn.freebsd.org> Date: Thu, 20 Oct 2011 16:40:33 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <9A674915-EF68-4CEA-93CB-CDE349082019@FreeBSD.org> References: <201110201558.p9KFw550081440@svn.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1084) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r226572 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 16:40:38 -0000 On 20. Oct 2011, at 15:58 , Gleb Smirnoff wrote: > Author: glebius > Date: Thu Oct 20 15:58:05 2011 > New Revision: 226572 > URL: http://svn.freebsd.org/changeset/base/226572 >=20 > Log: > MFhead 226401,226402: >=20 > Remove last remnants of classful addressing: >=20 > - Remove ia_net, ia_netmask, ia_netbroadcast from struct in_ifaddr. > - Remove net.inet.ip.subnetsarelocal, I bet no one need it in 2011. > - fix bug when we were not forwarding to a host which matches = classful > net address. For example router having 192.168.x.y/16 network = attached, > would not forward traffic to 192.168.*.0, which are legal IPs in > CIDR world. > - For compatibility, leave autoguessing of mask based on class. >=20 > Reviewed by: andre, bz, rwatson >=20 > Add support for IPv4 /31 prefixes, as described in RFC3021. >=20 > To run a /31 network, participating hosts MUST drop support > for directed broadcasts, and treat the first and last addresses > on subnet as unicast. The broadcast address for the prefix > should be the link local broadcast address, INADDR_BROADCAST. ... > Modified: stable/9/sys/netinet/in_var.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/9/sys/netinet/in_var.h Thu Oct 20 15:55:01 2011 = (r226571) > +++ stable/9/sys/netinet/in_var.h Thu Oct 20 15:58:05 2011 = (r226572) > @@ -60,12 +60,9 @@ struct in_ifaddr { > struct ifaddr ia_ifa; /* protocol-independent info */ > #define ia_ifp ia_ifa.ifa_ifp > #define ia_flags ia_ifa.ifa_flags > - /* ia_{,sub}net{,mask} in host = order */ > - u_long ia_net; /* network number of interface = */ > - u_long ia_netmask; /* mask of net part */ > - u_long ia_subnet; /* subnet number, including net = */ > - u_long ia_subnetmask; /* mask of subnet part */ > - struct in_addr ia_netbroadcast; /* to recognize net broadcasts = */ > + /* ia_subnet{,mask} in host = order */ > + u_long ia_subnet; /* subnet address */ > + u_long ia_subnetmask; /* mask of subnet */ > LIST_ENTRY(in_ifaddr) ia_hash; /* entry in bucket of inet = addresses */ > TAILQ_ENTRY(in_ifaddr) ia_link; /* list of internet addresses */ > struct sockaddr_in ia_addr; /* reserve space for interface = name */ This should at least break parts of netstat and ifmcstat as I had told = you in private email before. --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 20 17:09:54 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 051E41065676; Thu, 20 Oct 2011 17:09:54 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7FE68FC14; Thu, 20 Oct 2011 17:09:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KH9reb083752; Thu, 20 Oct 2011 17:09:53 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KH9rJS083750; Thu, 20 Oct 2011 17:09:53 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201110201709.p9KH9rJS083750@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 20 Oct 2011 17:09:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226574 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 17:09:54 -0000 Author: np Date: Thu Oct 20 17:09:53 2011 New Revision: 226574 URL: http://svn.freebsd.org/changeset/base/226574 Log: MFC r226318: Make sure the inp wasn't dropped when rexmt let go of the inp and pcbinfo locks. Approved by: re (kib) Modified: stable/9/sys/netinet/tcp_timer.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/tcp_timer.c ============================================================================== --- stable/9/sys/netinet/tcp_timer.c Thu Oct 20 16:08:11 2011 (r226573) +++ stable/9/sys/netinet/tcp_timer.c Thu Oct 20 17:09:53 2011 (r226574) @@ -495,6 +495,13 @@ tcp_timer_rexmt(void * xtp) CURVNET_RESTORE(); return; } + if (inp->inp_flags & INP_DROPPED) { + INP_WUNLOCK(inp); + INP_INFO_WUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); + return; + } + tp = tcp_drop(tp, tp->t_softerror ? tp->t_softerror : ETIMEDOUT); headlocked = 1; From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 20 17:33:23 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53FB51065673; Thu, 20 Oct 2011 17:33:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4270D8FC19; Thu, 20 Oct 2011 17:33:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KHXND5084529; Thu, 20 Oct 2011 17:33:23 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KHXN93084527; Thu, 20 Oct 2011 17:33:23 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201110201733.p9KHXN93084527@svn.freebsd.org> From: Dimitry Andric Date: Thu, 20 Oct 2011 17:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226575 - stable/9/gnu/usr.bin/cc/cc_tools X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 17:33:23 -0000 Author: dim Date: Thu Oct 20 17:33:22 2011 New Revision: 226575 URL: http://svn.freebsd.org/changeset/base/226575 Log: Update gcc's __FreeBSD__ and __FreeBSD_cc_version macros for FreeBSD 9. This is a direct commit to stable/9, since the macro values are different in head. Approved by: re (kib) Modified: stable/9/gnu/usr.bin/cc/cc_tools/freebsd-native.h Modified: stable/9/gnu/usr.bin/cc/cc_tools/freebsd-native.h ============================================================================== --- stable/9/gnu/usr.bin/cc/cc_tools/freebsd-native.h Thu Oct 20 17:09:53 2011 (r226574) +++ stable/9/gnu/usr.bin/cc/cc_tools/freebsd-native.h Thu Oct 20 17:33:22 2011 (r226575) @@ -7,8 +7,8 @@ #define FREEBSD_NATIVE 1 /* Fake out gcc/config/freebsd.h. */ -#define FBSD_MAJOR 8 -#define FBSD_CC_VER 800001 /* form like __FreeBSD_version */ +#define FBSD_MAJOR 9 +#define FBSD_CC_VER 900001 /* form like __FreeBSD_version */ #undef SYSTEM_INCLUDE_DIR /* We don't need one for now. */ #undef TOOL_INCLUDE_DIR /* We don't need one for now. */ From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 20 18:39:01 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C73FE106564A; Thu, 20 Oct 2011 18:39:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B512E8FC13; Thu, 20 Oct 2011 18:39:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KId1dd086600; Thu, 20 Oct 2011 18:39:01 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KId1px086598; Thu, 20 Oct 2011 18:39:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110201839.p9KId1px086598@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 20 Oct 2011 18:39:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226576 - stable/9/sys/dev/iscsi/initiator X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 18:39:01 -0000 Author: kib Date: Thu Oct 20 18:39:01 2011 New Revision: 226576 URL: http://svn.freebsd.org/changeset/base/226576 Log: MFC r226208: Do not ignore block offsets. PR: kern/160943 Approved by: re (bz) Modified: stable/9/sys/dev/iscsi/initiator/iscsi_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/iscsi/initiator/iscsi_subr.c ============================================================================== --- stable/9/sys/dev/iscsi/initiator/iscsi_subr.c Thu Oct 20 17:33:22 2011 (r226575) +++ stable/9/sys/dev/iscsi/initiator/iscsi_subr.c Thu Oct 20 18:39:01 2011 (r226576) @@ -84,6 +84,7 @@ iscsi_r2t(isc_session_t *sp, pduq_t *opq caddr_t bp = csio->data_ptr; bo = ntohl(r2t->bo); + bp += MIN(bo, edtl - ddtl); bleft = ddtl; if(sp->opt.maxXmitDataSegmentLength > 0) // danny's RFC From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 20 18:47:58 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8387B1065677; Thu, 20 Oct 2011 18:47:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 583F28FC14; Thu, 20 Oct 2011 18:47:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KIlwth086947; Thu, 20 Oct 2011 18:47:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KIlwCP086944; Thu, 20 Oct 2011 18:47:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110201847.p9KIlwCP086944@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 20 Oct 2011 18:47:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226577 - in stable/9/sys: fs/devfs sys X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 18:47:58 -0000 Author: kib Date: Thu Oct 20 18:47:58 2011 New Revision: 226577 URL: http://svn.freebsd.org/changeset/base/226577 Log: MFC r226041: Export devfs inode number allocator for the kernel consumers. Approved by: re (bz) Modified: stable/9/sys/fs/devfs/devfs_devs.c stable/9/sys/sys/conf.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/devfs/devfs_devs.c ============================================================================== --- stable/9/sys/fs/devfs/devfs_devs.c Thu Oct 20 18:39:01 2011 (r226576) +++ stable/9/sys/fs/devfs/devfs_devs.c Thu Oct 20 18:47:58 2011 (r226577) @@ -171,8 +171,7 @@ devfs_free(struct cdev *cdev) cdp = cdev2priv(cdev); if (cdev->si_cred != NULL) crfree(cdev->si_cred); - if (cdp->cdp_inode > 0) - free_unr(devfs_inos, cdp->cdp_inode); + devfs_free_cdp_inode(cdp->cdp_inode); if (cdp->cdp_maxdirent > 0) free(cdp->cdp_dirents, M_DEVFS2); free(cdp, M_CDEVP); @@ -394,7 +393,7 @@ devfs_delete(struct devfs_mount *dm, str mac_devfs_destroy(de); #endif if (de->de_inode > DEVFS_ROOTINO) { - free_unr(devfs_inos, de->de_inode); + devfs_free_cdp_inode(de->de_inode); de->de_inode = 0; } if (DEVFS_DE_DROP(de)) @@ -685,6 +684,21 @@ devfs_destroy(struct cdev *dev) devfs_generation++; } +ino_t +devfs_alloc_cdp_inode(void) +{ + + return (alloc_unr(devfs_inos)); +} + +void +devfs_free_cdp_inode(ino_t ino) +{ + + if (ino > 0) + free_unr(devfs_inos, ino); +} + static void devfs_devs_init(void *junk __unused) { Modified: stable/9/sys/sys/conf.h ============================================================================== --- stable/9/sys/sys/conf.h Thu Oct 20 18:39:01 2011 (r226576) +++ stable/9/sys/sys/conf.h Thu Oct 20 18:47:58 2011 (r226577) @@ -301,6 +301,9 @@ int devfs_set_cdevpriv(void *priv, cdevp void devfs_clear_cdevpriv(void); void devfs_fpdrop(struct file *fp); /* XXX This is not public KPI */ +ino_t devfs_alloc_cdp_inode(void); +void devfs_free_cdp_inode(ino_t ino); + #define UID_ROOT 0 #define UID_BIN 3 #define UID_UUCP 66 From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 20 18:54:05 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 681A31065670; Thu, 20 Oct 2011 18:54:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55A0C8FC08; Thu, 20 Oct 2011 18:54:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KIs5kF087172; Thu, 20 Oct 2011 18:54:05 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KIs5Z8087169; Thu, 20 Oct 2011 18:54:05 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110201854.p9KIs5Z8087169@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 20 Oct 2011 18:54:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226578 - in stable/9/sys: kern sys X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 18:54:05 -0000 Author: kib Date: Thu Oct 20 18:54:05 2011 New Revision: 226578 URL: http://svn.freebsd.org/changeset/base/226578 Log: MFC r226042: Supply unique (st_dev, st_ino) value pair for the fstat(2) done on the pipes. Approved by: re (bz) Modified: stable/9/sys/kern/sys_pipe.c stable/9/sys/sys/pipe.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sys_pipe.c ============================================================================== --- stable/9/sys/kern/sys_pipe.c Thu Oct 20 18:47:58 2011 (r226577) +++ stable/9/sys/kern/sys_pipe.c Thu Oct 20 18:54:05 2011 (r226578) @@ -93,6 +93,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -224,6 +225,8 @@ static int pipe_zone_init(void *mem, int static void pipe_zone_fini(void *mem, int size); static uma_zone_t pipe_zone; +static struct unrhdr *pipeino_unr; +static dev_t pipedev_ino; SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_ANY, pipeinit, NULL); @@ -235,6 +238,10 @@ pipeinit(void *dummy __unused) pipe_zone_ctor, NULL, pipe_zone_init, pipe_zone_fini, UMA_ALIGN_PTR, 0); KASSERT(pipe_zone != NULL, ("pipe_zone not initialized")); + pipeino_unr = new_unrhdr(1, INT32_MAX, NULL); + KASSERT(pipeino_unr != NULL, ("pipe fake inodes not initialized")); + pipedev_ino = devfs_alloc_cdp_inode(); + KASSERT(pipedev_ino > 0, ("pipe dev inode not initialized")); } static int @@ -562,6 +569,12 @@ pipe_create(pipe, backing) /* If we're not backing this pipe, no need to do anything. */ error = 0; } + if (error == 0) { + pipe->pipe_ino = alloc_unr(pipeino_unr); + if (pipe->pipe_ino == -1) + /* pipeclose will clear allocated kva */ + error = ENOMEM; + } return (error); } @@ -1408,9 +1421,10 @@ pipe_stat(fp, ub, active_cred, td) ub->st_ctim = pipe->pipe_ctime; ub->st_uid = fp->f_cred->cr_uid; ub->st_gid = fp->f_cred->cr_gid; + ub->st_dev = pipedev_ino; + ub->st_ino = pipe->pipe_ino; /* - * Left as 0: st_dev, st_ino, st_nlink, st_rdev, st_flags, st_gen. - * XXX (st_dev, st_ino) should be unique. + * Left as 0: st_nlink, st_rdev, st_flags, st_gen. */ return (0); } @@ -1463,6 +1477,7 @@ pipeclose(cpipe) { struct pipepair *pp; struct pipe *ppipe; + ino_t ino; KASSERT(cpipe != NULL, ("pipeclose: cpipe == NULL")); @@ -1521,6 +1536,12 @@ pipeclose(cpipe) knlist_destroy(&cpipe->pipe_sel.si_note); /* + * Postpone the destroy of the fake inode number allocated for + * our end, until pipe mtx is unlocked. + */ + ino = cpipe->pipe_ino; + + /* * If both endpoints are now closed, release the memory for the * pipe pair. If not, unlock. */ @@ -1532,6 +1553,9 @@ pipeclose(cpipe) uma_zfree(pipe_zone, cpipe->pipe_pair); } else PIPE_UNLOCK(cpipe); + + if (ino > 0) + free_unr(pipeino_unr, cpipe->pipe_ino); } /*ARGSUSED*/ Modified: stable/9/sys/sys/pipe.h ============================================================================== --- stable/9/sys/sys/pipe.h Thu Oct 20 18:47:58 2011 (r226577) +++ stable/9/sys/sys/pipe.h Thu Oct 20 18:54:05 2011 (r226578) @@ -112,6 +112,7 @@ struct pipe { u_int pipe_state; /* pipe status info */ int pipe_busy; /* busy flag, mostly to handle rundown sanely */ int pipe_present; /* still present? */ + ino_t pipe_ino; /* fake inode for stat(2) */ }; /* From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 20 20:31:09 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93061106564A; Thu, 20 Oct 2011 20:31:09 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 813408FC14; Thu, 20 Oct 2011 20:31:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KKV9GY090386; Thu, 20 Oct 2011 20:31:09 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KKV98F090384; Thu, 20 Oct 2011 20:31:09 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201110202031.p9KKV98F090384@svn.freebsd.org> From: Xin LI Date: Thu, 20 Oct 2011 20:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226581 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 20:31:09 -0000 Author: delphij Date: Thu Oct 20 20:31:09 2011 New Revision: 226581 URL: http://svn.freebsd.org/changeset/base/226581 Log: MFC r226483: Fix a bug in sa_find_sizes() which could lead to panic: When calculating space needed for SA_BONUS buffers, hdrsize is always rounded up to next 8-aligned boundary. However, in two places the round up was done against sum of 'total' plus hdrsize. On the other hand, hdrsize increments by 4 each time, which means in certain conditions, we would end up returning with will_spill == 0 and (total + hdrsize) larger than full_space, leading to a failed assertion because it's invalid for dmu_set_bonus. Sponsored by: iXsystems, Inc. Reviewed by: mm Approved by: re (kib) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Thu Oct 20 19:23:21 2011 (r226580) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Thu Oct 20 20:31:09 2011 (r226581) @@ -605,14 +605,14 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_ * and spill buffer. */ if (buftype == SA_BONUS && *index == -1 && - P2ROUNDUP(*total + hdrsize, 8) > + (*total + P2ROUNDUP(hdrsize, 8)) > (full_space - sizeof (blkptr_t))) { *index = i; done = B_TRUE; } next: - if (P2ROUNDUP(*total + hdrsize, 8) > full_space && + if ((*total + P2ROUNDUP(hdrsize, 8)) > full_space && buftype == SA_BONUS) *will_spill = B_TRUE; } From owner-svn-src-stable-9@FreeBSD.ORG Thu Oct 20 20:33:32 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FF0D1065670; Thu, 20 Oct 2011 20:33:32 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F00D8FC1D; Thu, 20 Oct 2011 20:33:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9KKXWMH090504; Thu, 20 Oct 2011 20:33:32 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9KKXWEt090502; Thu, 20 Oct 2011 20:33:32 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201110202033.p9KKXWEt090502@svn.freebsd.org> From: Xin LI Date: Thu, 20 Oct 2011 20:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226582 - stable/9/sys/dev/tws X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2011 20:33:32 -0000 Author: delphij Date: Thu Oct 20 20:33:31 2011 New Revision: 226582 URL: http://svn.freebsd.org/changeset/base/226582 Log: MFC r226476: Return BUS_PROBE_DEFAULT instead of 0 (BUS_PROBE_SPECIFIC), allowing vendor provided driver to override in kernel driver. Approved by: re (kib) Modified: stable/9/sys/dev/tws/tws.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/tws/tws.c ============================================================================== --- stable/9/sys/dev/tws/tws.c Thu Oct 20 20:31:09 2011 (r226581) +++ stable/9/sys/dev/tws/tws.c Thu Oct 20 20:33:31 2011 (r226582) @@ -172,7 +172,7 @@ tws_probe(device_t dev) first_ctlr = 0; } - return(0); + return(BUS_PROBE_DEFAULT); } return (ENXIO); } From owner-svn-src-stable-9@FreeBSD.ORG Fri Oct 21 05:37:40 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E00D1106566C; Fri, 21 Oct 2011 05:37:40 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE8118FC12; Fri, 21 Oct 2011 05:37:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L5be4P008040; Fri, 21 Oct 2011 05:37:40 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L5belh008038; Fri, 21 Oct 2011 05:37:40 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201110210537.p9L5belh008038@svn.freebsd.org> From: Mikolaj Golub Date: Fri, 21 Oct 2011 05:37:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226591 - stable/9/usr.bin/script X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 05:37:41 -0000 Author: trociny Date: Fri Oct 21 05:37:40 2011 New Revision: 226591 URL: http://svn.freebsd.org/changeset/base/226591 Log: MFC r226403: In r225809 the intention was to send VEOF only once if STDIN was not a terminal. Unfortunately the fix was incorrect and for flushtime > 0 it keept sending VEOF. Sent VEOF generates ^D\b\b echoed by the terminal, which was reported in bin/161526. Note, we still send VEOF at least once. Otherwise commands like below would hang forever: echo 1 |script /tmp/script.out cat PR: bin/161526 Reported by: Adrian Wontroba , Stefan Bethke Tested by: Stefan Bethke Approved by: re (kib) Modified: stable/9/usr.bin/script/script.c Directory Properties: stable/9/usr.bin/script/ (props changed) Modified: stable/9/usr.bin/script/script.c ============================================================================== --- stable/9/usr.bin/script/script.c Thu Oct 20 22:38:24 2011 (r226590) +++ stable/9/usr.bin/script/script.c Fri Oct 21 05:37:40 2011 (r226591) @@ -163,12 +163,15 @@ main(int argc, char *argv[]) FD_SET(master, &rfd); if (readstdin) FD_SET(STDIN_FILENO, &rfd); - if ((!readstdin && ttyflg) || flushtime > 0) { - tv.tv_sec = !readstdin && ttyflg ? 1 : - flushtime - (tvec - start); + if (!readstdin && ttyflg) { + tv.tv_sec = 1; tv.tv_usec = 0; tvp = &tv; readstdin = 1; + } else if (flushtime > 0) { + tv.tv_sec = flushtime - (tvec - start); + tv.tv_usec = 0; + tvp = &tv; } else { tvp = NULL; } From owner-svn-src-stable-9@FreeBSD.ORG Fri Oct 21 22:07:52 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA37E106566B; Fri, 21 Oct 2011 22:07:52 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF3408FC0A; Fri, 21 Oct 2011 22:07:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LM7qop043350; Fri, 21 Oct 2011 22:07:52 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LM7q1K043348; Fri, 21 Oct 2011 22:07:52 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201110212207.p9LM7q1K043348@svn.freebsd.org> From: Kirk McKusick Date: Fri, 21 Oct 2011 22:07:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226621 - stable/9/sbin/tunefs X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 22:07:53 -0000 Author: mckusick Date: Fri Oct 21 22:07:52 2011 New Revision: 226621 URL: http://svn.freebsd.org/changeset/base/226621 Log: MFC 226266: After creating a filesystem using newfs -j the time stamps are all zero and thus report as having been made in January 1970. Apart from looking a bit silly, it also triggers alarms from scripts that detect weird time stamps. This update sets all 4 (or 3, in the case of UFS1) time stamps to the current time when enabling journaling during newfs or later when enabling it with tunefs. Reported by: Hans Ottevanger Approved by: re (kib) Modified: stable/9/sbin/tunefs/tunefs.c Modified: stable/9/sbin/tunefs/tunefs.c ============================================================================== --- stable/9/sbin/tunefs/tunefs.c Fri Oct 21 21:49:34 2011 (r226620) +++ stable/9/sbin/tunefs/tunefs.c Fri Oct 21 22:07:52 2011 (r226621) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include /* the optimization warning string template */ @@ -923,6 +924,7 @@ journal_alloc(int64_t size) ino_t ino; int blks; int mode; + time_t utime; int i; cgp = &disk.d_cg; @@ -983,18 +985,26 @@ journal_alloc(int64_t size) */ dp2 = ip; dp1 = ip; + time(&utime); if (sblock.fs_magic == FS_UFS1_MAGIC) { bzero(dp1, sizeof(*dp1)); dp1->di_size = size; dp1->di_mode = IFREG | IREAD; dp1->di_nlink = 1; dp1->di_flags = SF_IMMUTABLE | SF_NOUNLINK | UF_NODUMP; + dp1->di_atime = utime; + dp1->di_mtime = utime; + dp1->di_ctime = utime; } else { bzero(dp2, sizeof(*dp2)); dp2->di_size = size; dp2->di_mode = IFREG | IREAD; dp2->di_nlink = 1; dp2->di_flags = SF_IMMUTABLE | SF_NOUNLINK | UF_NODUMP; + dp2->di_atime = utime; + dp2->di_mtime = utime; + dp2->di_ctime = utime; + dp2->di_birthtime = utime; } for (i = 0; i < NDADDR && resid; i++, resid--) { blk = journal_balloc(); From owner-svn-src-stable-9@FreeBSD.ORG Fri Oct 21 22:12:25 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 572A81065674; Fri, 21 Oct 2011 22:12:25 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45E7D8FC12; Fri, 21 Oct 2011 22:12:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LMCPvo043556; Fri, 21 Oct 2011 22:12:25 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LMCPDl043554; Fri, 21 Oct 2011 22:12:25 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201110212212.p9LMCPDl043554@svn.freebsd.org> From: Kirk McKusick Date: Fri, 21 Oct 2011 22:12:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226622 - stable/9/sys/kern X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 22:12:25 -0000 Author: mckusick Date: Fri Oct 21 22:12:24 2011 New Revision: 226622 URL: http://svn.freebsd.org/changeset/base/226622 Log: MFC: 226265 When unmounting a filesystem always wait for the vfs_busy lock to clear so that if no vnodes in the filesystem are actively in use the unmount will succeed rather than failing with EBUSY. Reported by: Garrett Cooper Reviewed by: Attilio Rao and Kostik Belousov Tested by: Garrett Cooper Approved by: re (kib) PR: kern/161016 Modified: stable/9/sys/kern/vfs_mount.c Modified: stable/9/sys/kern/vfs_mount.c ============================================================================== --- stable/9/sys/kern/vfs_mount.c Fri Oct 21 22:07:52 2011 (r226621) +++ stable/9/sys/kern/vfs_mount.c Fri Oct 21 22:12:24 2011 (r226622) @@ -1227,18 +1227,6 @@ dounmount(mp, flags, td) mp->mnt_kern_flag |= MNTK_UNMOUNTF; error = 0; if (mp->mnt_lockref) { - if ((flags & MNT_FORCE) == 0) { - mp->mnt_kern_flag &= ~(MNTK_UNMOUNT | MNTK_NOINSMNTQ | - MNTK_UNMOUNTF); - if (mp->mnt_kern_flag & MNTK_MWAIT) { - mp->mnt_kern_flag &= ~MNTK_MWAIT; - wakeup(mp); - } - MNT_IUNLOCK(mp); - if (coveredvp) - VOP_UNLOCK(coveredvp, 0); - return (EBUSY); - } mp->mnt_kern_flag |= MNTK_DRAINING; error = msleep(&mp->mnt_lockref, MNT_MTX(mp), PVFS, "mount drain", 0); From owner-svn-src-stable-9@FreeBSD.ORG Sat Oct 22 09:29:44 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6338E106564A; Sat, 22 Oct 2011 09:29:44 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 526D48FC08; Sat, 22 Oct 2011 09:29:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9M9Ti5V070818; Sat, 22 Oct 2011 09:29:44 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9M9TiWe070816; Sat, 22 Oct 2011 09:29:44 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201110220929.p9M9TiWe070816@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 22 Oct 2011 09:29:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226626 - stable/9/sys/dev/iwn X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 09:29:44 -0000 Author: bschmidt Date: Sat Oct 22 09:29:44 2011 New Revision: 226626 URL: http://svn.freebsd.org/changeset/base/226626 Log: Fix bmiss notifications, events should be sent when NOT scanning. Approved by: re (kib) Modified: stable/9/sys/dev/iwn/if_iwn.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/9/sys/dev/iwn/if_iwn.c Sat Oct 22 04:39:12 2011 (r226625) +++ stable/9/sys/dev/iwn/if_iwn.c Sat Oct 22 09:29:44 2011 (r226626) @@ -2929,7 +2929,7 @@ iwn_notif_intr(struct iwn_softc *sc) * reinitialize the sensitivity state machine. */ if (vap->iv_state == IEEE80211_S_RUN && - (ic->ic_flags & IEEE80211_F_SCAN) != 0) { + (ic->ic_flags & IEEE80211_F_SCAN) == 0) { if (misses > 5) (void)iwn_init_sensitivity(sc); if (misses >= vap->iv_bmissthreshold) { From owner-svn-src-stable-9@FreeBSD.ORG Sat Oct 22 17:51:45 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A37C4106574A; Sat, 22 Oct 2011 17:51:45 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92C4F8FC0C; Sat, 22 Oct 2011 17:51:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9MHpjrf089678; Sat, 22 Oct 2011 17:51:45 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9MHpjF4089676; Sat, 22 Oct 2011 17:51:45 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110221751.p9MHpjF4089676@svn.freebsd.org> From: Christian Brueffer Date: Sat, 22 Oct 2011 17:51:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226637 - stable/9/sys/kgssapi/krb5 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 17:51:45 -0000 Author: brueffer Date: Sat Oct 22 17:51:45 2011 New Revision: 226637 URL: http://svn.freebsd.org/changeset/base/226637 Log: MFC: r226185 Add missing break statement to make sure all 3DES etypes really are treated the same. Approved by: re (kib) Modified: stable/9/sys/kgssapi/krb5/krb5_mech.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/kgssapi/krb5/krb5_mech.c ============================================================================== --- stable/9/sys/kgssapi/krb5/krb5_mech.c Sat Oct 22 16:53:29 2011 (r226636) +++ stable/9/sys/kgssapi/krb5/krb5_mech.c Sat Oct 22 17:51:45 2011 (r226637) @@ -288,6 +288,7 @@ get_keys(struct krb5_context *kc) case ETYPE_DES3_CBC_SHA1: case ETYPE_OLD_DES3_CBC_SHA1: etype = ETYPE_DES3_CBC_SHA1; + break; default: etype = keydata->kk_type; From owner-svn-src-stable-9@FreeBSD.ORG Sat Oct 22 18:20:12 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 606A3106564A; Sat, 22 Oct 2011 18:20:12 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F9E88FC16; Sat, 22 Oct 2011 18:20:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9MIKChd090722; Sat, 22 Oct 2011 18:20:12 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9MIKCVt090720; Sat, 22 Oct 2011 18:20:12 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110221820.p9MIKCVt090720@svn.freebsd.org> From: Christian Brueffer Date: Sat, 22 Oct 2011 18:20:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226640 - stable/9/sys/compat/linux X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 18:20:12 -0000 Author: brueffer Date: Sat Oct 22 18:20:12 2011 New Revision: 226640 URL: http://svn.freebsd.org/changeset/base/226640 Log: MFC: r226247, r226253 Properly free linux_gidset in case of an error. Approved by: re (kib) Modified: stable/9/sys/compat/linux/linux_uid16.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/compat/linux/linux_uid16.c ============================================================================== --- stable/9/sys/compat/linux/linux_uid16.c Sat Oct 22 18:06:56 2011 (r226639) +++ stable/9/sys/compat/linux/linux_uid16.c Sat Oct 22 18:20:12 2011 (r226640) @@ -113,8 +113,10 @@ linux_setgroups16(struct thread *td, str return (EINVAL); linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t)); - if (error) + if (error) { + free(linux_gidset, M_TEMP); return (error); + } newcred = crget(); p = td->td_proc; PROC_LOCK(p);