Skip to content
Commit 6b26dead authored by Pavel Roskin's avatar Pavel Roskin Committed by John W. Linville
Browse files

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: default avatarPavel Roskin <proski@gnu.org>
Cc: stable@kernel.org
Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 416fbdff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment