From: Mimi Zohar Date: Tue, 23 Jan 2018 15:00:41 +0000 (-0500) Subject: ima: re-initialize iint->atomic_flags X-Git-Tag: v4.14.85~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d467320fdaf328fd6f98fc686b3a3fdd226dbaef;p=platform%2Fkernel%2Flinux-exynos.git ima: re-initialize iint->atomic_flags commit e2598077dc6a26c9644393e5c21f22a90dbdccdb upstream. 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 Signed-off-by: James Morris Cc: Aditya Kali Signed-off-by: Greg Kroah-Hartman --- diff --git a/security/integrity/iint.c b/security/integrity/iint.c index 2db461c..f4a40fb 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;