From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] mscan: too much data copied to CAN frame due to 16 bit accesses Date: Mon, 10 Oct 2011 14:31:13 -0400 (EDT) Message-ID: <20111010.143113.2237300061666609463.davem@davemloft.net> References: <4E8F52CE.1000204@grandegger.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org, Netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, nautsch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, socketcan-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org To: wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org Return-path: In-Reply-To: <4E8F52CE.1000204-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org Errors-To: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org List-Id: netdev.vger.kernel.org From: Wolfgang Grandegger Date: Fri, 07 Oct 2011 21:28:14 +0200 > Due to the 16 bit access to mscan registers there's too much data copied to > the zero initialized CAN frame when having an odd number of bytes to copy. > This patch ensures that only the requested bytes are copied by using an > 8 bit access for the remaining byte. > > Reported-by: Andre Naujoks > Signed-off-by: Oliver Hartkopp > Signed-off-by: Wolfgang Grandegger Applied, thanks everyone.