Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1736613
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] debugfs: Add check for module parameter name |
| Date | 2017-09-21 14:20 +0200 |
| Message-ID | <us8Cu-Sx-9@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Here, start_creating() is calling by debugfs_create_dir() and debugfs_create_automount(). driver can pass name as NULL in debugfs_create_dir and debugfs_create_automount. So we need to add check for 'name'. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> --- fs/debugfs/inode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index c59f015..aa5988d 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -292,6 +292,9 @@ static struct dentry *start_creating(const char *name, struct dentry *parent) if (IS_ERR(parent)) return parent; + if (!name) + return ERR_PTR(-ENOMEM); + error = simple_pin_fs(&debug_fs_type, &debugfs_mount, &debugfs_mount_count); if (error) -- 1.9.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] debugfs: Add check for module parameter name Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-09-21 14:20 +0200
Re: [PATCH] debugfs: Add check for module parameter name Al Viro <viro@ZenIV.linux.org.uk> - 2017-09-21 14:50 +0200
Re: [PATCH] debugfs: Add check for module parameter name arvind <arvind.yadav.cs@gmail.com> - 2017-09-21 18:50 +0200
Re: [PATCH] debugfs: Add check for module parameter name Al Viro <viro@ZenIV.linux.org.uk> - 2017-09-21 19:30 +0200
csiph-web