debugfs: purge obsolete SRCU based removal protection
Purge the SRCU based file removal race protection in favour of the new,
refcount based debugfs_file_get()/debugfs_file_put() API.
Fixes: 49d200deaa
("debugfs: prevent access to removed files' private data")
Signed-off-by: Nicolai Stange <nicstange@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
7cda7b8f97
commit
c9afbec270
@@ -23,7 +23,6 @@
|
||||
|
||||
struct device;
|
||||
struct file_operations;
|
||||
struct srcu_struct;
|
||||
|
||||
struct debugfs_blob_wrapper {
|
||||
void *data;
|
||||
@@ -43,8 +42,6 @@ struct debugfs_regset32 {
|
||||
|
||||
extern struct dentry *arch_debugfs_dir;
|
||||
|
||||
extern struct srcu_struct debugfs_srcu;
|
||||
|
||||
#define DEFINE_DEBUGFS_ATTRIBUTE(__fops, __get, __set, __fmt) \
|
||||
static int __fops ## _open(struct inode *inode, struct file *file) \
|
||||
{ \
|
||||
@@ -90,11 +87,6 @@ struct dentry *debugfs_create_automount(const char *name,
|
||||
void debugfs_remove(struct dentry *dentry);
|
||||
void debugfs_remove_recursive(struct dentry *dentry);
|
||||
|
||||
int debugfs_use_file_start(const struct dentry *dentry, int *srcu_idx)
|
||||
__acquires(&debugfs_srcu);
|
||||
|
||||
void debugfs_use_file_finish(int srcu_idx) __releases(&debugfs_srcu);
|
||||
|
||||
const struct file_operations *debugfs_real_fops(const struct file *filp);
|
||||
|
||||
int debugfs_file_get(struct dentry *dentry);
|
||||
@@ -227,17 +219,6 @@ static inline void debugfs_remove(struct dentry *dentry)
|
||||
static inline void debugfs_remove_recursive(struct dentry *dentry)
|
||||
{ }
|
||||
|
||||
static inline int debugfs_use_file_start(const struct dentry *dentry,
|
||||
int *srcu_idx)
|
||||
__acquires(&debugfs_srcu)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void debugfs_use_file_finish(int srcu_idx)
|
||||
__releases(&debugfs_srcu)
|
||||
{ }
|
||||
|
||||
static inline int debugfs_file_get(struct dentry *dentry)
|
||||
{
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user