* Question about setup error in mac80211
@ 2012-04-05 3:37 Larry Finger
2012-04-05 6:47 ` Helmut Schaa
0 siblings, 1 reply; 2+ messages in thread
From: Larry Finger @ 2012-04-05 3:37 UTC (permalink / raw)
To: Johannes Berg; +Cc: wireless, John Linville
In https://bugzilla.kernel.org/show_bug.cgi?id=43044, driver rtl8192ce is
getting an oops due to a NULL pointer dereference due to NULL being returned by
ieee80211_get_tx_rate. For reference, the code in question is
static inline struct ieee80211_rate *
ieee80211_get_tx_rate(const struct ieee80211_hw *hw,
const struct ieee80211_tx_info *c)
{
if (WARN_ON(c->control.rates[0].idx < 0))
return NULL;
return &hw->wiphy->bands[c->band]->bitrates[c->control.rates[0].idx];
}
Any thoughts regarding what might be causing this? I don't have the full log,
but I assume that the WARN_ON must have been in the logs.
I can easily protect rtlwifi, but I would like to know the cause.
Thanks,
Larry
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Question about setup error in mac80211
2012-04-05 3:37 Question about setup error in mac80211 Larry Finger
@ 2012-04-05 6:47 ` Helmut Schaa
0 siblings, 0 replies; 2+ messages in thread
From: Helmut Schaa @ 2012-04-05 6:47 UTC (permalink / raw)
To: Larry Finger; +Cc: Johannes Berg, wireless, John Linville
On Thu, Apr 5, 2012 at 5:37 AM, Larry Finger <Larry.Finger@lwfinger.net> wrote:
> In https://bugzilla.kernel.org/show_bug.cgi?id=43044, driver rtl8192ce is
> getting an oops due to a NULL pointer dereference due to NULL being returned
> by ieee80211_get_tx_rate. For reference, the code in question is
>
> static inline struct ieee80211_rate *
> ieee80211_get_tx_rate(const struct ieee80211_hw *hw,
> const struct ieee80211_tx_info *c)
> {
> if (WARN_ON(c->control.rates[0].idx < 0))
> return NULL;
> return &hw->wiphy->bands[c->band]->bitrates[c->control.rates[0].idx];
For MCS rates c->control.rates[0].idx contains the MCS rate itself. So, calling
ieee80211_get_tx_rate for an MCS rate might actually cause this ...
Helmut
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-05 6:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-05 3:37 Question about setup error in mac80211 Larry Finger
2012-04-05 6:47 ` Helmut Schaa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).