summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorMimi Zohar <zohar@linux.vnet.ibm.com>2018-01-23 10:00:41 -0500
committerJames Morris <jmorris@namei.org>2018-02-02 21:03:08 +1100
commite2598077dc6a26c9644393e5c21f22a90dbdccdb (patch)
treee84d4c3eff64cff1b940bab29bd85f57467725d0 /security
parent7825cd83fad7a30328bc874062eb19bdb2fbb38b (diff)
downloadlinux-stable-e2598077dc6a26c9644393e5c21f22a90dbdccdb.tar.gz
linux-stable-e2598077dc6a26c9644393e5c21f22a90dbdccdb.tar.bz2
linux-stable-e2598077dc6a26c9644393e5c21f22a90dbdccdb.zip
ima: re-initialize iint->atomic_flags
Intermittently security.ima is not being written for new files. This patch re-initializes the new slab iint->atomic_flags field before freeing it. Fixes: commit 0d73a55208e9 ("ima: re-introduce own integrity cache lock") Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r--security/integrity/iint.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/security/integrity/iint.c b/security/integrity/iint.c
index fc38ca08dbb5..9700e96ab0f0 100644
--- a/security/integrity/iint.c
+++ b/security/integrity/iint.c
@@ -74,6 +74,7 @@ static void iint_free(struct integrity_iint_cache *iint)
iint->ima_hash = NULL;
iint->version = 0;
iint->flags = 0UL;
+ iint->atomic_flags = 0UL;
iint->ima_file_status = INTEGRITY_UNKNOWN;
iint->ima_mmap_status = INTEGRITY_UNKNOWN;
iint->ima_bprm_status = INTEGRITY_UNKNOWN;