Commit b3885bd6 authored by Hirofumi Nakagawa's avatar Hirofumi Nakagawa Committed by Miklos Szeredi

ovl: add NULL check in ovl_alloc_inode

This was detected by fault injection test
Signed-off-by: default avatarHirofumi Nakagawa <nklabs@gmail.com>
Fixes: 13cf199d ("ovl: allocate an ovl_inode struct")
Cc: <stable@vger.kernel.org> # v4.13
parent 33d930e5
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment