From: Wang Long <long.wanglong@huawei.com>
To: <ananth@in.ibm.com>, <anil.s.keshavamurthy@intel.com>,
<davem@davemloft.net>, <masami.hiramatsu.pt@hitachi.com>
Cc: <linux-kernel@vger.kernel.org>, <wanglong@laoqinren.net>,
<peifeiyue@huawei.com>, <long.wanglong@huawei.com>
Subject: [PATCH] kprobes: Use debugfs_remove_recursive instead debugfs_remove
Date: Thu, 16 Jul 2015 02:16:42 +0000 [thread overview]
Message-ID: <1437013002-104925-1-git-send-email-long.wanglong@huawei.com> (raw)
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
next reply other threads:[~2015-07-16 2:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 2:16 Wang Long [this message]
2015-07-16 6:15 ` Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1437013002-104925-1-git-send-email-long.wanglong@huawei.com \
--to=long.wanglong@huawei.com \
--cc=ananth@in.ibm.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=peifeiyue@huawei.com \
--cc=wanglong@laoqinren.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®