From: Joerg Roedel <joro@8bytes.org>
To: Lu Baolu <baolu.lu@linux.intel.com>
Cc: Will Deacon <will@kernel.org>, Dave Jiang <dave.jiang@intel.com>,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] iommu/vt-d: Fix lockdep splat in intel_pasid_get_entry()
Date: Fri, 19 Mar 2021 10:08:43 +0100 [thread overview]
Message-ID: <YFRqG3DW8k0Zrk0w@8bytes.org> (raw)
In-Reply-To: <89f87115-32dc-205e-61e0-71de0d626303@linux.intel.com>
Hi Baolu,
On Fri, Mar 19, 2021 at 09:02:34AM +0800, Lu Baolu wrote:
> This code modifies the pasid directory entry. The pasid directory
> entries are allocated on demand and will never be freed.
>
> > What you need to do here is to retry the whole path by adding a goto
> > to before the first get_pasid_table_from_pde() call.
>
> Yes. Retrying by adding a goto makes the code clearer.
>
> >
> > Btw, what makes sure that the pasid_entry does not go away when it is
> > returned here?
>
> As explained above, it handles the pasid directory table entry which
> won't go away.
Okay, I think the goto is a good idea anyway, in case this changes
someday. Please also add a comment to this code stating that the entries
are never freed.
Regards,
Joerg
prev parent reply other threads:[~2021-03-19 9:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-17 0:58 [PATCH 1/1] iommu/vt-d: Fix lockdep splat in intel_pasid_get_entry() Lu Baolu
2021-03-18 10:21 ` Joerg Roedel
2021-03-19 1:02 ` Lu Baolu
2021-03-19 9:08 ` Joerg Roedel [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=YFRqG3DW8k0Zrk0w@8bytes.org \
--to=joro@8bytes.org \
--cc=baolu.lu@linux.intel.com \
--cc=dave.jiang@intel.com \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--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