* [PATCH] Bug Fix arch/ia64/kernel/pci-dma.c: fix recursive dma_supported() call in iommu_dma_supporte
@ 2009-08-04 22:35 Fenghua Yu
2009-08-05 0:31 ` [PATCH] Bug Fix arch/ia64/kernel/pci-dma.c: fix recursive FUJITA Tomonori
2009-08-05 3:04 ` Yu, Fenghua
0 siblings, 2 replies; 3+ messages in thread
From: Fenghua Yu @ 2009-08-04 22:35 UTC (permalink / raw)
To: linux-ia64
In commit dfb805e831cc5306b14eacd64e0b36d0d973ee0d,
dma_ops->dma_supported = iommu_dma_supported;
This dma_ops->dma_supported is first called in platform_dma_init() during kernel
boot. Then dma_ops->dma_supported will be called recursively in
iommu_dma_supported.
Kernel can not boot because kernel can not get out of iommu_dma_supported until
it runs out of stack memory.
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
---
arch/ia64/kernel/pci-dma.c | 5 -----
1 files changed, 5 deletions(-)
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c
index 0569596..f6b1ff0 100644
--- a/arch/ia64/kernel/pci-dma.c
+++ b/arch/ia64/kernel/pci-dma.c
@@ -69,11 +69,6 @@ iommu_dma_init(void)
int iommu_dma_supported(struct device *dev, u64 mask)
{
- struct dma_map_ops *ops = platform_dma_get_ops(dev);
-
- if (ops->dma_supported)
- return ops->dma_supported(dev, mask);
-
/* Copied from i386. Doesn't make much sense, because it will
only work for pci_alloc_coherent.
The caller just has to use GFP_DMA in this case. */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Bug Fix arch/ia64/kernel/pci-dma.c: fix recursive
2009-08-04 22:35 [PATCH] Bug Fix arch/ia64/kernel/pci-dma.c: fix recursive dma_supported() call in iommu_dma_supporte Fenghua Yu
@ 2009-08-05 0:31 ` FUJITA Tomonori
2009-08-05 3:04 ` Yu, Fenghua
1 sibling, 0 replies; 3+ messages in thread
From: FUJITA Tomonori @ 2009-08-05 0:31 UTC (permalink / raw)
To: linux-ia64
On Tue, 4 Aug 2009 15:35:26 -0700
Fenghua Yu <fenghua.yu@intel.com> wrote:
> In commit dfb805e831cc5306b14eacd64e0b36d0d973ee0d,
> dma_ops->dma_supported = iommu_dma_supported;
Hmm, the dfb805e831cc5306b14eacd64e0b36d0d973ee0d commit touches only
dma_ops->mapping_error. It doesn't like like that this commit is
related with the bug.
I guess that I added the bug when I rewrote IA64 dma operations.
> This dma_ops->dma_supported is first called in platform_dma_init() during kernel
> boot. Then dma_ops->dma_supported will be called recursively in
> iommu_dma_supported.
>
> Kernel can not boot because kernel can not get out of iommu_dma_supported until
> it runs out of stack memory.
The patch looks correct.
Reviewed-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Thanks!
>
> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
>
> ---
>
> arch/ia64/kernel/pci-dma.c | 5 -----
> 1 files changed, 5 deletions(-)
>
> diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c
> index 0569596..f6b1ff0 100644
> --- a/arch/ia64/kernel/pci-dma.c
> +++ b/arch/ia64/kernel/pci-dma.c
> @@ -69,11 +69,6 @@ iommu_dma_init(void)
>
> int iommu_dma_supported(struct device *dev, u64 mask)
> {
> - struct dma_map_ops *ops = platform_dma_get_ops(dev);
> -
> - if (ops->dma_supported)
> - return ops->dma_supported(dev, mask);
> -
> /* Copied from i386. Doesn't make much sense, because it will
> only work for pci_alloc_coherent.
> The caller just has to use GFP_DMA in this case. */
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] Bug Fix arch/ia64/kernel/pci-dma.c: fix recursive
2009-08-04 22:35 [PATCH] Bug Fix arch/ia64/kernel/pci-dma.c: fix recursive dma_supported() call in iommu_dma_supporte Fenghua Yu
2009-08-05 0:31 ` [PATCH] Bug Fix arch/ia64/kernel/pci-dma.c: fix recursive FUJITA Tomonori
@ 2009-08-05 3:04 ` Yu, Fenghua
1 sibling, 0 replies; 3+ messages in thread
From: Yu, Fenghua @ 2009-08-05 3:04 UTC (permalink / raw)
To: linux-ia64
>On Tue, 4 Aug 2009 15:35:26 -0700
>Fenghua Yu <fenghua.yu@intel.com> wrote:
>
>> In commit dfb805e831cc5306b14eacd64e0b36d0d973ee0d,
>> dma_ops->dma_supported = iommu_dma_supported;
>
>Hmm, the dfb805e831cc5306b14eacd64e0b36d0d973ee0d commit touches only
>dma_ops->mapping_error. It doesn't like like that this commit is
>related with the bug.
>
>I guess that I added the bug when I rewrote IA64 dma operations.
My bad. The commit I refer to should be 160c1d8e40866edfeae7d68816b7005d70acf391
which added the statement:
dma_ops->dma_supported = iommu_dma_supported;
I will change to this commit# in comment when push the patch to upstream.
Thanks.
-Fenghua
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-05 3:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-04 22:35 [PATCH] Bug Fix arch/ia64/kernel/pci-dma.c: fix recursive dma_supported() call in iommu_dma_supporte Fenghua Yu
2009-08-05 0:31 ` [PATCH] Bug Fix arch/ia64/kernel/pci-dma.c: fix recursive FUJITA Tomonori
2009-08-05 3:04 ` Yu, Fenghua
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox