OSDN Git Service

iwlwifi: mvm: protect rate scaling against non-mvm IBSS stations
authorJohannes Berg <johannes.berg@intel.com>
Tue, 10 Mar 2015 20:24:34 +0000 (21:24 +0100)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 19 Mar 2015 12:53:35 +0000 (14:53 +0200)
commitdcbc17ad7c7525ed04a45a94cfc5640d5cccf480
tree67169f46e3369c3d91667a132a0c4fffb2e19702
parent9c8928f5176766bec79f272bd47b7124e11cccbd
iwlwifi: mvm: protect rate scaling against non-mvm IBSS stations

When the driver callback returns that it's out of space for new
stations, the mac80211 IBSS code still keeps the station so it
doesn't try to add it over and over again.

Since the rate scaling algorithm is separate in mac80211, it also
invokes the rate scaling algorithm for such stations. It doesn't
know that our rate scaling algorithm is tightly integrated with
the MVM code and relies on those data structures, and it cannot
as the abstraction doesn't allow for it.

This leads to crashes when the rate scaling algorithm tries to
use uninitialized data, notably the mvmsta->vif pointer.

Protect against this in the rate scaling algorithm. We cannot get
good rates with such peers anyway since the firmware cannot do
anything with them.

This should fix https://bugzilla.kernel.org/show_bug.cgi?id=93461

CC: <stable@vger.kernel.org>
Reported-by: Richard Taylor <rjt-kernel@thegrindstone.me.uk>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/rs.c