From: <gregkh@linuxfoundation.org>
To: will.deacon@arm.com, gregkh@linuxfoundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "iommu/arm-smmu: Fix error checking for ASID and VMID allocation" has been added to the 4.3-stable tree
Date: Tue, 26 Jan 2016 22:55:54 -0800 [thread overview]
Message-ID: <14538777541065@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
iommu/arm-smmu: Fix error checking for ASID and VMID allocation
to the 4.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
iommu-arm-smmu-fix-error-checking-for-asid-and-vmid-allocation.patch
and it can be found in the queue-4.3 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From c0733a2cf30c1e7923b6ad4f8df67941502923de Mon Sep 17 00:00:00 2001
From: Will Deacon <will.deacon@arm.com>
Date: Tue, 13 Oct 2015 17:51:14 +0100
Subject: iommu/arm-smmu: Fix error checking for ASID and VMID allocation
From: Will Deacon <will.deacon@arm.com>
commit c0733a2cf30c1e7923b6ad4f8df67941502923de upstream.
The bitmap allocator returns an int, which is one of the standard
negative values on failure. Rather than assigning this straight to a
u16 (like we do for the ASID and VMID callers), which means that we
won't detect failure correctly, use an int for the purposes of error
checking.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/iommu/arm-smmu-v3.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/drivers/iommu/arm-smmu-v3.c
+++ b/drivers/iommu/arm-smmu-v3.c
@@ -1427,7 +1427,7 @@ static int arm_smmu_domain_finalise_s1(s
struct io_pgtable_cfg *pgtbl_cfg)
{
int ret;
- u16 asid;
+ int asid;
struct arm_smmu_device *smmu = smmu_domain->smmu;
struct arm_smmu_s1_cfg *cfg = &smmu_domain->s1_cfg;
@@ -1439,10 +1439,11 @@ static int arm_smmu_domain_finalise_s1(s
&cfg->cdptr_dma, GFP_KERNEL);
if (!cfg->cdptr) {
dev_warn(smmu->dev, "failed to allocate context descriptor\n");
+ ret = -ENOMEM;
goto out_free_asid;
}
- cfg->cd.asid = asid;
+ cfg->cd.asid = (u16)asid;
cfg->cd.ttbr = pgtbl_cfg->arm_lpae_s1_cfg.ttbr[0];
cfg->cd.tcr = pgtbl_cfg->arm_lpae_s1_cfg.tcr;
cfg->cd.mair = pgtbl_cfg->arm_lpae_s1_cfg.mair[0];
@@ -1456,7 +1457,7 @@ out_free_asid:
static int arm_smmu_domain_finalise_s2(struct arm_smmu_domain *smmu_domain,
struct io_pgtable_cfg *pgtbl_cfg)
{
- u16 vmid;
+ int vmid;
struct arm_smmu_device *smmu = smmu_domain->smmu;
struct arm_smmu_s2_cfg *cfg = &smmu_domain->s2_cfg;
@@ -1464,7 +1465,7 @@ static int arm_smmu_domain_finalise_s2(s
if (IS_ERR_VALUE(vmid))
return vmid;
- cfg->vmid = vmid;
+ cfg->vmid = (u16)vmid;
cfg->vttbr = pgtbl_cfg->arm_lpae_s2_cfg.vttbr;
cfg->vtcr = pgtbl_cfg->arm_lpae_s2_cfg.vtcr;
return 0;
Patches currently in stable-queue which might be from will.deacon@arm.com are
queue-4.3/arm64-kernel-pause-unpause-function-graph-tracer-in-cpu_suspend.patch
queue-4.3/arm64-mm-ensure-that-the-zero-page-is-visible-to-the-page-table-walker.patch
queue-4.3/arm64-fix-building-without-config_uid16.patch
queue-4.3/arm64-kernel-enforce-pmuserenr_el0-initialization-and-restore.patch
queue-4.3/arm64-cmpxchg_dbl-fix-return-value-type.patch
queue-4.3/arm64-clear-out-any-singlestep-state-on-a-ptrace-detach-operation.patch
queue-4.3/iommu-arm-smmu-fix-error-checking-for-asid-and-vmid-allocation.patch
queue-4.3/recordmcount-arm64-replace-the-ignored-mcount-call-into-nop.patch
reply other threads:[~2016-01-27 6:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=14538777541065@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=will.deacon@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.