Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762070AbZATWr3 (ORCPT ); Tue, 20 Jan 2009 17:47:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755820AbZATWrT (ORCPT ); Tue, 20 Jan 2009 17:47:19 -0500 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:40159 "EHLO sunset.davemloft.net" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1755521AbZATWrS (ORCPT ); Tue, 20 Jan 2009 17:47:18 -0500 Date: Tue, 20 Jan 2009 14:47:19 -0800 (PST) Message-Id: <20090120.144719.120709836.davem@davemloft.net> To: arnd@arndb.de Cc: ceggers@gmx.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] usb/mcs7830: Don't use buffers from stack for USB transfers From: David Miller In-Reply-To: <200901202345.47792.arnd@arndb.de> References: <34115.192.168.0.40.1232483361.squirrel@server> <200901202345.47792.arnd@arndb.de> X-Mailer: Mew version 6.1 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1049 Lines: 25 From: Arnd Bergmann Date: Tue, 20 Jan 2009 23:45:47 +0100 > On Tuesday 20 January 2009, you wrote: > > From: Christian Eggers > > > > 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 > > Have you observed problems with this, or just suspected trouble? Yes, this is in response to SH platform failures. You cannot DMA from/to the kernel stack, because it might not be in the aliased linear mapping of physical memory. It could even be vmalloc()'d memory on some platforms. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/