Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;