Subject: Re: [PATCH net] mscan: zero accidentally copied register content

From: Marc Kleine-Budde <[email-masked]>
Date: Thu, 06 Oct 2011 20:25:24 +0200

On 10/05/2011 05:34 PM, Oliver Hartkopp wrote:
> 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 clears the data byte read from the invalid register entry.
> 
> Reported-by: Andre Naujoks <[email-masked]>
> Signed-off-by: Oliver Hartkopp <[email-masked]>

This problem have some other drivers, too, e.g. the at91 and the flexcan
driver both copy unconditionally all 8 bytes from the hardware. However,
I don't know if the hardware sets the remaining bytes to zero.

cheers, Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |