Re: [PATCH] kprobes: Use debugfs_remove_recursive instead debugfs_remove
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 Thank you! > Signed-off-by: Wang Long > --- > 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...@hitachi.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] kprobes: Use debugfs_remove_recursive instead debugfs_remove
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...@hitachi.com Thank you! Signed-off-by: Wang Long long.wangl...@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...@hitachi.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] kprobes: Use debugfs_remove_recursive instead debugfs_remove
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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] kprobes: Use debugfs_remove_recursive instead debugfs_remove
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.wangl...@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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/