qcacmn: Changes assert level and add log if peer entry already present
Currently in dp_peer_find_id_to_obj_add while adding peer to soc peer_id_to_obj_map list, if peer entry is already present for the peer_id due to no umap event for older peer, driver calls QDF_ASSERT and returns, As QDF_ASSERT is NOP it results in older entry still present in the table. which results in peer leak issue as while doing peer unamp driver gets peer from soc peer_id_to_obj_map table based on peer id, Since older entry is still there older peer will be freed and new peer unamp will not happen. To fix the issue call qdf_assert_always if peer entry is already present for peer id which will always assert and add additional logs to print peer information. Change-Id: Ic777e9c7881fcbc67f54002bd619a8e6d52de126 CRs-Fixed: 3369736
This commit is contained in:

committed by
Madan Koyyalamudi

parent
f5aa4b6700
commit
851e62a653
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -810,8 +810,11 @@ void dp_peer_find_id_to_obj_add(struct dp_soc *soc,
|
||||
/* Peer map event came for peer_id which
|
||||
* is already mapped, this is not expected
|
||||
*/
|
||||
dp_err("peer %pK(" QDF_MAC_ADDR_FMT ")map failed, id %d mapped to peer %pK",
|
||||
peer, QDF_MAC_ADDR_REF(peer->mac_addr.raw), peer_id,
|
||||
soc->peer_id_to_obj_map[peer_id]);
|
||||
dp_peer_unref_delete(peer, DP_MOD_ID_CONFIG);
|
||||
QDF_ASSERT(0);
|
||||
qdf_assert_always(0);
|
||||
}
|
||||
qdf_spin_unlock_bh(&soc->peer_map_lock);
|
||||
}
|
||||
|
Reference in New Issue
Block a user