aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/audit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/audit.c')
-rw-r--r--kernel/audit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index 76c9a11b72d6..ea8521417d13 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1073,7 +1073,7 @@ static void audit_log_vformat(struct audit_buffer *ab, const char *fmt,
1073 goto out; 1073 goto out;
1074 } 1074 }
1075 va_copy(args2, args); 1075 va_copy(args2, args);
1076 len = vsnprintf(skb->tail, avail, fmt, args); 1076 len = vsnprintf(skb_tail_pointer(skb), avail, fmt, args);
1077 if (len >= avail) { 1077 if (len >= avail) {
1078 /* The printk buffer is 1024 bytes long, so if we get 1078 /* The printk buffer is 1024 bytes long, so if we get
1079 * here and AUDIT_BUFSIZ is at least 1024, then we can 1079 * here and AUDIT_BUFSIZ is at least 1024, then we can
@@ -1082,7 +1082,7 @@ static void audit_log_vformat(struct audit_buffer *ab, const char *fmt,
1082 max_t(unsigned, AUDIT_BUFSIZ, 1+len-avail)); 1082 max_t(unsigned, AUDIT_BUFSIZ, 1+len-avail));
1083 if (!avail) 1083 if (!avail)
1084 goto out; 1084 goto out;
1085 len = vsnprintf(skb->tail, avail, fmt, args2); 1085 len = vsnprintf(skb_tail_pointer(skb), avail, fmt, args2);
1086 } 1086 }
1087 if (len > 0) 1087 if (len > 0)
1088 skb_put(skb, len); 1088 skb_put(skb, len);
@@ -1143,7 +1143,7 @@ void audit_log_hex(struct audit_buffer *ab, const unsigned char *buf,
1143 return; 1143 return;
1144 } 1144 }
1145 1145
1146 ptr = skb->tail; 1146 ptr = skb_tail_pointer(skb);
1147 for (i=0; i<len; i++) { 1147 for (i=0; i<len; i++) {
1148 *ptr++ = hex[(buf[i] & 0xF0)>>4]; /* Upper nibble */ 1148 *ptr++ = hex[(buf[i] & 0xF0)>>4]; /* Upper nibble */
1149 *ptr++ = hex[buf[i] & 0x0F]; /* Lower nibble */ 1149 *ptr++ = hex[buf[i] & 0x0F]; /* Lower nibble */
@@ -1175,7 +1175,7 @@ static void audit_log_n_string(struct audit_buffer *ab, size_t slen,
1175 if (!avail) 1175 if (!avail)
1176 return; 1176 return;
1177 } 1177 }
1178 ptr = skb->tail; 1178 ptr = skb_tail_pointer(skb);
1179 *ptr++ = '"'; 1179 *ptr++ = '"';
1180 memcpy(ptr, string, slen); 1180 memcpy(ptr, string, slen);
1181 ptr += slen; 1181 ptr += slen;