* [PATCH] kprobes: Use debugfs_remove_recursive instead debugfs_remove
@ 2015-07-16 2:16 Wang Long
2015-07-16 6:15 ` Masami Hiramatsu
0 siblings, 1 reply; 2+ messages in thread
From: Wang Long @ 2015-07-16 2:16 UTC (permalink / raw)
To: ananth, anil.s.keshavamurthy, davem, masami.hiramatsu.pt
Cc: linux-kernel, wanglong, peifeiyue, long.wanglong
In debugfs_kprobe_init, we create a directory 'kprobes' and three
files 'list', 'enabled' and 'blacklist'. When any one of the three
files creation fails, we should remove all of them. But debugfs_remove
function can not complete this work. So use debugfs_remove_recursive
instead.
Signed-off-by: Wang Long <long.wanglong@huawei.com>
---
kernel/kprobes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index c90e417..8cd82a5 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -2459,7 +2459,7 @@ static int __init debugfs_kprobe_init(void)
return 0;
error:
- debugfs_remove(dir);
+ debugfs_remove_recursive(dir);
return -ENOMEM;
}
--
1.8.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kprobes: Use debugfs_remove_recursive instead debugfs_remove
2015-07-16 2:16 [PATCH] kprobes: Use debugfs_remove_recursive instead debugfs_remove Wang Long
@ 2015-07-16 6:15 ` Masami Hiramatsu
0 siblings, 0 replies; 2+ messages in thread
From: Masami Hiramatsu @ 2015-07-16 6:15 UTC (permalink / raw)
To: Wang Long, ananth, anil.s.keshavamurthy, davem
Cc: linux-kernel, wanglong, peifeiyue
On 2015/07/16 11:16, Wang Long wrote:
> In debugfs_kprobe_init, we create a directory 'kprobes' and three
> files 'list', 'enabled' and 'blacklist'. When any one of the three
> files creation fails, we should remove all of them. But debugfs_remove
> function can not complete this work. So use debugfs_remove_recursive
> instead.
>
OK, it should be fixed.
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Thank you!
> Signed-off-by: Wang Long <long.wanglong@huawei.com>
> ---
> kernel/kprobes.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index c90e417..8cd82a5 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -2459,7 +2459,7 @@ static int __init debugfs_kprobe_init(void)
> return 0;
>
> error:
> - debugfs_remove(dir);
> + debugfs_remove_recursive(dir);
> return -ENOMEM;
> }
>
>
--
Masami HIRAMATSU
Linux Technology Research Center, System Productivity Research Dept.
Center for Technology Innovation - Systems Engineering
Hitachi, Ltd., Research & Development Group
E-mail: masami.hiramatsu.pt@hitachi.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-16 6:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-16 2:16 [PATCH] kprobes: Use debugfs_remove_recursive instead debugfs_remove Wang Long
2015-07-16 6:15 ` Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox