projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bf1ddf
)
oprofilefs: don't oops on allocation failure
author
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 10 Mar 2018 21:40:33 +0000
(16:40 -0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Thu, 29 Mar 2018 19:07:48 +0000
(15:07 -0400)
... just short-circuit the creation of potential children
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/oprofile/oprofilefs.c
patch
|
blob
|
history
diff --git
a/drivers/oprofile/oprofilefs.c
b/drivers/oprofile/oprofilefs.c
index
d77ebbf
..
4ea0897
100644
(file)
--- a/
drivers/oprofile/oprofilefs.c
+++ b/
drivers/oprofile/oprofilefs.c
@@
-138,6
+138,9
@@
static int __oprofilefs_create_file(struct dentry *root, char const *name,
struct dentry *dentry;
struct inode *inode;
+ if (!root)
+ return -ENOMEM;
+
inode_lock(d_inode(root));
dentry = d_alloc_name(root, name);
if (!dentry) {