From owner-svn-src-head@FreeBSD.ORG Thu Oct 23 18:38:21 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCCB7C08; Thu, 23 Oct 2014 18:38:21 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B630CD37; Thu, 23 Oct 2014 18:38:21 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8D8B3B98D; Thu, 23 Oct 2014 14:38:20 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar Subject: Re: svn commit: r273446 - head/sys/x86/isa Date: Thu, 23 Oct 2014 11:43:03 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201410220137.s9M1bXuh023209@svn.freebsd.org> In-Reply-To: <201410220137.s9M1bXuh023209@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201410231143.03527.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 23 Oct 2014 14:38:20 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2014 18:38:22 -0000 On Tuesday, October 21, 2014 9:37:33 pm Marcel Moolenaar wrote: > Author: marcel > Date: Wed Oct 22 01:37:32 2014 > New Revision: 273446 > URL: https://svnweb.freebsd.org/changeset/base/273446 > > Log: > Virtual machines can easily have more than 16 option ROMs and > when that happens, we happily access our resource array out of > bounds. Make sure we stay within the MAX_ROMS limit. > While here, bump MAX_ROMS from 16 to 32 to minimize the chance > of leaving option ROMs unaccounted for. > > Obtained from: Juniper Networks, Inc. The res[] array should just go away entirely. This driver never gets detached, so its detach routine can get removed. sc->rnum can become a local variable in attach, the arrays can be axed, and the entire softc should be empty. -- John Baldwin