FROMLIST: ath10k: fix use-after-free in ath10k_wmi_cmd_send_nowait

The skb may be freed in tx completion context before
trace_ath10k_wmi_cmd is called. This can be easily captured when
KASAN(Kernel Address Sanitizer) is enabled. The fix is to move
trace_ath10k_wmi_cmd before the send operation. As the ret has no
meaning in trace_ath10k_wmi_cmd then, so remove this parameter too.

(from https://patchwork.kernel.org/patch/10258181/)

BUG=b:71685298
TEST=Enable KASAN kernel config and connect the device to AP

Change-Id: I08f95e4775cb85e2d64d668c501d87c7aeca72cb
Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/948070
Commit-Ready: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
(cherry picked from commit 42461db250edbe8053fa0dccf0455d37b1c7a022)
Reviewed-on: https://chromium-review.googlesource.com/958243
Trybot-Ready: Brian Norris <briannorris@chromium.org>
Commit-Queue: Brian Norris <briannorris@chromium.org>
2 files changed