]> err.no Git - linux-2.6/commit
spi_mpc83xx: reject invalid transfer sizes
authorPeter Korsgaard <jacmet@sunsite.dk>
Sat, 13 Sep 2008 09:33:15 +0000 (02:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Sep 2008 21:41:51 +0000 (14:41 -0700)
commitaa77d96ba94326db4f50d2aa36602824dd03286a
tree4c2daacecb7f707d0ecf8569faf14f01d17a5e1e
parent53604dbe1371c3c4458c2d741adbd8cfd8fe8e79
spi_mpc83xx: reject invalid transfer sizes

Error out on transfer length != multiple of bytes per word with -EINVAL.
Fixes a buffer overrun crash if length < bytes per word.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/spi/spi_mpc83xx.c