summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2014-10-16 12:04:18 +0200
committerJames Morris <james.l.morris@oracle.com>2014-10-16 12:04:18 +0200
commit9b32011acdc4428474b7cba865f713a11b9b9bd3 (patch)
treed781cae7fd53a4f19d0d64503ae605dd01855613
parentMerge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/... (diff)
parentselinux: fix inode security list corruption (diff)
downloadlinux-9b32011acdc4428474b7cba865f713a11b9b9bd3.tar.xz
linux-9b32011acdc4428474b7cba865f713a11b9b9bd3.zip
Merge branch 'stable-3.18' of git://git.infradead.org/users/pcmoore/selinux into for-linus2
-rw-r--r--security/selinux/hooks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 8426a2aa8dce..e66314138b38 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -481,6 +481,7 @@ next_inode:
list_entry(sbsec->isec_head.next,
struct inode_security_struct, list);
struct inode *inode = isec->inode;
+ list_del_init(&isec->list);
spin_unlock(&sbsec->isec_lock);
inode = igrab(inode);
if (inode) {
@@ -489,7 +490,6 @@ next_inode:
iput(inode);
}
spin_lock(&sbsec->isec_lock);
- list_del_init(&isec->list);
goto next_inode;
}
spin_unlock(&sbsec->isec_lock);