]> git.baikalelectronics.ru Git - kernel.git/commit
NET: ath5k, check ath5k_eeprom_mode_from_channel retval
authorJiri Slaby <jslaby@suse.cz>
Thu, 7 Feb 2013 13:44:40 +0000 (14:44 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 8 Feb 2013 19:51:35 +0000 (14:51 -0500)
commit20426a4f1726ea78684b0915b87b5d53304c33a2
tree622101388098cd26f07b1a576291bdb988957916
parentb56ad186cc07a73546a21139f3f10e42c1f24a66
NET: ath5k, check ath5k_eeprom_mode_from_channel retval

It can, if invalid argument given, return a negative value. In that
case we would access arrays out-of-bounds and such. Check the value
and yell loudly if that happened as it would be a bug in the
implementation. (Instead of silently corrupting memory.)

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/phy.c
drivers/net/wireless/ath/ath5k/reset.c