Search Linux Wireless

Re: [PATCH 2.6.36] ath5k: check return value of ieee80211_get_tx_rate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 24, 2010 at 3:27 PM, John W. Linville
<linville@xxxxxxxxxxxxx> wrote:
> This avoids a NULL pointer dereference as reported here:
>
>        https://bugzilla.redhat.com/show_bug.cgi?id=625889
>
> When the WARN condition is hit in ieee80211_get_tx_rate, it will return
> NULL.  So, we need to check the return value and avoid dereferencing it
> in that case.

Yeah, it's ok with me, but get_tx_rate returning NULL always bugged me.
We could also make mac80211 return rate_lowest_index() here, perhaps?

> Of course, the better question is why are we hitting that condition at
> all...?

Some rate controller decided to stuff -1 in the rate set... no idea
why.

-- 
Bob Copeland %% www.bobcopeland.com
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux