From owner-svn-src-stable-7@FreeBSD.ORG Mon Aug 29 20:00:57 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9C361065674; Mon, 29 Aug 2011 20:00:57 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90B9D8FC21; Mon, 29 Aug 2011 20:00:57 +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 p7TK0vhK010581; Mon, 29 Aug 2011 20:00:57 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7TK0vvW010579; Mon, 29 Aug 2011 20:00:57 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201108292000.p7TK0vvW010579@svn.freebsd.org> From: Martin Matuska Date: Mon, 29 Aug 2011 20:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225250 - stable/7/usr.sbin/makefs X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2011 20:00:57 -0000 Author: mm Date: Mon Aug 29 20:00:57 2011 New Revision: 225250 URL: http://svn.freebsd.org/changeset/base/225250 Log: Fix buffer overflow and possible ISO image corruption in wrong handling of "." character case in makefs ISO level 1 and 2 filename conversion. Filed as NetBSD PR #45285 http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45285 Reviewed by: Christos Zoulas Modified: stable/7/usr.sbin/makefs/cd9660.c Directory Properties: stable/7/usr.sbin/makefs/ (props changed) Modified: stable/7/usr.sbin/makefs/cd9660.c ============================================================================== --- stable/7/usr.sbin/makefs/cd9660.c Mon Aug 29 20:00:29 2011 (r225249) +++ stable/7/usr.sbin/makefs/cd9660.c Mon Aug 29 20:00:57 2011 (r225250) @@ -1627,7 +1627,7 @@ cd9660_level1_convert_filename(const cha int extlen = 0; int found_ext = 0; - while (*oldname != '\0') { + while (*oldname != '\0' && extlen < 3) { /* Handle period first, as it is special */ if (*oldname == '.') { if (found_ext) { @@ -1644,10 +1644,8 @@ cd9660_level1_convert_filename(const cha *oldname == ',' && strlen(oldname) == 4) break; /* Enforce 12.3 / 8 */ - if (((namelen == 8) && !found_ext) || - (found_ext && extlen == 3)) { + if (namelen == 8 && !found_ext) break; - } if (islower((unsigned char)*oldname)) *newname++ = toupper((unsigned char)*oldname); @@ -1690,7 +1688,7 @@ cd9660_level2_convert_filename(const cha int extlen = 0; int found_ext = 0; - while (*oldname != '\0') { + while (*oldname != '\0' && namelen + extlen < 30) { /* Handle period first, as it is special */ if (*oldname == '.') { if (found_ext) { @@ -1710,8 +1708,6 @@ cd9660_level2_convert_filename(const cha if (diskStructure.archimedes_enabled && *oldname == ',' && strlen(oldname) == 4) break; - if ((namelen + extlen) == 30) - break; if (islower((unsigned char)*oldname)) *newname++ = toupper((unsigned char)*oldname); From owner-svn-src-stable-7@FreeBSD.ORG Tue Aug 30 11:49:23 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1932B106564A; Tue, 30 Aug 2011 11:49:23 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0914A8FC19; Tue, 30 Aug 2011 11:49: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 p7UBnMPg050084; Tue, 30 Aug 2011 11:49:22 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7UBnMHr050082; Tue, 30 Aug 2011 11:49:22 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201108301149.p7UBnMHr050082@svn.freebsd.org> From: Dmitry Morozovsky Date: Tue, 30 Aug 2011 11:49:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225260 - stable/7/sys/boot/forth X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2011 11:49:23 -0000 Author: marck (doc committer) Date: Tue Aug 30 11:49:22 2011 New Revision: 225260 URL: http://svn.freebsd.org/changeset/base/225260 Log: MFC r225122: Add kern.cam.boot_delay description (with reasonable default) to default/loader.conf This should help people installing ${OS} to USB devices, where there are frequently cases where kernel tries to mount root before actual umass sensing is finished. Reviewed by: mav Approved by: kib Modified: stable/7/sys/boot/forth/loader.conf Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/forth/loader.conf ============================================================================== --- stable/7/sys/boot/forth/loader.conf Tue Aug 30 11:47:36 2011 (r225259) +++ stable/7/sys/boot/forth/loader.conf Tue Aug 30 11:49:22 2011 (r225260) @@ -102,6 +102,8 @@ module_path="/boot/modules" # Set the mo #kern.nbuf="" # Set the number of buffer headers #kern.ncallout="" # Set the maximum # of timer events #kern.sgrowsiz="" # Set the amount to grow stack +#kern.cam.boot_delay="10000" # Delay (in ms) of root mount for CAM bus + # registration, useful for USB sticks as root #kern.cam.scsi_delay="2000" # Delay (in ms) before probing SCSI #kern.ipc.maxsockets="" # Set the maximum number of sockets avaliable #kern.ipc.nmbclusters="" # Set the number of mbuf clusters From owner-svn-src-stable-7@FreeBSD.ORG Tue Aug 30 17:21:56 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F660106564A; Tue, 30 Aug 2011 17:21:56 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23FEE8FC14; Tue, 30 Aug 2011 17:21:56 +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 p7UHLuiI060390; Tue, 30 Aug 2011 17:21:56 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7UHLuvE060388; Tue, 30 Aug 2011 17:21:56 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201108301721.p7UHLuvE060388@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 30 Aug 2011 17:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225269 - stable/7/sys/dev/alc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2011 17:21:56 -0000 Author: yongari Date: Tue Aug 30 17:21:55 2011 New Revision: 225269 URL: http://svn.freebsd.org/changeset/base/225269 Log: MFC r225088: Disable PHY hibernation until I get more detailed hibernation programming secret. The PHY would go into sleep state when it detects no established link and it will re-establish link when the cable is plugged in. Previously it failed to re-establish link when the cable is plugged in such that it required to manually down and up the interface again to make it work. This came from incorrectly programmed hibernation parameters. According to Atheros, each PHY chip requires different configuration for hibernation and different vendor has different settings for the same chip. Disabling hibernation may consume more power but establishing link looks more important than saving power. Special thanks to Atheros for giving me instructions that disable hibernation. PR: kern/148772 Modified: stable/7/sys/dev/alc/if_alc.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/alc/if_alc.c ============================================================================== --- stable/7/sys/dev/alc/if_alc.c Tue Aug 30 17:20:34 2011 (r225268) +++ stable/7/sys/dev/alc/if_alc.c Tue Aug 30 17:21:55 2011 (r225269) @@ -534,13 +534,11 @@ alc_phy_reset(struct alc_softc *sc) uint16_t data; /* Reset magic from Linux. */ - CSR_WRITE_2(sc, ALC_GPHY_CFG, - GPHY_CFG_HIB_EN | GPHY_CFG_HIB_PULSE | GPHY_CFG_SEL_ANA_RESET); + CSR_WRITE_2(sc, ALC_GPHY_CFG, GPHY_CFG_SEL_ANA_RESET); CSR_READ_2(sc, ALC_GPHY_CFG); DELAY(10 * 1000); - CSR_WRITE_2(sc, ALC_GPHY_CFG, - GPHY_CFG_EXT_RESET | GPHY_CFG_HIB_EN | GPHY_CFG_HIB_PULSE | + CSR_WRITE_2(sc, ALC_GPHY_CFG, GPHY_CFG_EXT_RESET | GPHY_CFG_SEL_ANA_RESET); CSR_READ_2(sc, ALC_GPHY_CFG); DELAY(10 * 1000); @@ -625,6 +623,23 @@ alc_phy_reset(struct alc_softc *sc) alc_miibus_writereg(sc->alc_dev, sc->alc_phyaddr, ALC_MII_DBG_DATA, data); DELAY(1000); + + /* Disable hibernation. */ + alc_miibus_writereg(sc->alc_dev, sc->alc_phyaddr, ALC_MII_DBG_ADDR, + 0x0029); + data = alc_miibus_readreg(sc->alc_dev, sc->alc_phyaddr, + ALC_MII_DBG_DATA); + data &= ~0x8000; + alc_miibus_writereg(sc->alc_dev, sc->alc_phyaddr, ALC_MII_DBG_DATA, + data); + + alc_miibus_writereg(sc->alc_dev, sc->alc_phyaddr, ALC_MII_DBG_ADDR, + 0x000B); + data = alc_miibus_readreg(sc->alc_dev, sc->alc_phyaddr, + ALC_MII_DBG_DATA); + data &= ~0x8000; + alc_miibus_writereg(sc->alc_dev, sc->alc_phyaddr, ALC_MII_DBG_DATA, + data); } static void @@ -650,8 +665,7 @@ alc_phy_down(struct alc_softc *sc) break; default: /* Force PHY down. */ - CSR_WRITE_2(sc, ALC_GPHY_CFG, - GPHY_CFG_EXT_RESET | GPHY_CFG_HIB_EN | GPHY_CFG_HIB_PULSE | + CSR_WRITE_2(sc, ALC_GPHY_CFG, GPHY_CFG_EXT_RESET | GPHY_CFG_SEL_ANA_RESET | GPHY_CFG_PHY_IDDQ | GPHY_CFG_PWDOWN_HW); DELAY(1000); From owner-svn-src-stable-7@FreeBSD.ORG Wed Aug 31 01:18:23 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5F21106566C; Wed, 31 Aug 2011 01:18:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A50A88FC12; Wed, 31 Aug 2011 01:18: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 p7V1IN49074753; Wed, 31 Aug 2011 01:18:23 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7V1IN05074751; Wed, 31 Aug 2011 01:18:23 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201108310118.p7V1IN05074751@svn.freebsd.org> From: Glen Barber Date: Wed, 31 Aug 2011 01:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225276 - stable/7 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2011 01:18:23 -0000 Author: gjb (doc committer) Date: Wed Aug 31 01:18:23 2011 New Revision: 225276 URL: http://svn.freebsd.org/changeset/base/225276 Log: MFC 225142: Reword sentence noting UPDATING entries prior to October 2007[1] are only available in older FreeBSD releases. PR: 159220 [1] - October 2007 is specific to HEAD. In stable/8 and stable/7, the correct year is 2004, so that change is reflected here as well. Modified: stable/7/UPDATING (contents, props changed) Modified: stable/7/UPDATING ============================================================================== --- stable/7/UPDATING Wed Aug 31 01:17:49 2011 (r225275) +++ stable/7/UPDATING Wed Aug 31 01:18:23 2011 (r225276) @@ -1095,9 +1095,10 @@ COMMON ITEMS: FORMAT: This file contains a list, in reverse chronological order, of major -breakages in tracking -current. Not all things will be listed here, -and it only starts on October 16, 2004. Updating files can found in -previous releases if your system is older than this. +breakages in tracking -current. It is not guaranteed to be a complete +list of such breakages, and only contains entries since October 16, 2004. +If you need to see UPDATING entries from before that date, you will need +to fetch an UPDATING file from an older FreeBSD release. Copyright information: From owner-svn-src-stable-7@FreeBSD.ORG Wed Aug 31 06:48:00 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67E681065674; Wed, 31 Aug 2011 06:48:00 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56BFB8FC0A; Wed, 31 Aug 2011 06:48:00 +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 p7V6m0bB087005; Wed, 31 Aug 2011 06:48:00 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7V6m0MN087003; Wed, 31 Aug 2011 06:48:00 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201108310648.p7V6m0MN087003@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 31 Aug 2011 06:48:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225283 - stable/7/sys/ufs/ufs X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2011 06:48:00 -0000 Author: ae Date: Wed Aug 31 06:48:00 2011 New Revision: 225283 URL: http://svn.freebsd.org/changeset/base/225283 Log: MFC r225104: Fix lock leak. Reported by: Alex Lyashkov Modified: stable/7/sys/ufs/ufs/ufs_extattr.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/ufs/ufs/ufs_extattr.c ============================================================================== --- stable/7/sys/ufs/ufs/ufs_extattr.c Wed Aug 31 06:47:39 2011 (r225282) +++ stable/7/sys/ufs/ufs/ufs_extattr.c Wed Aug 31 06:48:00 2011 (r225283) @@ -1032,14 +1032,14 @@ vop_setextattr { struct ufsmount *ump = VFSTOUFS(mp); int error; - ufs_extattr_uepm_lock(ump, ap->a_td); - /* * XXX: No longer a supported way to delete extended attributes. */ if (ap->a_uio == NULL) return (EINVAL); + ufs_extattr_uepm_lock(ump, ap->a_td); + error = ufs_extattr_set(ap->a_vp, ap->a_attrnamespace, ap->a_name, ap->a_uio, ap->a_cred, ap->a_td); From owner-svn-src-stable-7@FreeBSD.ORG Wed Aug 31 16:54:05 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A22001065678; Wed, 31 Aug 2011 16:54:05 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 913158FC2A; Wed, 31 Aug 2011 16: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 p7VGs5gq008769; Wed, 31 Aug 2011 16:54:05 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7VGs5vw008767; Wed, 31 Aug 2011 16:54:05 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201108311654.p7VGs5vw008767@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 31 Aug 2011 16:54:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225297 - stable/7 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2011 16:54:05 -0000 Author: des Date: Wed Aug 31 16:54:05 2011 New Revision: 225297 URL: http://svn.freebsd.org/changeset/base/225297 Log: I have a box running 702103 that needed a new btxld. Modified: stable/7/Makefile.inc1 Modified: stable/7/Makefile.inc1 ============================================================================== --- stable/7/Makefile.inc1 Wed Aug 31 16:25:34 2011 (r225296) +++ stable/7/Makefile.inc1 Wed Aug 31 16:54:05 2011 (r225297) @@ -986,7 +986,7 @@ build-tools: # # cross-tools: Build cross-building tools # -.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 702102 +.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 702104 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" _btxld= usr.sbin/btxld .endif From owner-svn-src-stable-7@FreeBSD.ORG Fri Sep 2 16:18:07 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D47010656D1; Fri, 2 Sep 2011 16:18:07 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BE8F8FC0C; Fri, 2 Sep 2011 16:18:07 +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 p82GI77j006544; Fri, 2 Sep 2011 16:18:07 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p82GI7DU006542; Fri, 2 Sep 2011 16:18:07 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201109021618.p82GI7DU006542@svn.freebsd.org> From: Marius Strobl Date: Fri, 2 Sep 2011 16:18:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225333 - stable/7/sys/sparc64/sbus X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2011 16:18:07 -0000 Author: marius Date: Fri Sep 2 16:18:06 2011 New Revision: 225333 URL: http://svn.freebsd.org/changeset/base/225333 Log: MFC: r225229 Since r221218 rman_manage_region(9) actually honors rm_start and rm_end which may cause problems when these contain garbage so zero the range descriptors embedding the rmans when allocating them. Modified: stable/7/sys/sparc64/sbus/sbus.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sbus/sbus.c ============================================================================== --- stable/7/sys/sparc64/sbus/sbus.c Fri Sep 2 16:17:52 2011 (r225332) +++ stable/7/sys/sparc64/sbus/sbus.c Fri Sep 2 16:18:06 2011 (r225333) @@ -348,8 +348,8 @@ sbus_attach(device_t dev) sizeof(*range), (void **)&range)) == -1) { panic("%s: error getting ranges property", __func__); } - sc->sc_rd = (struct sbus_rd *)malloc(sizeof(*sc->sc_rd) * sc->sc_nrange, - M_DEVBUF, M_NOWAIT); + sc->sc_rd = malloc(sizeof(*sc->sc_rd) * sc->sc_nrange, M_DEVBUF, + M_NOWAIT | M_ZERO); if (sc->sc_rd == NULL) panic("%s: cannot allocate rmans", __func__); /* From owner-svn-src-stable-7@FreeBSD.ORG Sat Sep 3 21:28:26 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1FA4106566C; Sat, 3 Sep 2011 21:28:26 +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 E140F8FC13; Sat, 3 Sep 2011 21:28:26 +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 p83LSQT0062539; Sat, 3 Sep 2011 21:28:26 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p83LSQqG062537; Sat, 3 Sep 2011 21:28:26 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201109032128.p83LSQqG062537@svn.freebsd.org> From: Christian Brueffer Date: Sat, 3 Sep 2011 21:28:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225370 - stable/7/bin/ed X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2011 21:28:27 -0000 Author: brueffer Date: Sat Sep 3 21:28:26 2011 New Revision: 225370 URL: http://svn.freebsd.org/changeset/base/225370 Log: MFC: r225215 Fix memory leak in error cases. Modified: stable/7/bin/ed/buf.c Directory Properties: stable/7/bin/ed/ (props changed) Modified: stable/7/bin/ed/buf.c ============================================================================== --- stable/7/bin/ed/buf.c Sat Sep 3 20:46:30 2011 (r225369) +++ stable/7/bin/ed/buf.c Sat Sep 3 21:28:26 2011 (r225370) @@ -94,6 +94,7 @@ put_sbuf_line(const char *cs) ; if (s - cs >= LINECHARS) { errmsg = "line too long"; + free(lp); return NULL; } len = s - cs; @@ -102,6 +103,7 @@ put_sbuf_line(const char *cs) if (fseeko(sfp, (off_t)0, SEEK_END) < 0) { fprintf(stderr, "%s\n", strerror(errno)); errmsg = "cannot seek temp file"; + free(lp); return NULL; } sfseek = ftello(sfp); @@ -112,6 +114,7 @@ put_sbuf_line(const char *cs) sfseek = -1; fprintf(stderr, "%s\n", strerror(errno)); errmsg = "cannot write temp file"; + free(lp); return NULL; } lp->len = len;