From: Pavel Roskin Date: Tue, 4 Aug 2009 21:48:16 +0000 (-0400) Subject: rt2x00: fix memory corruption in rf cache, add a sanity check X-Git-Tag: v2.6.31-rc7~27^2~13^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b26dead3ce97d016b57724b01974d5ca5c84bd5;p=pandora-kernel.git rt2x00: fix memory corruption in rf cache, add a sanity check Change rt2x00_rf_read() and rt2x00_rf_write() to subtract 1 from the rf register number. This is needed because the rf registers are enumerated starting with one. The size of the rf register cache is just enough to hold all registers, so writing to the highest register was corrupting memory. Add a check to make sure that the rf register number is valid. Signed-off-by: Pavel Roskin Cc: stable@kernel.org Acked-by: Ivo van Doorn Signed-off-by: John W. Linville --- Reading git-diff-tree failed