Re: dma-debug: check_for_stack background?

From: Joerg Roedel
Date: Mon Jun 15 2009 - 04:14:20 EST


On Sun, Jun 14, 2009 at 11:43:42PM +0200, Stefan Richter wrote:
> Ben Dooks wrote:
>> On Sun, Jun 14, 2009 at 08:56:29PM +0200, Stefan Richter wrote:
>>> the DMA debug facility warns about mappings of on-stack memory.
>>> What's the problem with that?
> ...
>> I'm not sure if it is possible on all architectures, however the
>> DMA mapping documentation prohibts the use of stack memory.
>
> Ah, it has all been documented in plain sight for ages. Thanks for the
> pointer.

Problem is that the stack might go away or could be otherwise reused
while the DMA is in-flight. This could cause really hard to debug
problems.

Joerg

--
| Advanced Micro Devices GmbH
Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
System |
Research | Geschäftsführer: Thomas M. McCoy, Giuliano Meroni
Center | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
| Registergericht München, HRB Nr. 43632

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/