]> git.baikalelectronics.ru Git - kernel.git/commit
ath10k: fixup extended per sta tx statistics
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 18 Oct 2018 07:36:19 +0000 (10:36 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 5 Nov 2018 11:09:58 +0000 (13:09 +0200)
commit7aed948b7dcc5e2123eb3b6a5181f5c6bd7ceec7
tree96e59c2df6380c543edef0a56a4fbf49a1e669c3
parentcd1edf5a9d4dda9440217e0aea6e8217e5f3d98a
ath10k: fixup extended per sta tx statistics

I had a couple concerns with this code.  First, we definitely need to
set the error code if the kzalloc() fails.  Secondly, I was worried that
if we didn't set "arsta->tx_stats" to NULL after freeing it, then it
looks to me like it might lead to a use after free.  I can't test that,
but it's harmless to set it to NULL so I did.

Fixes: 487b878c3280 ("ath10k: add extended per sta tx statistics support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/mac.c