提交 b3885bd6 编写于 作者: H Hirofumi Nakagawa 提交者: Miklos Szeredi

ovl: add NULL check in ovl_alloc_inode

This was detected by fault injection test
Signed-off-by: NHirofumi Nakagawa <nklabs@gmail.com>
Fixes: 13cf199d ("ovl: allocate an ovl_inode struct")
Cc: <stable@vger.kernel.org> # v4.13
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册