Showing error 1829

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: drivers/net/wireless/ath9k/rc.c
Line in file: 1000
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-11 08:47:26 UTC


Source:

 970         * non-monoticity of 11g's rate table
 971         */
 972
 973        if (rate >= rate_ctrl->rate_max_phy && probe_allowed) {
 974                rate = rate_ctrl->rate_max_phy;
 975
 976                /* Probe the next allowed phy state */
 977                /* FIXME:XXXX Check to make sure ratMax is checked properly */
 978                if (ath_rc_get_nextvalid_txrate(rate_table,
 979                                                rate_ctrl, rate, &next_rate) &&
 980                    (now_msec - rate_ctrl->probe_time >
 981                     rate_table->probe_interval) &&
 982                    (rate_ctrl->hw_maxretry_pktcnt >= 1)) {
 983                        rate = next_rate;
 984                        rate_ctrl->probe_rate = rate;
 985                        rate_ctrl->probe_time = now_msec;
 986                        rate_ctrl->hw_maxretry_pktcnt = 0;
 987                        *is_probing = TRUE;
 988                }
 989        }
 990
 991        /*
 992         * Make sure rate is not higher than the allowed maximum.
 993         * We should also enforce the min, but I suspect the min is
 994         * normally 1 rather than 0 because of the rate 9 vs 6 issue
 995         * in the old code.
 996         */
 997        if (rate > (rate_ctrl->rate_table_size - 1))
 998                rate = rate_ctrl->rate_table_size - 1;
 999
1000        ASSERT((rate_table->info[rate].valid && !ath_rc_priv->single_stream) ||
1001               (rate_table->info[rate].valid_single_stream &&
1002                ath_rc_priv->single_stream));
1003
1004        return rate;
1005}
1006
1007static void ath_rc_rate_set_series(const struct ath_rate_table *rate_table ,
1008                                   struct ath_rc_series *series,
1009                                   u8 tries,
1010                                   u8 rix,
Show full sources