lkml.org 
[lkml]   [2020]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 2/3] IMA: Add log statements for failure conditions.
Date
process_buffer_measurement() does not have log messages for failure
conditions.

This change adds a log statement in the above function.

Signed-off-by: Tushar Sugandhi <tusharsu@linux.microsoft.com>
Reviewed-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Suggested-by: Joe Perches <joe@perches.com>
---
security/integrity/ima/ima_main.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index 9fe949c6a530..6e1576d9eb48 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -757,6 +757,9 @@ void process_buffer_measurement(const void *buf, int size,
ima_free_template_entry(entry);

out:
+ if (ret < 0)
+ pr_err("%s: failed, result: %d\n", __func__, ret);
+
return;
}

--
2.17.1
\
 
 \ /
  Last update: 2020-02-12 00:15    [W:0.112 / U:1.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site