projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33d930e
)
ovl: add NULL check in ovl_alloc_inode
author
Hirofumi Nakagawa
<nklabs@gmail.com>
Mon, 25 Sep 2017 18:09:53 +0000
(
03:09
+0900)
committer
Miklos Szeredi
<mszeredi@redhat.com>
Thu, 19 Oct 2017 14:19:51 +0000
(16:19 +0200)
This was detected by fault injection test
Signed-off-by: Hirofumi Nakagawa <nklabs@gmail.com>
Fixes:
13cf199d0088
("ovl: allocate an ovl_inode struct")
Cc: <stable@vger.kernel.org> # v4.13
fs/overlayfs/super.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/overlayfs/super.c
b/fs/overlayfs/super.c
index 092d150643c12061407be0ecab554a38fe88d9fc..f5738e96a052fe06c892923b69cd4708d8b24f70 100644
(file)
--- a/
fs/overlayfs/super.c
+++ b/
fs/overlayfs/super.c
@@
-174,6
+174,9
@@
static struct inode *ovl_alloc_inode(struct super_block *sb)
{
struct ovl_inode *oi = kmem_cache_alloc(ovl_inode_cachep, GFP_KERNEL);
+ if (!oi)
+ return NULL;
+
oi->cache = NULL;
oi->redirect = NULL;
oi->version = 0;