From patchwork Tue Mar 23 18:02:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominik Brodowski X-Patchwork-Id: 87721 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2NI2mbM005660 for ; Tue, 23 Mar 2010 18:02:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753958Ab0CWSCs (ORCPT ); Tue, 23 Mar 2010 14:02:48 -0400 Received: from isilmar.linta.de ([213.133.102.198]:54510 "EHLO linta.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753910Ab0CWSCr (ORCPT ); Tue, 23 Mar 2010 14:02:47 -0400 Received: (qmail 11966 invoked from network); 23 Mar 2010 18:02:45 -0000 Received: from p54a07c47.dip.t-dialin.net (HELO comet.dominikbrodowski.net) (brodo@84.160.124.71) by isilmar.linta.de with (DHE-RSA-AES256-SHA encrypted) SMTP; 23 Mar 2010 18:02:45 -0000 Received: by comet.dominikbrodowski.net (Postfix, from userid 1000) id 845B280048; Tue, 23 Mar 2010 19:02:37 +0100 (CET) Date: Tue, 23 Mar 2010 19:02:37 +0100 From: Dominik Brodowski To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-pcmcia@lists.infradead.org, Jesse Barnes Subject: Re: pci_bus_for_each_resource, transparent bridges and rsrc_nonstatic.c Message-ID: <20100323180237.GA28365@comet.dominikbrodowski.net> Mail-Followup-To: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-pcmcia@lists.infradead.org, Jesse Barnes References: <20091111203303.GA7939@comet.dominikbrodowski.net> <20100322232800.GA532@isilmar.linta.de> <20100323151301.GA10452@comet.dominikbrodowski.net> <201003231130.47869.bjorn.helgaas@hp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201003231130.47869.bjorn.helgaas@hp.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 23 Mar 2010 18:02:49 +0000 (UTC) diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index 4663b3f..dcc6021 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c @@ -810,6 +810,13 @@ static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long unsigned long size = end - start + 1; int ret = 0; +#if defined(CONFIG_X86) + /* on x86, avoid anything < 0x100 for it is often used for + * legacy platform devices */ + if (start < 0x100) + start = 0x100; +#endif + if (end < start) return -EINVAL;