Kaynağa Gözat

qcacld-3.0: Release peer refs during pdev detach

Historically, OL peers were forcibly destroyed during pdev detach. This
logic was mistakenly removed as part of another change. This led to peer
leaks during Sub-System Restart (SSR). Restore the peer delete logic to
close peer leaks during SSR.

Change-Id: I72d980750a2f97e6717f720a63f4a651f7615aee
CRs-Fixed: 2167237
Dustin Brown 7 yıl önce
ebeveyn
işleme
763f3963a1

+ 5 - 1
core/dp/txrx/ol_txrx_peer_find.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -303,6 +303,10 @@ void ol_txrx_peer_find_hash_erase(struct ol_txrx_pdev_t *pdev)
 				 * ol_txrx_peer_release_ref.
 				 */
 				qdf_atomic_init(&peer->ref_cnt); /* set to 0 */
+				ol_txrx_peer_get_ref(peer,
+						     PEER_DEBUG_ID_OL_INTERNAL);
+				ol_txrx_peer_release_ref(peer,
+						     PEER_DEBUG_ID_OL_INTERNAL);
 			}
 		}
 	}

+ 3 - 2
core/dp/txrx/ol_txrx_peer_find.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011, 2015-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -42,7 +42,8 @@
  * @dbg_id: debug id to keep track of peer references
  *
  * The function increments the peer ref count. The ref count can be reduced by
- * caling ol_txrx_peer_release_ref function.
+ * caling ol_txrx_peer_release_ref function. Callers are responsible for
+ * acquiring the peer_ref_mutex lock when needed.
  *
  * Return: peer debug id ref count or error
  */