]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mac80211: fix divide by zero when NOA update
authorJanusz.Dziedzic@tieto.com <Janusz.Dziedzic@tieto.com>
Tue, 27 Oct 2015 07:35:11 +0000 (08:35 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 5 Feb 2016 03:33:06 +0000 (19:33 -0800)
commitba2122ff5f4b255ccc7ac45a32c8a6167d53cee3
tree37c781732163ad5854c02a422e0c21932894db7a
parent7d57fcef0f9de2accc29c1e213ced948d4d7ed3f
mac80211: fix divide by zero when NOA update

Orabug: 22623849

commit 519ee6918b91abdc4bc9720deae17599a109eb40 upstream.

In case of one shot NOA the interval can be 0, catch that
instead of potentially (depending on the driver) crashing
like this:

divide error: 0000 [#1] SMP
[...]
Call Trace:
<IRQ>
[<ffffffffc08e891c>] ieee80211_extend_absent_time+0x6c/0xb0 [mac80211]
[<ffffffffc08e8a17>] ieee80211_update_p2p_noa+0xb7/0xe0 [mac80211]
[<ffffffffc069cc30>] ath9k_p2p_ps_timer+0x170/0x190 [ath9k]
[<ffffffffc070adf8>] ath_gen_timer_isr+0xc8/0xf0 [ath9k_hw]
[<ffffffffc0691156>] ath9k_tasklet+0x296/0x2f0 [ath9k]
[<ffffffff8107ad65>] tasklet_action+0xe5/0xf0
[...]

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 9da175204e4b721d1b7850337b2c1c76bdc95493)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
net/mac80211/util.c