From: Miaoqian Lin <linmq006@gmail.com>
To: Suman Anna <s-anna@ti.com>
Cc: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
"Nagalla, Hari" <hnagalla@ti.com>
Subject: Re: [PATCH] iommu/omap: Fix missing put_device() call in omap_iommu_probe_device
Date: Wed, 12 Jan 2022 19:54:35 +0800 [thread overview]
Message-ID: <20220112114851.GA712@VICKYMQLIN-NB1.localdomain> (raw)
In-Reply-To: <fd659736-2106-1be3-084b-7caddf2dc18e@ti.com>
Hi Suman,
On Mon, Jan 10, 2022 at 12:43:57PM -0600, Suman Anna wrote:
> Hi Miaoqian,
>
> On 1/9/22 8:43 PM, Miaoqian Lin wrote:
> > Hi Suman Anna,
> > On Fri, Jan 07, 2022 at 08:42:16AM -0600, Suman Anna wrote:
> >> Hi Miaoqian,
> >>
> >>
> >>> Add the corresponding 'put_device()' in the error handling paths.
> >>
> >> Also, need it in the regular path, not just in error handling path.
> > I think after calling platform_get_drvdata() normally, the
> > reference will be released in other functions, so don't need it in the
> > regular path.
> >
>
> No, it's a local reference and is acquired within omap_iommu_probe_device() and
> needs to be released within this function. What other function are you referring
> to here?
>
I am referring to the release function of this device, here is
omap_iommu_release_device(). But I find omap_iommu_release_device()
doesn't handle the reference, and calls kfree(arch_data) directly.
next prev parent reply other threads:[~2022-01-12 11:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 8:04 Miaoqian Lin
2022-01-07 14:42 ` Suman Anna
2022-01-10 2:43 ` Miaoqian Lin
2022-01-10 18:43 ` Suman Anna
2022-01-12 11:54 ` Miaoqian Lin [this message]
2022-03-01 6:33 ` [PATCH v2] " Miaoqian Lin
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=20220112114851.GA712@VICKYMQLIN-NB1.localdomain \
--to=linmq006@gmail.com \
--cc=hnagalla@ti.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=s-anna@ti.com \
--cc=will@kernel.org \
/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
all inboxes | Powered by JetHome®