From 3bb027009bcd193e1f5f0e5ba723d5a9d1c768ab Mon Sep 17 00:00:00 2001 From: Arun Kumar Khandavalli Date: Thu, 20 Jul 2023 11:07:28 +0530 Subject: [PATCH] qcacld-3.0: Dont allocate reply skb without getting the request On LL_STATS debugfs request from the userspace driver is allocating a reply vendor skb and trying to send the vendor command response to userspace, resulting in kernel warning and rejecting the allocation. Don't send the response to userspace if the command request is received for debugfs. Change-Id: I9e4374a39785883ed9092a2e7a956e8d8da2a22b CRs-Fixed: 3555919 --- core/hdd/src/wlan_hdd_stats.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index e7b97e9706..0b097f259d 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -3173,9 +3173,13 @@ static int wlan_hdd_send_ll_stats_req(struct wlan_hdd_link_info *link_info, qdf_spin_unlock(&priv->ll_stats_lock); } qdf_list_destroy(&priv->ll_stats_q); - wlan_hdd_send_mlo_ll_iface_stats(adapter); - wlan_hdd_send_mlo_ll_peer_stats(hdd_ctx, + + if (req->reqId != DEBUGFS_LLSTATS_REQID) { + wlan_hdd_send_mlo_ll_iface_stats(adapter); + wlan_hdd_send_mlo_ll_peer_stats(hdd_ctx, (struct wifi_peer_stat *)mlo_stats); + } + qdf_mem_free(mlo_stats); exit: qdf_atomic_set(&adapter->is_ll_stats_req_pending, 0);