iwlagn: fix panic in iwl{5000,4965}_rx_reply_tx
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 23 Sep 2009 08:51:34 +0000 (10:51 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 23 Sep 2009 15:35:54 +0000 (11:35 -0400)
commit6c6a22e26868285dc3dac280e0e57de029bfae1b
treee935672ad4533c449dc805b0ac298abbca0cadd4
parente31f7b96f0252e8da06df1bc7fd0f6dbc8cbec42
iwlagn: fix panic in iwl{5000,4965}_rx_reply_tx

In some cases firmware can give us bad value of index in transmit
buffers array. This patch add sanity check for such values and return
from processing function instantly when it happens.

https://bugzilla.redhat.com/show_bug.cgi?id=521931

Patch was tested by reporter on iwl5000. I think check can be also
helpful for 4965.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-5000.c