Linux-PCI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/1] Fix bug resulting in double hpmemsize being assigned to MMIO window
@ 2019-11-07 13:50 Nicholas Johnson
  2019-11-07 17:25 ` Logan Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Johnson @ 2019-11-07 13:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-pci, bhelgaas, mika.westerberg, corbet, benh, logang,
	Nicholas Johnson

I have split this patch off my main series, as I realised that it does 
not need to be part of that series.

I have made some recent improvements to add assurance against it 
breaking existing behaviour. Instead of returning the first resource of 
the desired type regardless of it being assigned, now it goes through 
all of the resources and returns only those of type that are not 
assigned. Only then does it go through and return the first resource of 
desired type that is assigned. If none are found then it returns NULL as 
usual.

I have made extensive changes to the patch notes, also.

Logan Gunthorpe <logang@deltatee.com> has an alternative method of 
fixing this same bug. Please also consider his patch and accept 
whichever is best for Linux. All I care is that the bug be fixed.

Nicholas Johnson (1):
  PCI: Fix bug resulting in double hpmemsize being assigned to MMIO
    window

 drivers/pci/setup-bus.c | 34 +++++++++++++++++++++++-----------
 1 file changed, 23 insertions(+), 11 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 0/1] Fix bug resulting in double hpmemsize being assigned to MMIO window
  2019-11-07 13:50 [PATCH 0/1] Fix bug resulting in double hpmemsize being assigned to MMIO window Nicholas Johnson
@ 2019-11-07 17:25 ` Logan Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Logan Gunthorpe @ 2019-11-07 17:25 UTC (permalink / raw)
  To: Nicholas Johnson, linux-kernel
  Cc: linux-pci, bhelgaas, mika.westerberg, corbet, benh



On 2019-11-07 6:50 a.m., Nicholas Johnson wrote:
> I have split this patch off my main series, as I realised that it does 
> not need to be part of that series.
> 
> I have made some recent improvements to add assurance against it 
> breaking existing behaviour. Instead of returning the first resource of 
> the desired type regardless of it being assigned, now it goes through 
> all of the resources and returns only those of type that are not 
> assigned. Only then does it go through and return the first resource of 
> desired type that is assigned. If none are found then it returns NULL as 
> usual.
> 
> I have made extensive changes to the patch notes, also.
> 
> Logan Gunthorpe <logang@deltatee.com> has an alternative method of 
> fixing this same bug. Please also consider his patch and accept 
> whichever is best for Linux. All I care is that the bug be fixed.

Oh, yes, I haven't had time to follow up on this. My patch is here[1].
It has a bit more info in the commit message and is a bit less
intrusive. However, Nicholas's approach is more of a cleanup and may be
a bit cleaner going forward.

I also had another bug fix in that series I really need to find time to
update and resend. I'll try to do it in the next cycle.

Logan

[1]
https://lore.kernel.org/linux-pci/20190531171216.20532-2-logang@deltatee.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-07 13:50 [PATCH 0/1] Fix bug resulting in double hpmemsize being assigned to MMIO window Nicholas Johnson
2019-11-07 17:25 ` Logan Gunthorpe

Linux-PCI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pci/0 linux-pci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pci linux-pci/ https://lore.kernel.org/linux-pci \
		linux-pci@vger.kernel.org
	public-inbox-index linux-pci

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pci


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git