linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Venkat Rao Bagalkote <venkat88@linux.vnet.ibm.com>,
	jroedel@suse.de, gbatra@linux.vnet.ibm.com,
	Shivaprasad G Bhat <sbhat@linux.ibm.com>,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	npiggin@gmail.com, aneesh.kumar@kernel.org,
	tpearson@raptorengineering.com, iommu@lists.linux.dev,
	bgray@linux.ibm.com, naveen.n.rao@linux.ibm.com,
	vaibhav@linux.ibm.com, linuxppc-dev@lists.ozlabs.org,
	aik@amd.com
Subject: Re: [PATCH] powerpc/iommu: Fix the missing iommu_group_put() during platform domain attach
Date: Wed, 14 Feb 2024 08:58:19 -0400	[thread overview]
Message-ID: <20240214125819.GA1299735@ziepe.ca> (raw)
In-Reply-To: <87le7n6wcf.fsf@mail.lhotse>

On Wed, Feb 14, 2024 at 11:53:20PM +1100, Michael Ellerman wrote:
> Venkat Rao Bagalkote <venkat88@linux.vnet.ibm.com> writes:
> > Thanks for the patch. Applied this patch and verified and issue is fixed.
> >
> > This issue way originally reported in the below mail.
> >
> > https://marc.info/?l=linux-kernel&m=170737160630106&w=2
> 
> Please use lore for links, in this case:
> 
> https://lore.kernel.org/all/274e0d2b-b5cc-475e-94e6-8427e88e271d@linux.vnet.ibm.com/

Also if you are respinning you may prefer this

@@ -1285,14 +1285,15 @@ spapr_tce_platform_iommu_attach_dev(struct iommu_domain *platform_domain,
                                    struct device *dev)
 {
        struct iommu_domain *domain = iommu_get_domain_for_dev(dev);
-       struct iommu_group *grp = iommu_group_get(dev);
        struct iommu_table_group *table_group;
+       struct iommu_group *grp;
        int ret = -EINVAL;
 
        /* At first attach the ownership is already set */
        if (!domain)
                return 0;
 
+       grp = iommu_group_get(dev);
        if (!grp)
                return -ENODEV;

Which is sort of why this happened in the first place :)

Jason

  reply	other threads:[~2024-02-14 12:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-13 16:05 [PATCH] powerpc/iommu: Fix the missing iommu_group_put() during platform domain attach Shivaprasad G Bhat
2024-02-13 17:21 ` Jason Gunthorpe
2024-02-14  5:34   ` Venkat Rao Bagalkote
2024-02-14 12:53     ` Michael Ellerman
2024-02-14 12:58       ` Jason Gunthorpe [this message]
2024-02-14 18:13         ` Shivaprasad G Bhat
2024-02-15 12:57 ` Michael Ellerman

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=20240214125819.GA1299735@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=aik@amd.com \
    --cc=aneesh.kumar@kernel.org \
    --cc=bgray@linux.ibm.com \
    --cc=gbatra@linux.vnet.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=iommu@lists.linux.dev \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=sbhat@linux.ibm.com \
    --cc=tpearson@raptorengineering.com \
    --cc=vaibhav@linux.ibm.com \
    --cc=venkat88@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;
as well as URLs for NNTP newsgroup(s).