aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/auditsc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 67df4ee1d3b6..4baf61d39836 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1001,6 +1001,8 @@ static inline void audit_free_names(struct audit_context *context)
1001 1001
1002#if AUDIT_DEBUG == 2 1002#if AUDIT_DEBUG == 2
1003 if (context->put_count + context->ino_count != context->name_count) { 1003 if (context->put_count + context->ino_count != context->name_count) {
1004 int i = 0;
1005
1004 printk(KERN_ERR "%s:%d(:%d): major=%d in_syscall=%d" 1006 printk(KERN_ERR "%s:%d(:%d): major=%d in_syscall=%d"
1005 " name_count=%d put_count=%d" 1007 " name_count=%d put_count=%d"
1006 " ino_count=%d [NOT freeing]\n", 1008 " ino_count=%d [NOT freeing]\n",
@@ -1009,7 +1011,7 @@ static inline void audit_free_names(struct audit_context *context)
1009 context->name_count, context->put_count, 1011 context->name_count, context->put_count,
1010 context->ino_count); 1012 context->ino_count);
1011 list_for_each_entry(n, &context->names_list, list) { 1013 list_for_each_entry(n, &context->names_list, list) {
1012 printk(KERN_ERR "names[%d] = %p = %s\n", i, 1014 printk(KERN_ERR "names[%d] = %p = %s\n", i++,
1013 n->name, n->name->name ?: "(null)"); 1015 n->name, n->name->name ?: "(null)");
1014 } 1016 }
1015 dump_stack(); 1017 dump_stack();
@@ -2050,10 +2052,10 @@ void audit_putname(struct filename *name)
2050 __FILE__, __LINE__, context->serial, name); 2052 __FILE__, __LINE__, context->serial, name);
2051 if (context->name_count) { 2053 if (context->name_count) {
2052 struct audit_names *n; 2054 struct audit_names *n;
2053 int i; 2055 int i = 0;
2054 2056
2055 list_for_each_entry(n, &context->names_list, list) 2057 list_for_each_entry(n, &context->names_list, list)
2056 printk(KERN_ERR "name[%d] = %p = %s\n", i, 2058 printk(KERN_ERR "name[%d] = %p = %s\n", i++,
2057 n->name, n->name->name ?: "(null)"); 2059 n->name, n->name->name ?: "(null)");
2058 } 2060 }
2059#endif 2061#endif