public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: marc.zyngier@arm•com (Marc Zyngier)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] iommu/arm-smmu: fix panic in arm_smmu_alloc_init_pte
Date: Fri, 21 Mar 2014 10:57:08 +0000	[thread overview]
Message-ID: <532C1B04.2040601@arm.com> (raw)
In-Reply-To: <1395396367-19110-1-git-send-email-binw@marvell.com>

Hi Bin,

On 21/03/14 10:06, Bin Wang wrote:
> kernel panic happened when iommu_unmap a buffer larger than 2MB,
> more than expected pmd entries got ?invalidated?, due to a wrong range
> passed to arm_smmu_alloc_init_pte. it was likely a typo, now we fix
> it, passing the correct "end" address to arm_smmu_alloc_init_pte.
> 
> Signed-off-by: Bin Wang <binw@marvell•com>
> ---
>  drivers/iommu/arm-smmu.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
> index 1d9ab39..52d0c34 100644
> --- a/drivers/iommu/arm-smmu.c
> +++ b/drivers/iommu/arm-smmu.c
> @@ -1346,7 +1346,7 @@ static int arm_smmu_alloc_init_pmd(struct arm_smmu_device *smmu, pud_t *pud,
>  
>  	do {
>  		next = pmd_addr_end(addr, end);
> -		ret = arm_smmu_alloc_init_pte(smmu, pmd, addr, end, pfn,
> +		ret = arm_smmu_alloc_init_pte(smmu, pmd, addr, next, pfn,
>  					      flags, stage);
>  		phys += next - addr;
>  	} while (pmd++, addr = next, addr < end);
> 

Looks like a valid fix. In Will's absence ([1]), I'll queue it for 3.15,
and CC stable.

Joerg: are you still taking pull requests for 3.15, or shall I wait
until rc1?

Thanks,

	M.

[1]: http://www.spinics.net/lists/arm-kernel/msg315615.html
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2014-03-21 10:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-21 10:06 [PATCH] iommu/arm-smmu: fix panic in arm_smmu_alloc_init_pte Bin Wang
2014-03-21 10:57 ` Marc Zyngier [this message]
2014-03-21 11:16   ` Joerg Roedel

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=532C1B04.2040601@arm.com \
    --to=marc.zyngier@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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