From patchwork Fri Nov 15 03:27:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Kuai X-Patchwork-Id: 11244741 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F1A011393 for ; Fri, 15 Nov 2019 03:20:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DA99E206F4 for ; Fri, 15 Nov 2019 03:20:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727314AbfKODUw (ORCPT ); Thu, 14 Nov 2019 22:20:52 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:6672 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727187AbfKODUl (ORCPT ); Thu, 14 Nov 2019 22:20:41 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 251A92404E01104A0712; Fri, 15 Nov 2019 11:20:38 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Fri, 15 Nov 2019 11:20:28 +0800 From: yu kuai To: , , , , , , , , CC: , , , , , , Subject: [PATCH 0/3] fix potential infinite loop in debugfs_remove_recursive Date: Fri, 15 Nov 2019 11:27:49 +0800 Message-ID: <1573788472-87426-1-git-send-email-yukuai3@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org The first patch add a new enum type for 'dentry_d_lock_class'.The second patch use the new enum type in 'simple_empty' to avoid confusion for lockdep. The last patch fix potential infinite loop in debugfs_remove_recursive by using 'simple_empty' instead of 'list_empty'. yu kuai (3): dcache: add a new enum type for 'dentry_d_lock_class' fs/libfs.c: use 'spin_lock_nested' when taking 'd_lock' for dentry in simple_empty debugfs: fix potential infinite loop in debugfs_remove_recursive fs/debugfs/inode.c | 7 +++++-- fs/libfs.c | 4 ++-- include/linux/dcache.h | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-)