]> git.pld-linux.org Git - packages/kernel.git/blob - ovl09-overlayfs-fix-possible-leak-in-ovl_new_inode.patch
- describe vserver fix and feat patches
[packages/kernel.git] / ovl09-overlayfs-fix-possible-leak-in-ovl_new_inode.patch
1 From 4bda74a61de9494ec76a7d5bf6f491a8284680d8 Mon Sep 17 00:00:00 2001
2 From: Robin Dong <hao.bigrat@gmail.com>
3 Date: Mon, 12 Mar 2012 13:44:58 +0800
4 Subject: [PATCH 09/13] overlayfs: fix possible leak in ovl_new_inode
5 Patch-mainline: not yet
6
7 After allocating a new inode, if the mode of inode is incorrect, we should
8 release it by iput().
9
10 Signed-off-by: Robin Dong <sanbai@taobao.com>
11 Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
12 ---
13  fs/overlayfs/inode.c |    1 +
14  1 file changed, 1 insertion(+)
15
16 Index: linux-3.6-rc7-master/fs/overlayfs/inode.c
17 ===================================================================
18 --- linux-3.6-rc7-master.orig/fs/overlayfs/inode.c      2012-09-28 13:36:53.000000000 +0200
19 +++ linux-3.6-rc7-master/fs/overlayfs/inode.c   2012-09-28 13:37:02.000000000 +0200
20 @@ -371,6 +371,7 @@ struct inode *ovl_new_inode(struct super
21  
22         default:
23                 WARN(1, "illegal file type: %i\n", mode);
24 +               iput(inode);
25                 inode = NULL;
26         }
27  
This page took 0.592466 seconds and 3 git commands to generate.