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.


TEST=Enable KASAN kernel config and connect the device to AP

Change-Id: I08f95e4775cb85e2d64d668c501d87c7aeca72cb
Signed-off-by: Carl Huang <>
Commit-Ready: Brian Norris <>
Tested-by: Brian Norris <>
Reviewed-by: Grant Grundler <>
Reviewed-by: Brian Norris <>
(cherry picked from commit 42461db250edbe8053fa0dccf0455d37b1c7a022)
Trybot-Ready: Brian Norris <>
Commit-Queue: Brian Norris <>
2 files changed