Re: [PATCH] usb/mcs7830: Don't use buffers from stack for USB transfers

From: Arnd Bergmann
Date: Tue Jan 20 2009 - 17:46:17 EST

On Tuesday 20 January 2009, you wrote:
> From: Christian Eggers <christian.eggers@xxxxxxxxxxx>
> mcs7830_set_reg() and mcs7830_get_reg() are called with buffers
> from stack which must not be used directly for USB transfers.
> This causes corruption of the stack particulary on non x86
> architectures because DMA may be used for these transfers.
> Signed-off-by: Christian Eggers <christian.eggers@xxxxxxxxxxx>

Have you observed problems with this, or just suspected trouble?

When I wrote this code, I looked at other code doing the same
and assumed it was ok, because usb_control_msg waits for the
DMA to complete before returning.

Is the problem only on systems that have noncoherent DMA, or
something else?

> This is my first patch submission for Linux. I hope everything is fine.

I was about to say that you should have Cc:'d me, but then I noticed
that I'm not listed in the driver as maintainer, nor in the MAINTAINERS
file, so I can't really complain here ;-)

Arnd <><
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at