mac80211/minstrel: fix NULL pointer dereference issue
authorFelix Fietkau <nbd@openwrt.org>
Mon, 15 Jul 2013 12:35:06 +0000 (14:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Aug 2013 01:35:22 +0000 (18:35 -0700)
commit57fe9f79b907bdb8ef1fd8b31824f8901581369e
tree7b580193bd6406f028a271575a92acab2e1c059e
parentc8942c6aac25cc5e98161c1a6b84b6ae10bff945
mac80211/minstrel: fix NULL pointer dereference issue

commit 5c9fc93bc9bc417418fc1b6366833ae6a07b804d upstream.

When priv_sta == NULL, mi->prev_sample is dereferenced too early. Move
the assignment further down, after the rate_control_send_low call.

Reported-by: Krzysztof Mazur <krzysiek@podlesie.net>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/rc80211_minstrel.c