[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220209191614.5a3b42d4@jacob-builder>
Date: Wed, 9 Feb 2022 19:16:14 -0800
From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
To: Fenghua Yu <fenghua.yu@...el.com>
Cc: "Thomas Gleixner" <tglx@...utronix.de>,
"Dave Hansen" <dave.hansen@...ux.intel.com>,
"Ingo Molnar" <mingo@...hat.com>, "Borislav Petkov" <bp@...en8.de>,
"Peter Zijlstra" <peterz@...radead.org>,
"Andy Lutomirski" <luto@...nel.org>,
"Tony Luck" <tony.luck@...el.com>,
"Lu Baolu" <baolu.lu@...ux.intel.com>,
"Joerg Roedel" <joro@...tes.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
"Ashok Raj" <ashok.raj@...el.com>,
"Ravi V Shankar" <ravi.v.shankar@...el.com>,
iommu@...ts.linux-foundation.org, "x86" <x86@...nel.org>,
"linux-kernel" <linux-kernel@...r.kernel.org>,
jacob.jun.pan@...ux.intel.com
Subject: Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID
allocation and free it on mm exit
Hi Fenghua,
On Mon, 7 Feb 2022 15:02:48 -0800, Fenghua Yu <fenghua.yu@...el.com> wrote:
> @@ -1047,8 +1040,6 @@ struct iommu_sva *intel_svm_bind(struct device
> *dev, struct mm_struct *mm, void }
>
> sva = intel_svm_bind_mm(iommu, dev, mm, flags);
> - if (IS_ERR_OR_NULL(sva))
> - intel_svm_free_pasid(mm);
If bind fails, the PASID has no IOMMU nor CPU context. It should be safe to
free here.
Thanks,
Jacob
Powered by blists - more mailing lists