linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu/arm-smmu: fix panic in arm_smmu_alloc_init_pte
@ 2014-03-21 10:06 Bin Wang
  2014-03-21 10:57 ` Marc Zyngier
  0 siblings, 1 reply; 3+ messages in thread
From: Bin Wang @ 2014-03-21 10:06 UTC (permalink / raw)
  To: linux-arm-kernel

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);
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] iommu/arm-smmu: fix panic in arm_smmu_alloc_init_pte
  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
  2014-03-21 11:16   ` Joerg Roedel
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Zyngier @ 2014-03-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

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...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] iommu/arm-smmu: fix panic in arm_smmu_alloc_init_pte
  2014-03-21 10:57 ` Marc Zyngier
@ 2014-03-21 11:16   ` Joerg Roedel
  0 siblings, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2014-03-21 11:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Mar 21, 2014 at 10:57:08AM +0000, Marc Zyngier wrote:
> Joerg: are you still taking pull requests for 3.15, or shall I wait
> until rc1?

No need to wait for rc1, send me a pull-request and I will send the fix
upstream.


	Joerg

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-21 11:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-03-21 11:16   ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).