[PATCH 20/21] dynamic_debug: clear pending_queries list in remove_all_tables

From: Jim Cromie
Date: Mon Jul 11 2011 - 03:48:14 EST



Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx>
---
lib/dynamic_debug.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 9514071..f0c2b39 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -1017,6 +1017,8 @@ EXPORT_SYMBOL_GPL(ddebug_remove_module);

static void ddebug_remove_all_tables(void)
{
+ struct pending_query *pq, *pqnext;
+
mutex_lock(&ddebug_lock);
while (!list_empty(&ddebug_tables)) {
struct ddebug_table *dt = list_entry(ddebug_tables.next,
@@ -1024,6 +1026,13 @@ static void ddebug_remove_all_tables(void)
link);
ddebug_table_free(dt);
}
+ list_for_each_entry_safe(pq, pqnext, &pending_queries, link) {
+ if (verbose > 1)
+ pr_info("delete pending: %s\n",
+ show_pending_query(pq));
+ list_del_init(&pq->link);
+ kfree(pq);
+ }
mutex_unlock(&ddebug_lock);
}

--
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/