[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171031095531.176386717@linuxfoundation.org>
Date: Tue, 31 Oct 2017 10:55:36 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Hirofumi Nakagawa <nklabs@...il.com>
Subject: [PATCH 4.13 16/43] ovl: add NULL check in ovl_alloc_inode
4.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hirofumi Nakagawa <nklabs@...il.com>
commit b3885bd6edb41b91a0e3976469f72ae31bfb8d95 upstream.
This was detected by fault injection test
Signed-off-by: Hirofumi Nakagawa <nklabs@...il.com>
Fixes: 13cf199d0088 ("ovl: allocate an ovl_inode struct")
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
fs/overlayfs/super.c | 3 +++
1 file changed, 3 insertions(+)
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -174,6 +174,9 @@ static struct inode *ovl_alloc_inode(str
{
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;
Powered by blists - more mailing lists