mac80211: fix possible tid_rx->reorder_timer use after free
authorStanislaw Gruszka <sgruszka@redhat.com>
Mon, 19 Mar 2012 15:00:26 +0000 (16:00 +0100)
committerLuis Henriques <luis.henriques@canonical.com>
Mon, 30 Apr 2012 18:15:00 +0000 (19:15 +0100)
commit5a9a2c34a3f4c4c9a3064e307a11ed2abbbbc369
tree85b08d7183cf0a031d59b1737c4efd3b86cefa05
parent4ec42917d7296e0d564d06d22bd592847d73cd22
mac80211: fix possible tid_rx->reorder_timer use after free

BugLink: http://bugs.launchpad.net/bugs/981162

commit d72308bff5c2fa207949a5925b020bce74495e33 upstream.

Is possible that we will arm the tid_rx->reorder_timer after
del_timer_sync() in ___ieee80211_stop_rx_ba_session(). We need to stop
timer after RCU grace period finish, so move it to
ieee80211_free_tid_rx(). Timer will not be armed again, as
rcu_dereference(sta->ampdu_mlme.tid_rx[tid]) will return NULL.

Debug object detected problem with the following warning:
ODEBUG: free active (active state 0) object type: timer_list hint: sta_rx_agg_reorder_timer_expired+0x0/0xf0 [mac80211]

Bug report (with all warning messages):
https://bugzilla.redhat.com/show_bug.cgi?id=804007

Reported-by: "jan p. springer" <jsd@igroup.org>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
net/mac80211/agg-rx.c