From owner-cvs-src-old@FreeBSD.ORG Fri Jan 15 07:19:34 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 142ED106568B for ; Fri, 15 Jan 2010 07:19:34 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 02B318FC12 for ; Fri, 15 Jan 2010 07:19:34 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F7JXYf099966 for ; Fri, 15 Jan 2010 07:19:33 GMT (envelope-from brooks@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o0F7JXeT099965 for cvs-src-old@freebsd.org; Fri, 15 Jan 2010 07:19:33 GMT (envelope-from brooks@repoman.freebsd.org) Message-Id: <201001150719.o0F7JXeT099965@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to brooks@repoman.freebsd.org using -f From: Brooks Davis Date: Fri, 15 Jan 2010 07:18:46 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/i386/ibcs2 ibcs2_misc.c src/sys/kern kern_prot.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 07:19:34 -0000 brooks 2010-01-15 07:18:46 UTC FreeBSD src repository Modified files: sys/i386/ibcs2 ibcs2_misc.c sys/kern kern_prot.c Log: SVN rev 202342 on 2010-01-15 07:18:46Z by brooks Only allocate the space we need before calling kern_getgroups instead of allocating what ever the user asks for up to "ngroups_max + 1". On systems with large values of kern.ngroups this will be more efficient. The now redundant check that the array is large enough in kern_getgroups() is deliberate to allow this change to be merged to stable/8 without breaking potential third party consumers of the API. Reported by: bde MFC after: 28 days Revision Changes Path 1.77 +7 -3 src/sys/i386/ibcs2/ibcs2_misc.c 1.228 +7 -1 src/sys/kern/kern_prot.c