public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ram Pai <linuxram@us.ibm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bjorn Helgaas <bhelgaas@google.com>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	weiyang@linux.vnet.ibm.com, wangyun@linux.vnet.ibm.com,
	shangw@linux.vnet.ibm.com, Michal Ludvig <mludvig@logix.net.nz>
Subject: Re: [PATCH] Resource: wrong resource window calculation
Date: Wed, 28 Sep 2011 23:42:42 +0800	[thread overview]
Message-ID: <20110928154200.GA2477@ram-ThinkPad-T61> (raw)
In-Reply-To: <4E7B04F8.3090500@logix.net.nz>

On Thu, Sep 22, 2011 at 09:50:48PM +1200, Michal Ludvig wrote:
> On 09/22/2011 07:48 PM, Ram Pai wrote:
> >   	Resource: wrong resource window calculation
> >
> >__find_resource() incorrectly returns a resource window which overlaps an
> >existing allocated window. This happens when the parent's resource-window spans
> >0x00000000 to 0xffffffff and is entirely allocated to all its children
> >resource-windows.
> >
> >__find_resource() looks for gaps in resource allocation among the children
> >resource windows.  When it encounters the last child window it blindly tries
> >the range next to one allocated to the last child. Since the last child's
> >window ends at 0xffffffff the calculation overflows, leading the algorithm to
> >believe that any window in the range 0x0000000 to 0xfffffff is available for
> >allocation. This leads to a conflicting window allocation.
> >
> >Michal Ludvig reported this issue seen on his platform. The following patch
> >fixes the problem and has been verified by Michal. I believe this bug has been
> >there for ages. It got exposed by git commit
> >2bbc6942273b5b3097bd265d82227bdd84b351b2
> >[PATCH] PCI : ability to relocate assigned pci-resources
> >
> >Signed-off-by: Ram Pai<linuxram@us.ibm.com>
> 
> Tested-by: Michal Ludvig <mludvig@logix.net.nz>
> 
> Works fine on top of 3.1.0-rc7 and solves the problem with my Jetway board.
> 
> Thanks Ram!
> 
> M.

Linus,

	Do you plan to take this patch for 3.1? It fixes a regression w.r.t 3.0
	https://bugzilla.kernel.org/show_bug.cgi?id=42002 captures the bug report.

RP


  reply	other threads:[~2011-09-28 15:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4E5E0A7E.40301@logix.net.nz>
     [not found] ` <CAErSpo70k6UnhvvOMgQQxJ6BHZOwym=-jaPMvOukAaCr-B0+cQ@mail.gmail.com>
     [not found]   ` <4E5EFFBD.4050201@logix.net.nz>
     [not found]     ` <CAErSpo6bofeiAxeRo_RjXQSnwmcWrdymn0MK8H4_CwqwoeD1jg@mail.gmail.com>
     [not found]       ` <4E634814.4050508@logix.net.nz>
     [not found]         ` <20110909113409.GE2416@ram-ThinkPad-T61>
     [not found]           ` <4E6C05B7.9000904@logix.net.nz>
     [not found]             ` <20110913110646.GB2425@ram-ThinkPad-T61>
     [not found]               ` <4E6F400A.6090909@logix.net.nz>
2011-09-22  7:48                 ` [PATCH] Resource: wrong resource window calculation Ram Pai
2011-09-22  9:50                   ` Michal Ludvig
2011-09-28 15:42                     ` Ram Pai [this message]
2011-09-30  2:44                       ` Linus Torvalds
2011-09-30  2:56                         ` Michal Ludvig
2011-09-30  2:59                         ` Ram Pai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110928154200.GA2477@ram-ThinkPad-T61 \
    --to=linuxram@us.ibm.com \
    --cc=bhelgaas@google.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mludvig@logix.net.nz \
    --cc=shangw@linux.vnet.ibm.com \
    --cc=torvalds@linux-foundation.org \
    --cc=wangyun@linux.vnet.ibm.com \
    --cc=weiyang@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox