Переглянути джерело

qcacmn: fix double nbuf allocation false positive

In qdf_nbuf_queue_free API __qdf_nbuf_free API is
called to free the nbuf which is not clearing the debug
node instead call qdf_nbuf_free API to delete the nbuf
debug node and free nbuf

Change-Id: I34f06a440ce7758d4ea02fbd1d696366460aa871
Chaithanya Garrepalli 4 роки тому
батько
коміт
96d7fbafaf
2 змінених файлів з 4 додано та 18 видалено
  1. 4 1
      qdf/inc/qdf_nbuf.h
  2. 0 17
      qdf/linux/src/i_qdf_nbuf.h

+ 4 - 1
qdf/inc/qdf_nbuf.h

@@ -2203,7 +2203,10 @@ qdf_nbuf_queue_append(qdf_nbuf_queue_t *dest, qdf_nbuf_queue_t *src)
 static inline void
 qdf_nbuf_queue_free(qdf_nbuf_queue_t *head)
 {
-	__qdf_nbuf_queue_free(head);
+	qdf_nbuf_t  buf = NULL;
+
+	while ((buf = qdf_nbuf_queue_remove(head)) != NULL)
+		qdf_nbuf_free(buf);
 }
 
 static inline qdf_nbuf_t

+ 0 - 17
qdf/linux/src/i_qdf_nbuf.h

@@ -1736,23 +1736,6 @@ struct sk_buff *__qdf_nbuf_queue_remove(__qdf_nbuf_queue_t *qhead)
 	return tmp;
 }
 
-/**
- * __qdf_nbuf_queue_free() - free a queue
- * @qhead: head of queue
- *
- * Return: QDF status
- */
-static inline QDF_STATUS
-__qdf_nbuf_queue_free(__qdf_nbuf_queue_t *qhead)
-{
-	__qdf_nbuf_t  buf = NULL;
-
-	while ((buf = __qdf_nbuf_queue_remove(qhead)) != NULL)
-		__qdf_nbuf_free(buf);
-	return QDF_STATUS_SUCCESS;
-}
-
-
 /**
  * __qdf_nbuf_queue_first() - returns the first skb in the queue
  * @qhead: head of queue