From: "John W. Linville" <linville@tuxdriver.com>
To: Bob Copeland <me@bobcopeland.com>
Cc: linux-wireless@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH 2.6.36] ath5k: check return value of ieee80211_get_tx_rate
Date: Wed, 25 Aug 2010 09:46:26 -0400 [thread overview]
Message-ID: <20100825134626.GE2557@tuxdriver.com> (raw)
In-Reply-To: <AANLkTi=g2p8qOMg0Pq=N_tb6t3_6qWg5+WY9yySqPcoA@mail.gmail.com>
On Tue, Aug 24, 2010 at 05:38:21PM -0400, Bob Copeland wrote:
> On Tue, Aug 24, 2010 at 3:27 PM, John W. Linville
> <linville@tuxdriver.com> 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?
Yeah, I was considering that as an alternative.
> > 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.
Well, I got that part already... :-)
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
prev parent reply other threads:[~2010-08-25 13:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-24 19:27 [PATCH 2.6.36] ath5k: check return value of ieee80211_get_tx_rate John W. Linville
2010-08-24 21:38 ` Bob Copeland
2010-08-25 13:46 ` John W. Linville [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100825134626.GE2557@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=linux-wireless@vger.kernel.org \
--cc=me@bobcopeland.com \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.