LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, linuxppc-dev@lists.ozlabs.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	Oliver O'Halloran <oohall@gmail.com>,
	Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Subject: Re: [kernel] powerpc/powernv/ioda2: Remove redundand free of TCE pages
Date: Tue,  5 Jun 2018 00:11:21 +1000 (AEST)	[thread overview]
Message-ID: <40zxgf0h8yz9s5c@ozlabs.org> (raw)
In-Reply-To: <20180530092250.28981-1-aik@ozlabs.ru>

On Wed, 2018-05-30 at 09:22:50 UTC, Alexey Kardashevskiy wrote:
> When IODA2 creates a PE, it creates an IOMMU table with it_ops::free
> set to pnv_ioda2_table_free() which calls pnv_pci_ioda2_table_free_pages().
> 
> Since iommu_tce_table_put() calls it_ops::free when the last reference
> to the table is released, explicit call to pnv_pci_ioda2_table_free_pages()
> is not needed so let's remove it.
> 
> This should fix double free in the case of PCI hotuplug as
> pnv_pci_ioda2_table_free_pages() does not reset neither
> iommu_table::it_base nor ::it_size.
> 
> This was not exposed by SRIOV as it uses different code path via
> pnv_pcibios_sriov_disable().
> 
> IODA1 does not inialize it_ops::free so it does not have this issue.
> 
> Fixes: c5f7700bb "powerpc/powernv: Dynamically release PE"
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/98fd72fe82527fd26618062b60cfd3

cheers

      reply	other threads:[~2018-06-04 14:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-30  9:22 [PATCH kernel] powerpc/powernv/ioda2: Remove redundand free of TCE pages Alexey Kardashevskiy
2018-06-04 14:11 ` Michael Ellerman [this message]

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=40zxgf0h8yz9s5c@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=aik@ozlabs.ru \
    --cc=andrew.donnellan@au1.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=oohall@gmail.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