Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932461AbbGPCRq (ORCPT ); Wed, 15 Jul 2015 22:17:46 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:30420 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755565AbbGPCRO (ORCPT ); Wed, 15 Jul 2015 22:17:14 -0400 From: Wang Long To: , , , CC: , , , Subject: [PATCH] kprobes: Use debugfs_remove_recursive instead debugfs_remove Date: Thu, 16 Jul 2015 02:16:42 +0000 Message-ID: <1437013002-104925-1-git-send-email-long.wanglong@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.197.200] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 962 Lines: 32 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/