qcacmn: Delete the nbuf debug entries of frag_list in qdf_nbuf_free_debug
When a jumbo packet connected using fragmented list is freed, kernel frees the nbufs of the frag_list as well. In qdf_nbuf_free_debug, we currently delete the nbuf debug entry of the head nbuf only, resulting in false alarm of nbuf leaks of the frag_list. Fix this by deleting the nbuf debug entries of all nbufs of frag_list. Change-Id: I2d44c9c87ef8e65f9329ac62fad44089d2c76240 CRs-Fixed: 2498317
Этот коммит содержится в:

коммит произвёл
nshrivas

родитель
1c69ca1112
Коммит
98a8ffa8ad
@@ -2592,6 +2592,8 @@ qdf_export_symbol(qdf_nbuf_alloc_debug);
|
||||
|
||||
void qdf_nbuf_free_debug(qdf_nbuf_t nbuf, const char *func, uint32_t line)
|
||||
{
|
||||
qdf_nbuf_t ext_list;
|
||||
|
||||
if (qdf_unlikely(!nbuf))
|
||||
return;
|
||||
|
||||
@@ -2603,6 +2605,17 @@ void qdf_nbuf_free_debug(qdf_nbuf_t nbuf, const char *func, uint32_t line)
|
||||
qdf_net_buf_debug_delete_node(nbuf);
|
||||
qdf_nbuf_history_add(nbuf, func, line, QDF_NBUF_FREE);
|
||||
|
||||
/* Take care to delete the debug entries for frag_list */
|
||||
ext_list = qdf_nbuf_get_ext_list(nbuf);
|
||||
while (ext_list) {
|
||||
if (qdf_nbuf_get_users(ext_list) == 1) {
|
||||
qdf_nbuf_panic_on_free_if_mapped(ext_list, func, line);
|
||||
qdf_net_buf_debug_delete_node(ext_list);
|
||||
}
|
||||
|
||||
ext_list = qdf_nbuf_queue_next(ext_list);
|
||||
}
|
||||
|
||||
free_buf:
|
||||
__qdf_nbuf_free(nbuf);
|
||||
}
|
||||
|
Ссылка в новой задаче
Block a user