From d3bc56a0d192320f0c7ae53d2e659899fdbb3962 Mon Sep 17 00:00:00 2001 From: Steven Cahail Date: Fri, 11 Dec 2015 18:58:42 -0700 Subject: trace: ipc_logging: Destroy debugfs directories with logging contexts IPC Logging currently creates debugfs directories for each of its logging contexts, but does not remove them when destroying the contexts. If a user attempts to access a directory associated with a destroyed context, a crash will result. Destroy debugfs directories when the logging context is destroyed. Change-Id: I5a3b1cbf2fb5d9d0ede3d9da0fccd605b9fdf619 Signed-off-by: Steven Cahail --- kernel/trace/ipc_logging.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kernel') diff --git a/kernel/trace/ipc_logging.c b/kernel/trace/ipc_logging.c index 4c84e5b2669e..2c3e0998d400 100644 --- a/kernel/trace/ipc_logging.c +++ b/kernel/trace/ipc_logging.c @@ -857,6 +857,8 @@ int ipc_log_context_destroy(void *ctxt) list_del(&ilctxt->list); write_unlock_irqrestore(&context_list_lock_lha1, flags); + debugfs_remove_recursive(ilctxt->dent); + kfree(ilctxt); return 0; } -- cgit v1.2.3