]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
staging: wfx: fix overflow in frame counters
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Mon, 27 Apr 2020 13:40:23 +0000 (15:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Apr 2020 12:14:27 +0000 (14:14 +0200)
It has been reported that trying to send small packets of data could
produce a "inconsistent notification" warning.

It seems that in some circumstances, the number of frame queued in the
driver could greatly increase and exceed UCHAR_MAX. So the field
"buffered" from struct sta_priv can overflow.

Just increase the size of "bueffered" to fix the problem.

Fixes: 7d2d2bfdeb82 ("staging: wfx: relocate "buffered" information to sta_priv")
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200427134031.323403-10-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/sta.h

index f7e876d1b03184c06e1c272675852e1eca42a07c..a0e025c183413eda4ed5525586bbab4ea5390d27 100644 (file)
@@ -18,7 +18,7 @@ struct wfx_vif;
 struct wfx_sta_priv {
        int link_id;
        int vif_id;
-       u8 buffered[IEEE80211_NUM_TIDS];
+       int buffered[IEEE80211_NUM_TIDS];
        // Ensure atomicity of "buffered" and calls to ieee80211_sta_set_buffered()
        spinlock_t lock;
 };