ovl: add NULL check in ovl_alloc_inode
This was detected by fault injection test
Signed-off-by: Hirofumi Nakagawa <nklabs@gmail.com>
Fixes: 13cf199d00
("ovl: allocate an ovl_inode struct")
Cc: <stable@vger.kernel.org> # v4.13
This commit is contained in:
parent
33d930e59a
commit
b3885bd6ed
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue