From owner-svn-src-stable-9@FreeBSD.ORG Sun Sep 22 20:22:09 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 287407DA; Sun, 22 Sep 2013 20:22:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 14687246E; Sun, 22 Sep 2013 20:22:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8MKM8Lj052755; Sun, 22 Sep 2013 20:22:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MKM841052750; Sun, 22 Sep 2013 20:22:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201309222022.r8MKM841052750@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Sep 2013 20:22:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255799 - in stable/9/sys/modules: cam send X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 22 Sep 2013 20:22:09 -0000 Author: mav Date: Sun Sep 22 20:22:08 2013 New Revision: 255799 URL: http://svnweb.freebsd.org/changeset/base/255799 Log: MFC r255174: Add missing opt_* header dependencies. Modified: stable/9/sys/modules/cam/Makefile stable/9/sys/modules/send/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/modules/cam/Makefile ============================================================================== --- stable/9/sys/modules/cam/Makefile Sun Sep 22 19:54:47 2013 (r255798) +++ stable/9/sys/modules/cam/Makefile Sun Sep 22 20:22:08 2013 (r255799) @@ -14,6 +14,7 @@ SRCS+= opt_scsi.h SRCS+= opt_cd.h SRCS+= opt_pt.h SRCS+= opt_sa.h +SRCS+= opt_ses.h SRCS+= device_if.h bus_if.h vnode_if.h SRCS+= cam.c SRCS+= cam_compat.c Modified: stable/9/sys/modules/send/Makefile ============================================================================== --- stable/9/sys/modules/send/Makefile Sun Sep 22 19:54:47 2013 (r255798) +++ stable/9/sys/modules/send/Makefile Sun Sep 22 20:22:08 2013 (r255799) @@ -2,6 +2,6 @@ .PATH: ${.CURDIR}/../../netinet6 KMOD= send -SRCS= send.c +SRCS= send.c opt_kdtrace.h .include From owner-svn-src-stable-9@FreeBSD.ORG Mon Sep 23 07:53:59 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A293E3E8; Mon, 23 Sep 2013 07:53:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8F32C25C3; Mon, 23 Sep 2013 07:53:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8N7rxaI028382; Mon, 23 Sep 2013 07:53:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8N7rxmN028380; Mon, 23 Sep 2013 07:53:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309230753.r8N7rxmN028380@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 23 Sep 2013 07:53:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255811 - in stable/9/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 23 Sep 2013 07:53:59 -0000 Author: kib Date: Mon Sep 23 07:53:58 2013 New Revision: 255811 URL: http://svnweb.freebsd.org/changeset/base/255811 Log: MFC r255607: In pmap_copy(), when the copied region is mapped with superpage but does not cover entire superpage, avoid copying. MFC r255620: Merge the change r255607 from amd64 to i386. Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/i386/i386/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Mon Sep 23 07:20:13 2013 (r255810) +++ stable/9/sys/amd64/amd64/pmap.c Mon Sep 23 07:53:58 2013 (r255811) @@ -4107,6 +4107,8 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm continue; if (srcptepaddr & PG_PS) { + if ((addr & PDRMASK) != 0 || addr + NBPDR > end_addr) + continue; dstmpde = pmap_allocpde(dst_pmap, addr, NULL); if (dstmpde == NULL) break; Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Mon Sep 23 07:20:13 2013 (r255810) +++ stable/9/sys/i386/i386/pmap.c Mon Sep 23 07:53:58 2013 (r255811) @@ -4070,6 +4070,8 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm continue; if (srcptepaddr & PG_PS) { + if ((addr & PDRMASK) != 0 || addr + NBPDR > end_addr) + continue; if (dst_pmap->pm_pdir[ptepindex] == 0 && ((srcptepaddr & PG_MANAGED) == 0 || pmap_pv_insert_pde(dst_pmap, addr, srcptepaddr & From owner-svn-src-stable-9@FreeBSD.ORG Mon Sep 23 21:52:07 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D7CCFE9C; Mon, 23 Sep 2013 21:52:07 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C56EF2CB1; Mon, 23 Sep 2013 21:52:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8NLq7qZ094153; Mon, 23 Sep 2013 21:52:07 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NLq7do094150; Mon, 23 Sep 2013 21:52:07 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201309232152.r8NLq7do094150@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 23 Sep 2013 21:52:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255830 - stable/9/sys/dev/mps X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 23 Sep 2013 21:52:07 -0000 Author: ken Date: Mon Sep 23 21:52:07 2013 New Revision: 255830 URL: http://svnweb.freebsd.org/changeset/base/255830 Log: MFC r255501 This is slightly modified from the FreeBSD/head version, to include version checks for the scanning changes for not only FreeBSD/head (1000039 and higher) but also stable/9 (902502 and higher). ------------------------------------------------------------------------ r255501 | ken | 2013-09-12 16:06:12 -0600 (Thu, 12 Sep 2013) | 18 lines Fix an issue that caused Integrated RAID volumes on LSI mps(4) controllers to not get scanned on boot. The problem originated in change 253549. With the change to the mps(4) driver to scan only targets that it knows it has (as opposed to scanning the entire bus), scanning RAID volumes on boot was omitted. So, for versions of FreeBSD that have the scanning changes (__FreeBSD_version 1000039 and higher), scan RAID volumes that are added whether or not we're booting. PR: kern/181784 Reported by: Xiguang Wang Tested by: Dennis Glatting Sponsored by: Spectra Logic PR: kern/181784 Modified: stable/9/sys/dev/mps/mps_sas_lsi.c Modified: stable/9/sys/dev/mps/mps_sas_lsi.c ============================================================================== --- stable/9/sys/dev/mps/mps_sas_lsi.c Mon Sep 23 20:35:54 2013 (r255829) +++ stable/9/sys/dev/mps/mps_sas_lsi.c Mon Sep 23 21:52:07 2013 (r255830) @@ -892,7 +892,10 @@ mpssas_volume_add(struct mps_softc *sc, free(lun, M_MPT2); } SLIST_INIT(&targ->luns); +#if ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000039)) || \ + (__FreeBSD_version < 902502) if ((sassc->flags & MPSSAS_IN_STARTUP) == 0) +#endif mpssas_rescan_target(sc, targ); mps_dprint(sc, MPS_MAPPING, "RAID target id %d added (WWID = 0x%jx)\n", targ->tid, wwid); From owner-svn-src-stable-9@FreeBSD.ORG Mon Sep 23 22:04:20 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E30685F4; Mon, 23 Sep 2013 22:04:20 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B6A9C2D51; Mon, 23 Sep 2013 22:04:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8NM4KWF000234; Mon, 23 Sep 2013 22:04:20 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NM4KHB000233; Mon, 23 Sep 2013 22:04:20 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201309232204.r8NM4KHB000233@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 23 Sep 2013 22:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255831 - in stable/9/sys: . dev X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 23 Sep 2013 22:04:21 -0000 Author: ken Date: Mon Sep 23 22:04:20 2013 New Revision: 255831 URL: http://svnweb.freebsd.org/changeset/base/255831 Log: Add missing mergeinfo that should have gone in revision 255830, which was a MFC of 255501. This was caused by committing from sys/dev/mps instead of sys. Pointy hat to: ken Modified: Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) From owner-svn-src-stable-9@FreeBSD.ORG Tue Sep 24 12:48:03 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 40AC0880; Tue, 24 Sep 2013 12:48:03 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2DC862A74; Tue, 24 Sep 2013 12:48:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8OCm3e4074646; Tue, 24 Sep 2013 12:48:03 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OCm3R5074645; Tue, 24 Sep 2013 12:48:03 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201309241248.r8OCm3R5074645@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 24 Sep 2013 12:48:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255846 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Sep 2013 12:48:03 -0000 Author: trasz Date: Tue Sep 24 12:48:02 2013 New Revision: 255846 URL: http://svnweb.freebsd.org/changeset/base/255846 Log: MFC r254135: Don't dereference null pointer should acl_alloc() be passed M_NOWAIT and allocation failed. Nothing in the tree passed M_NOWAIT. Modified: stable/9/sys/kern/vfs_acl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_acl.c ============================================================================== --- stable/9/sys/kern/vfs_acl.c Tue Sep 24 12:26:43 2013 (r255845) +++ stable/9/sys/kern/vfs_acl.c Tue Sep 24 12:48:02 2013 (r255846) @@ -564,6 +564,9 @@ acl_alloc(int flags) struct acl *aclp; aclp = malloc(sizeof(*aclp), M_ACL, flags); + if (aclp == NULL) + return (NULL); + aclp->acl_maxcnt = ACL_MAX_ENTRIES; return (aclp); From owner-svn-src-stable-9@FreeBSD.ORG Tue Sep 24 12:50:04 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 93B119E4; Tue, 24 Sep 2013 12:50:04 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 817522A94; Tue, 24 Sep 2013 12:50:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8OCo4uS075307; Tue, 24 Sep 2013 12:50:04 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OCo4dI075306; Tue, 24 Sep 2013 12:50:04 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201309241250.r8OCo4dI075306@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 24 Sep 2013 12:50:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255847 - stable/9/usr.bin/su X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Sep 2013 12:50:04 -0000 Author: trasz Date: Tue Sep 24 12:50:04 2013 New Revision: 255847 URL: http://svnweb.freebsd.org/changeset/base/255847 Log: MFC r254215: In su(1), fix option ordering and clarify that the login class specified must be defined in login.conf. Modified: stable/9/usr.bin/su/su.1 Directory Properties: stable/9/usr.bin/su/ (props changed) Modified: stable/9/usr.bin/su/su.1 ============================================================================== --- stable/9/usr.bin/su/su.1 Tue Sep 24 12:48:02 2013 (r255846) +++ stable/9/usr.bin/su/su.1 Tue Sep 24 12:50:04 2013 (r255847) @@ -28,7 +28,7 @@ .\" @(#)su.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd June 6, 2011 +.Dd August 11, 2013 .Dt SU 1 .Os .Sh NAME @@ -37,8 +37,8 @@ .Sh SYNOPSIS .Nm .Op Fl -.Op Fl flms .Op Fl c Ar class +.Op Fl flms .Op Ar login Op Ar args .Sh DESCRIPTION The @@ -85,6 +85,11 @@ are also normally retained unless the ta .Pp The options are as follows: .Bl -tag -width Ds +.It Fl c Ar class +Use the settings of the specified login class. +The login class must be defined in +.Xr login.conf 5 . +Only allowed for the super-user. .It Fl f If the invoked shell is .Xr csh 1 , @@ -139,9 +144,6 @@ is not sufficient to transition to the u If the label cannot be set, .Nm will fail. -.It Fl c Ar class -Use the settings of the specified login class. -Only allowed for the super-user. .El .Pp The From owner-svn-src-stable-9@FreeBSD.ORG Tue Sep 24 17:09:29 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5720A9F1; Tue, 24 Sep 2013 17:09:29 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4485C2B3A; Tue, 24 Sep 2013 17:09:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8OH9TB3017608; Tue, 24 Sep 2013 17:09:29 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OH9Tr7017606; Tue, 24 Sep 2013 17:09:29 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201309241709.r8OH9Tr7017606@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 24 Sep 2013 17:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255856 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Sep 2013 17:09:29 -0000 Author: jh Date: Tue Sep 24 17:09:28 2013 New Revision: 255856 URL: http://svnweb.freebsd.org/changeset/base/255856 Log: MFC r250706: A library function shall not set errno to 0. Modified: stable/9/sys/kern/subr_sbuf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_sbuf.c ============================================================================== --- stable/9/sys/kern/subr_sbuf.c Tue Sep 24 17:01:29 2013 (r255855) +++ stable/9/sys/kern/subr_sbuf.c Tue Sep 24 17:09:28 2013 (r255856) @@ -706,9 +706,10 @@ sbuf_finish(struct sbuf *s) #ifdef _KERNEL return (s->s_error); #else - errno = s->s_error; - if (s->s_error) + if (s->s_error != 0) { + errno = s->s_error; return (-1); + } return (0); #endif } From owner-svn-src-stable-9@FreeBSD.ORG Tue Sep 24 20:38:56 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B67D8C35; Tue, 24 Sep 2013 20:38:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 93D59292A; Tue, 24 Sep 2013 20:38:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8OKcudF033616; Tue, 24 Sep 2013 20:38:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OKctft033611; Tue, 24 Sep 2013 20:38:55 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201309242038.r8OKctft033611@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Sep 2013 20:38:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255862 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 24 Sep 2013 20:38:56 -0000 Author: jhb Date: Tue Sep 24 20:38:55 2013 New Revision: 255862 URL: http://svnweb.freebsd.org/changeset/base/255862 Log: MFC 240424,244582: Improve check coverage about idle threads. Idle threads are not allowed to acquire any lock but spinlocks. Deny any attempt to do so by panicing at the locking operation when INVARIANTS is on. Then, remove the check on blocking on a turnstile. The check in sleepqueues is left because they are not allowed to use tsleep() either which could happen still. On entering KDB backends, the hijacked thread to run interrupt context can still be idlethread. At that point, without the panic condition, it can still happen that idlethread then will try to acquire some locks to carry on some operations. Skip the idlethread check on block/sleep lock operations when KDB is active. Modified: stable/9/sys/kern/kern_lock.c stable/9/sys/kern/kern_mutex.c stable/9/sys/kern/kern_rmlock.c stable/9/sys/kern/kern_rwlock.c stable/9/sys/kern/kern_sx.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_lock.c ============================================================================== --- stable/9/sys/kern/kern_lock.c Tue Sep 24 20:14:59 2013 (r255861) +++ stable/9/sys/kern/kern_lock.c Tue Sep 24 20:38:55 2013 (r255862) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -472,6 +473,9 @@ __lockmgr_args(struct lock *lk, u_int fl KASSERT((flags & LK_INTERLOCK) == 0 || ilk != NULL, ("%s: LK_INTERLOCK passed without valid interlock @ %s:%d", __func__, file, line)); + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("%s: idle thread %p on lockmgr %s @ %s:%d", __func__, curthread, + lk->lock_object.lo_name, file, line)); class = (flags & LK_INTERLOCK) ? LOCK_CLASS(ilk) : NULL; if (panicstr != NULL) { Modified: stable/9/sys/kern/kern_mutex.c ============================================================================== --- stable/9/sys/kern/kern_mutex.c Tue Sep 24 20:14:59 2013 (r255861) +++ stable/9/sys/kern/kern_mutex.c Tue Sep 24 20:38:55 2013 (r255862) @@ -199,6 +199,9 @@ _mtx_lock_flags(struct mtx *m, int opts, if (SCHEDULER_STOPPED()) return; + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("mtx_lock() by idle thread %p on sleep mutex %s @ %s:%d", + curthread, m->lock_object.lo_name, file, line)); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_lock() of destroyed mutex @ %s:%d", file, line)); KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_sleep, @@ -295,6 +298,9 @@ _mtx_trylock(struct mtx *m, int opts, co if (SCHEDULER_STOPPED()) return (1); + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("mtx_trylock() by idle thread %p on sleep mutex %s @ %s:%d", + curthread, m->lock_object.lo_name, file, line)); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_trylock() of destroyed mutex @ %s:%d", file, line)); KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_sleep, Modified: stable/9/sys/kern/kern_rmlock.c ============================================================================== --- stable/9/sys/kern/kern_rmlock.c Tue Sep 24 20:14:59 2013 (r255861) +++ stable/9/sys/kern/kern_rmlock.c Tue Sep 24 20:38:55 2013 (r255862) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -494,6 +495,9 @@ void _rm_wlock_debug(struct rmlock *rm, if (SCHEDULER_STOPPED()) return; + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("rm_wlock() by idle thread %p on rmlock %s @ %s:%d", + curthread, rm->lock_object.lo_name, file, line)); WITNESS_CHECKORDER(&rm->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); @@ -536,6 +540,9 @@ _rm_rlock_debug(struct rmlock *rm, struc if (SCHEDULER_STOPPED()) return (1); + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("rm_rlock() by idle thread %p on rmlock %s @ %s:%d", + curthread, rm->lock_object.lo_name, file, line)); if (!trylock && (rm->lock_object.lo_flags & RM_SLEEPABLE)) WITNESS_CHECKORDER(&rm->rm_lock_sx.lock_object, LOP_NEWORDER, file, line, NULL); Modified: stable/9/sys/kern/kern_rwlock.c ============================================================================== --- stable/9/sys/kern/kern_rwlock.c Tue Sep 24 20:14:59 2013 (r255861) +++ stable/9/sys/kern/kern_rwlock.c Tue Sep 24 20:38:55 2013 (r255862) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "opt_no_adaptive_rwlocks.h" #include +#include #include #include #include @@ -237,6 +238,9 @@ _rw_wlock(struct rwlock *rw, const char if (SCHEDULER_STOPPED()) return; + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("rw_wlock() by idle thread %p on rwlock %s @ %s:%d", + curthread, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_wlock() of destroyed rwlock @ %s:%d", file, line)); WITNESS_CHECKORDER(&rw->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, file, @@ -255,6 +259,9 @@ _rw_try_wlock(struct rwlock *rw, const c if (SCHEDULER_STOPPED()) return (1); + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("rw_try_wlock() by idle thread %p on rwlock %s @ %s:%d", + curthread, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_try_wlock() of destroyed rwlock @ %s:%d", file, line)); @@ -327,6 +334,9 @@ _rw_rlock(struct rwlock *rw, const char if (SCHEDULER_STOPPED()) return; + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("rw_rlock() by idle thread %p on rwlock %s @ %s:%d", + curthread, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_rlock() of destroyed rwlock @ %s:%d", file, line)); KASSERT(rw_wowner(rw) != curthread, @@ -515,6 +525,10 @@ _rw_try_rlock(struct rwlock *rw, const c if (SCHEDULER_STOPPED()) return (1); + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("rw_try_rlock() by idle thread %p on rwlock %s @ %s:%d", + curthread, rw->lock_object.lo_name, file, line)); + for (;;) { x = rw->rw_lock; KASSERT(rw->rw_lock != RW_DESTROYED, Modified: stable/9/sys/kern/kern_sx.c ============================================================================== --- stable/9/sys/kern/kern_sx.c Tue Sep 24 20:14:59 2013 (r255861) +++ stable/9/sys/kern/kern_sx.c Tue Sep 24 20:38:55 2013 (r255862) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -246,6 +247,9 @@ _sx_slock(struct sx *sx, int opts, const if (SCHEDULER_STOPPED()) return (0); + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("sx_slock() by idle thread %p on sx %s @ %s:%d", + curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_slock() of destroyed sx @ %s:%d", file, line)); WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); @@ -267,6 +271,10 @@ _sx_try_slock(struct sx *sx, const char if (SCHEDULER_STOPPED()) return (1); + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("sx_try_slock() by idle thread %p on sx %s @ %s:%d", + curthread, sx->lock_object.lo_name, file, line)); + for (;;) { x = sx->sx_lock; KASSERT(x != SX_LOCK_DESTROYED, @@ -292,6 +300,9 @@ _sx_xlock(struct sx *sx, int opts, const if (SCHEDULER_STOPPED()) return (0); + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("sx_xlock() by idle thread %p on sx %s @ %s:%d", + curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_xlock() of destroyed sx @ %s:%d", file, line)); WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, file, @@ -315,6 +326,9 @@ _sx_try_xlock(struct sx *sx, const char if (SCHEDULER_STOPPED()) return (1); + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + ("sx_try_xlock() by idle thread %p on sx %s @ %s:%d", + curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_try_xlock() of destroyed sx @ %s:%d", file, line)); From owner-svn-src-stable-9@FreeBSD.ORG Thu Sep 26 09:16:57 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B2EFE4B1; Thu, 26 Sep 2013 09:16:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 85CDB2BC1; Thu, 26 Sep 2013 09:16:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8Q9GvxM054877; Thu, 26 Sep 2013 09:16:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8Q9GvaV054876; Thu, 26 Sep 2013 09:16:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201309260916.r8Q9GvaV054876@svn.freebsd.org> From: Marius Strobl Date: Thu, 26 Sep 2013 09:16:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255876 - stable/9/sys/dev/aac X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Sep 2013 09:16:57 -0000 Author: marius Date: Thu Sep 26 09:16:57 2013 New Revision: 255876 URL: http://svnweb.freebsd.org/changeset/base/255876 Log: MFC: r254005 - Fix a bug in the MSI allocation logic so an MSI is also employed if a controller supports only a single message. I haven't seen such an adapter out in the wild, though, so this change likely is a NOP. While at it, further simplify the MSI allocation logic; there's no need to check the number of available messages on our own as pci_alloc_msi(9) will just fail if it can't provide us with the single message we want. - Nuke the unused softc of aacch(4). Modified: stable/9/sys/dev/aac/aac_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/aac/aac_pci.c ============================================================================== --- stable/9/sys/dev/aac/aac_pci.c Thu Sep 26 08:28:31 2013 (r255875) +++ stable/9/sys/dev/aac/aac_pci.c Thu Sep 26 09:16:57 2013 (r255876) @@ -425,18 +425,13 @@ aac_pci_attach(device_t dev) * Allocate the interrupt. */ rid = 0; - count = 0; - if (aac_enable_msi != 0 && (sc->flags & AAC_FLAGS_NOMSI) == 0 && - (count = pci_msi_count(dev)) != 0) { - if (count > 1) - count = 1; - else - count = 0; - if (count == 1 && pci_alloc_msi(dev, &count) == 0) + if (aac_enable_msi != 0 && (sc->flags & AAC_FLAGS_NOMSI) == 0) { + count = 1; + if (pci_alloc_msi(dev, &count) == 0) rid = 1; } if ((sc->aac_irq = bus_alloc_resource_any(sc->aac_dev, SYS_RES_IRQ, - &rid, RF_ACTIVE | (count != 0 ? 0 : RF_SHAREABLE))) == NULL) { + &rid, RF_ACTIVE | (rid != 0 ? 0 : RF_SHAREABLE))) == NULL) { device_printf(dev, "can't allocate interrupt\n"); goto out; } @@ -489,14 +484,10 @@ static device_method_t aacch_methods[] = DEVMETHOD_END }; -struct aacch_softc { - device_t dev; -}; - static driver_t aacch_driver = { "aacch", aacch_methods, - sizeof(struct aacch_softc) + 1 /* no softc */ }; static devclass_t aacch_devclass; @@ -515,19 +506,14 @@ aacch_probe(device_t dev) } static int -aacch_attach(device_t dev) +aacch_attach(device_t dev __unused) { - struct aacch_softc *sc; - - sc = device_get_softc(dev); - - sc->dev = dev; return (0); } static int -aacch_detach(device_t dev) +aacch_detach(device_t dev __unused) { return (0); From owner-svn-src-stable-9@FreeBSD.ORG Thu Sep 26 18:18:52 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 83855B9F; Thu, 26 Sep 2013 18:18:52 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F5562F8F; Thu, 26 Sep 2013 18:18:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8QIIqgj086222; Thu, 26 Sep 2013 18:18:52 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QIIqVK086220; Thu, 26 Sep 2013 18:18:52 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309261818.r8QIIqVK086220@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 26 Sep 2013 18:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255897 - in stable/9/sys/powerpc: aim include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Sep 2013 18:18:52 -0000 Author: nwhitehorn Date: Thu Sep 26 18:18:51 2013 New Revision: 255897 URL: http://svnweb.freebsd.org/changeset/base/255897 Log: MFC r255273,255282: Align stacks of kernel threads correctly at 16-byte boundaries rather than making sure they are all misaligned at +8 bytes. This fixes clang builds of powerpc64 kernels (aside from a required increase in KSTACK_PAGES which will come later). Modified: stable/9/sys/powerpc/aim/vm_machdep.c stable/9/sys/powerpc/include/frame.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/aim/vm_machdep.c ============================================================================== --- stable/9/sys/powerpc/aim/vm_machdep.c Thu Sep 26 18:10:19 2013 (r255896) +++ stable/9/sys/powerpc/aim/vm_machdep.c Thu Sep 26 18:18:51 2013 (r255897) @@ -187,6 +187,7 @@ cpu_fork(struct thread *td1, struct proc cf->cf_arg1 = (register_t)tf; pcb->pcb_sp = (register_t)cf; + KASSERT(pcb->pcb_sp % 16 == 0, ("stack misaligned")); #ifdef __powerpc64__ pcb->pcb_lr = ((register_t *)fork_trampoline)[0]; pcb->pcb_toc = ((register_t *)fork_trampoline)[1]; Modified: stable/9/sys/powerpc/include/frame.h ============================================================================== --- stable/9/sys/powerpc/include/frame.h Thu Sep 26 18:10:19 2013 (r255896) +++ stable/9/sys/powerpc/include/frame.h Thu Sep 26 18:18:51 2013 (r255897) @@ -94,6 +94,7 @@ struct callframe { register_t cf_func; register_t cf_arg0; register_t cf_arg1; + register_t _padding; /* Maintain 16-byte alignment */ }; #else struct callframe { @@ -102,6 +103,7 @@ struct callframe { register_t cf_func; register_t cf_arg0; register_t cf_arg1; + register_t _padding; /* Maintain 16-byte alignment */ }; #endif From owner-svn-src-stable-9@FreeBSD.ORG Thu Sep 26 18:30:58 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 73BF3730; Thu, 26 Sep 2013 18:30:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 608D1210F; Thu, 26 Sep 2013 18:30:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8QIUwxO094008; Thu, 26 Sep 2013 18:30:58 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QIUwJq094007; Thu, 26 Sep 2013 18:30:58 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201309261830.r8QIUwJq094007@svn.freebsd.org> From: Glen Barber Date: Thu, 26 Sep 2013 18:30:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255899 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Sep 2013 18:30:58 -0000 Author: gjb Date: Thu Sep 26 18:30:57 2013 New Revision: 255899 URL: http://svnweb.freebsd.org/changeset/base/255899 Log: release/9.2.0 has been created; call stable/9 'STABLE' again. Modified: stable/9/sys/conf/newvers.sh Modified: stable/9/sys/conf/newvers.sh ============================================================================== --- stable/9/sys/conf/newvers.sh Thu Sep 26 18:28:11 2013 (r255898) +++ stable/9/sys/conf/newvers.sh Thu Sep 26 18:30:57 2013 (r255899) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.2" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable-9@FreeBSD.ORG Thu Sep 26 18:32:51 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C44D489C; Thu, 26 Sep 2013 18:32:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B0E582127; Thu, 26 Sep 2013 18:32:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8QIWpsI094768; Thu, 26 Sep 2013 18:32:51 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QIWpp6094767; Thu, 26 Sep 2013 18:32:51 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201309261832.r8QIWpp6094767@svn.freebsd.org> From: Glen Barber Date: Thu, 26 Sep 2013 18:32:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255900 - stable/9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Sep 2013 18:32:51 -0000 Author: gjb Date: Thu Sep 26 18:32:51 2013 New Revision: 255900 URL: http://svnweb.freebsd.org/changeset/base/255900 Log: Update for when we hope to have 9.2-RELEASE ready. Modified: stable/9/UPDATING Modified: stable/9/UPDATING ============================================================================== --- stable/9/UPDATING Thu Sep 26 18:30:57 2013 (r255899) +++ stable/9/UPDATING Thu Sep 26 18:32:51 2013 (r255900) @@ -11,6 +11,9 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20130930: + 9.2-RELEASE. + 20130823: Behavior of devfs rules path matching has been changed. Pattern is now always matched against fully qualified devfs From owner-svn-src-stable-9@FreeBSD.ORG Thu Sep 26 19:42:59 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F04B76BD; Thu, 26 Sep 2013 19:42:58 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD9EA260E; Thu, 26 Sep 2013 19:42:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8QJgwOf032863; Thu, 26 Sep 2013 19:42:58 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QJgw8v032862; Thu, 26 Sep 2013 19:42:58 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201309261942.r8QJgw8v032862@svn.freebsd.org> From: "Kenneth D. Merry" Date: Thu, 26 Sep 2013 19:42:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255901 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 26 Sep 2013 19:42:59 -0000 Author: ken Date: Thu Sep 26 19:42:58 2013 New Revision: 255901 URL: http://svnweb.freebsd.org/changeset/base/255901 Log: MFC 249028: The CTL block backend is broken without this. Fix sending virtual scatter/gather lists from the CTL CAM frontend peripheral. Sponsored by: Spectra Logic Modified: stable/9/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/9/sys/cam/ctl/scsi_ctl.c Thu Sep 26 18:32:51 2013 (r255900) +++ stable/9/sys/cam/ctl/scsi_ctl.c Thu Sep 26 19:42:58 2013 (r255901) @@ -916,7 +916,7 @@ ctlfestart(struct cam_periph *periph, un if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) flags |= CAM_DATA_SG_PADDR; else - flags &= ~CAM_DATA_SG; + flags |= CAM_DATA_SG; data_ptr = (uint8_t *)cam_sglist; dxfer_len = io->scsiio.kern_data_len; } else { @@ -938,6 +938,10 @@ ctlfestart(struct cam_periph *periph, un data_ptr = sglist[*ti].addr; dxfer_len = sglist[*ti].len; csio->sglist_cnt = 0; + if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) + flags |= CAM_DATA_PADDR; + else + flags |= CAM_DATA_VADDR; cmd_info->flags |= CTLFE_CMD_PIECEWISE; (*ti)++; } From owner-svn-src-stable-9@FreeBSD.ORG Fri Sep 27 06:56:59 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 248C4767; Fri, 27 Sep 2013 06:56:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 11FDE263C; Fri, 27 Sep 2013 06:56:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8R6uwHS089724; Fri, 27 Sep 2013 06:56:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8R6uwDb089723; Fri, 27 Sep 2013 06:56:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309270656.r8R6uwDb089723@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 27 Sep 2013 06:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255905 - stable/9/sys/amd64/amd64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 27 Sep 2013 06:56:59 -0000 Author: kib Date: Fri Sep 27 06:56:58 2013 New Revision: 255905 URL: http://svnweb.freebsd.org/changeset/base/255905 Log: MFC r255844: Ensure that the ERESTART return from the syscall reloads the registers, to make the restarted syscall instruction pass the correct arguments. PR: kern/182161 Modified: stable/9/sys/amd64/amd64/vm_machdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/vm_machdep.c Thu Sep 26 22:47:02 2013 (r255904) +++ stable/9/sys/amd64/amd64/vm_machdep.c Fri Sep 27 06:56:58 2013 (r255905) @@ -400,9 +400,13 @@ cpu_set_syscall_retval(struct thread *td * for the next iteration. * %r10 restore is only required for freebsd/amd64 processes, * but shall be innocent for any ia32 ABI. + * + * Require full context restore to get the arguments + * in the registers reloaded at return to usermode. */ td->td_frame->tf_rip -= td->td_frame->tf_err; td->td_frame->tf_r10 = td->td_frame->tf_rcx; + set_pcb_flags(td->td_pcb, PCB_FULL_IRET); break; case EJUSTRETURN: From owner-svn-src-stable-9@FreeBSD.ORG Sat Sep 28 05:56:38 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 65244EF2; Sat, 28 Sep 2013 05:56:38 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5183A2535; Sat, 28 Sep 2013 05:56:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8S5ucc6038216; Sat, 28 Sep 2013 05:56:38 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8S5ucQi038215; Sat, 28 Sep 2013 05:56:38 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201309280556.r8S5ucQi038215@svn.freebsd.org> From: "Kenneth D. Merry" Date: Sat, 28 Sep 2013 05:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255922 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 28 Sep 2013 05:56:38 -0000 Author: ken Date: Sat Sep 28 05:56:37 2013 New Revision: 255922 URL: http://svnweb.freebsd.org/changeset/base/255922 Log: MFC 244015: ------------------------------------------------------------------------ r244015 | ken | 2012-12-07 21:16:07 -0700 (Fri, 07 Dec 2012) | 17 lines Fix the CTL OOA queue dumping code so that it does not hold a mutex while doing a copyout. That can cause a panic, because copyout can trigger VM faults, and we can't handle VM faults while holding a mutex. The solution here is to malloc a separate buffer to hold the OOA queue entries, so that we don't risk a VM fault while filling up the buffer and we don't have to drop the lock. The other solution would be to wire the user's memory while filling their buffer with copyout, but that would have been a little more complex. Also fix a debugging parenthesis issue in ctl_abort_task() pointed out by Chuck Tuffli. Sponsored by: Spectra Logic Corporation Modified: stable/9/sys/cam/ctl/ctl.c Modified: stable/9/sys/cam/ctl/ctl.c ============================================================================== --- stable/9/sys/cam/ctl/ctl.c Sat Sep 28 02:13:59 2013 (r255921) +++ stable/9/sys/cam/ctl/ctl.c Sat Sep 28 05:56:37 2013 (r255922) @@ -352,7 +352,8 @@ static void ctl_ioctl_hard_startstop_cal struct cfi_metatask *metatask); static void ctl_ioctl_bbrread_callback(void *arg,struct cfi_metatask *metatask); static int ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num, - struct ctl_ooa *ooa_hdr); + struct ctl_ooa *ooa_hdr, + struct ctl_ooa_entry *kern_entries); static int ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td); uint32_t ctl_get_resindex(struct ctl_nexus *nexus); @@ -1982,7 +1983,7 @@ ctl_ioctl_bbrread_callback(void *arg, st */ static int ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num, - struct ctl_ooa *ooa_hdr) + struct ctl_ooa *ooa_hdr, struct ctl_ooa_entry *kern_entries) { union ctl_io *io; int retval; @@ -1992,7 +1993,7 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, for (io = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); (io != NULL); (*cur_fill_num)++, io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr, ooa_links)) { - struct ctl_ooa_entry *cur_entry, entry; + struct ctl_ooa_entry *entry; /* * If we've got more than we can fit, just count the @@ -2001,36 +2002,29 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, if (*cur_fill_num >= ooa_hdr->alloc_num) continue; - cur_entry = &ooa_hdr->entries[*cur_fill_num]; + entry = &kern_entries[*cur_fill_num]; - bzero(&entry, sizeof(entry)); - - entry.tag_num = io->scsiio.tag_num; - entry.lun_num = lun->lun; + entry->tag_num = io->scsiio.tag_num; + entry->lun_num = lun->lun; #ifdef CTL_TIME_IO - entry.start_bt = io->io_hdr.start_bt; + entry->start_bt = io->io_hdr.start_bt; #endif - bcopy(io->scsiio.cdb, entry.cdb, io->scsiio.cdb_len); - entry.cdb_len = io->scsiio.cdb_len; + bcopy(io->scsiio.cdb, entry->cdb, io->scsiio.cdb_len); + entry->cdb_len = io->scsiio.cdb_len; if (io->io_hdr.flags & CTL_FLAG_BLOCKED) - entry.cmd_flags |= CTL_OOACMD_FLAG_BLOCKED; + entry->cmd_flags |= CTL_OOACMD_FLAG_BLOCKED; if (io->io_hdr.flags & CTL_FLAG_DMA_INPROG) - entry.cmd_flags |= CTL_OOACMD_FLAG_DMA; + entry->cmd_flags |= CTL_OOACMD_FLAG_DMA; if (io->io_hdr.flags & CTL_FLAG_ABORT) - entry.cmd_flags |= CTL_OOACMD_FLAG_ABORT; + entry->cmd_flags |= CTL_OOACMD_FLAG_ABORT; if (io->io_hdr.flags & CTL_FLAG_IS_WAS_ON_RTR) - entry.cmd_flags |= CTL_OOACMD_FLAG_RTR; + entry->cmd_flags |= CTL_OOACMD_FLAG_RTR; if (io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) - entry.cmd_flags |= CTL_OOACMD_FLAG_DMA_QUEUED; - - retval = copyout(&entry, cur_entry, sizeof(entry)); - - if (retval != 0) - break; + entry->cmd_flags |= CTL_OOACMD_FLAG_DMA_QUEUED; } return (retval); @@ -2433,6 +2427,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, case CTL_GET_OOA: { struct ctl_lun *lun; struct ctl_ooa *ooa_hdr; + struct ctl_ooa_entry *entries; uint32_t cur_fill_num; ooa_hdr = (struct ctl_ooa *)addr; @@ -2456,11 +2451,20 @@ ctl_ioctl(struct cdev *dev, u_long cmd, break; } + entries = malloc(ooa_hdr->alloc_len, M_CTL, M_WAITOK | M_ZERO); + if (entries == NULL) { + printf("%s: could not allocate %d bytes for OOA " + "dump\n", __func__, ooa_hdr->alloc_len); + retval = ENOMEM; + break; + } + mtx_lock(&softc->ctl_lock); if (((ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) == 0) && ((ooa_hdr->lun_num > CTL_MAX_LUNS) || (softc->ctl_luns[ooa_hdr->lun_num] == NULL))) { mtx_unlock(&softc->ctl_lock); + free(entries, M_CTL); printf("%s: CTL_GET_OOA: invalid LUN %ju\n", __func__, (uintmax_t)ooa_hdr->lun_num); retval = EINVAL; @@ -2472,24 +2476,31 @@ ctl_ioctl(struct cdev *dev, u_long cmd, if (ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) { STAILQ_FOREACH(lun, &softc->lun_list, links) { retval = ctl_ioctl_fill_ooa(lun, &cur_fill_num, - ooa_hdr); + ooa_hdr, entries); if (retval != 0) break; } if (retval != 0) { mtx_unlock(&softc->ctl_lock); + free(entries, M_CTL); break; } } else { lun = softc->ctl_luns[ooa_hdr->lun_num]; - retval = ctl_ioctl_fill_ooa(lun, &cur_fill_num,ooa_hdr); + retval = ctl_ioctl_fill_ooa(lun, &cur_fill_num,ooa_hdr, + entries); } mtx_unlock(&softc->ctl_lock); ooa_hdr->fill_num = min(cur_fill_num, ooa_hdr->alloc_num); ooa_hdr->fill_len = ooa_hdr->fill_num * sizeof(struct ctl_ooa_entry); + retval = copyout(entries, ooa_hdr->entries, ooa_hdr->fill_len); + if (retval != 0) { + printf("%s: error copying out %d bytes for OOA dump\n", + __func__, ooa_hdr->fill_len); + } getbintime(&ooa_hdr->cur_bt); @@ -2500,6 +2511,8 @@ ctl_ioctl(struct cdev *dev, u_long cmd, ooa_hdr->dropped_num = 0; ooa_hdr->status = CTL_OOA_OK; } + + free(entries, M_CTL); break; } case CTL_CHECK_OOA: { @@ -10824,9 +10837,9 @@ ctl_abort_task(union ctl_io *io) (xio->io_hdr.flags & CTL_FLAG_DMA_INPROG) ? " DMA" : "", (xio->io_hdr.flags & - CTL_FLAG_ABORT) ? " ABORT" : ""), + CTL_FLAG_ABORT) ? " ABORT" : "", (xio->io_hdr.flags & - CTL_FLAG_IS_WAS_ON_RTR ? " RTR" : ""); + CTL_FLAG_IS_WAS_ON_RTR ? " RTR" : "")); ctl_scsi_command_string(&xio->scsiio, NULL, &sb); sbuf_finish(&sb); printf("%s\n", sbuf_data(&sb)); From owner-svn-src-stable-9@FreeBSD.ORG Sat Sep 28 07:43:37 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 26A7641E; Sat, 28 Sep 2013 07:43:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 136792F2F; Sat, 28 Sep 2013 07:43:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8S7hark095937; Sat, 28 Sep 2013 07:43:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8S7haMc095936; Sat, 28 Sep 2013 07:43:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309280743.r8S7haMc095936@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 28 Sep 2013 07:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255924 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 28 Sep 2013 07:43:37 -0000 Author: kib Date: Sat Sep 28 07:43:36 2013 New Revision: 255924 URL: http://svnweb.freebsd.org/changeset/base/255924 Log: MFC r255566: If the last page of the file is partially full and whole valid portion is invalidated, invalidate the whole page. Modified: stable/9/sys/vm/vm_page.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_page.c ============================================================================== --- stable/9/sys/vm/vm_page.c Sat Sep 28 07:04:03 2013 (r255923) +++ stable/9/sys/vm/vm_page.c Sat Sep 28 07:43:36 2013 (r255924) @@ -2637,12 +2637,19 @@ void vm_page_set_invalid(vm_page_t m, int base, int size) { vm_page_bits_t bits; + vm_object_t object; + object = m->object; VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); - bits = vm_page_bits(base, size); + if (object->type == OBJT_VNODE && base == 0 && IDX_TO_OFF(m->pindex) + + size >= object->un_pager.vnp.vnp_size) + bits = VM_PAGE_BITS_ALL; + else + bits = vm_page_bits(base, size); if (m->valid == VM_PAGE_BITS_ALL && bits != 0) pmap_remove_all(m); - KASSERT(!pmap_page_is_mapped(m), + KASSERT((bits == 0 && m->valid == VM_PAGE_BITS_ALL) || + !pmap_page_is_mapped(m), ("vm_page_set_invalid: page %p is mapped", m)); m->valid &= ~bits; m->dirty &= ~bits; From owner-svn-src-stable-9@FreeBSD.ORG Sat Sep 28 15:29:38 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 57756DB6; Sat, 28 Sep 2013 15:29:38 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC71121AE; Sat, 28 Sep 2013 15:29:37 +0000 (UTC) Received: from mail1.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id r8SFRGoU004566; Sat, 28 Sep 2013 17:27:16 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id r8SFRF0k025066; Sat, 28 Sep 2013 17:27:16 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.7/8.14.7) id r8SFRFYS074864; Date: Sat, 28 Sep 2013 17:27:15 +0200 From: Andre Albsmeier To: Scott Long Subject: Re: svn commit: r252063 - stable/9/sys/geom/mirror Message-ID: <20130928152715.GA4571@bali> References: <201306211736.r5LHaYPN070052@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201306211736.r5LHaYPN070052@svn.freebsd.org> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "svn-src-stable-9@freebsd.org" X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 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, 28 Sep 2013 15:29:38 -0000 On Fri, 21-Jun-2013 at 19:36:34 +0200, Scott Long wrote: > Author: scottl > Date: Fri Jun 21 17:36:33 2013 > New Revision: 252063 > URL: http://svnweb.freebsd.org/changeset/base/252063 > > Log: > MFC r252010, r252011: > > Mark geom_mirror as capable of unmapped i/o > > Obtained from: Netflix > ... > + /* A provider underneath us doesn't support unmapped */ > + if ((dp->flags & G_PF_ACCEPT_UNMAPPED) == 0) { > + G_MIRROR_DEBUG(0, "cancelling unmapped " > + "because of %s\n", dp->name); > + pp->flags &= ~G_PF_ACCEPT_UNMAPPED; > + } Is the \n intended here? It produces blank lines in dmesg: ... ada1: ATA-8 SATA 2.x device ada1: 150.000MB/s transfers (SATA 1.x, UDMA5, PIO 8192bytes) ada1: 305245MB (625142448 512 byte sectors: 16H 63S/T 16383C) Timecounter "TSC-low" frequency 1099900874 Hz quality 800 GEOM_MIRROR: cancelling unmapped because of ada1 GEOM_MIRROR: cancelling unmapped because of ada0 GEOM_MIRROR: Device mirror/m0 launched (2/2). uhub0: 2 ports with 2 removable, self powered uhub1: 2 ports with 2 removable, self powered uhub2: 2 ports with 2 removable, self powered uhub3: 2 ports with 2 removable, self powered ... -Andre