lkml.org 
[lkml]   [2019]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH V2 0/3] fix potential infinite loop in debugfs_remove_recursive
Date
The main purpose of this patchset is to fix potential infinite loop in
debugfs_remove_recursive. Al Viro want to refactor it
(https://lore.kernel.org/lkml/20191115184209.GT26530@ZenIV.linux.org.uk/).
I can't really tell if it's better. Since debugfs_remove_recursive is
still using 'simple_empty', whitch is wrong, I'm sending this patchset
just in case.

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'.

changes in V2:
rename the new enum type in the first patch, add some comments.


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 | 11 ++++++++++-
3 files changed, 17 insertions(+), 5 deletions(-)

--
2.17.2

\
 
 \ /
  Last update: 2019-11-30 02:42    [W:0.046 / U:2.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site