aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/audit.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index f93c2713017d..801c946dd24b 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1200,13 +1200,17 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask,
1200static inline int audit_expand(struct audit_buffer *ab, int extra) 1200static inline int audit_expand(struct audit_buffer *ab, int extra)
1201{ 1201{
1202 struct sk_buff *skb = ab->skb; 1202 struct sk_buff *skb = ab->skb;
1203 int ret = pskb_expand_head(skb, skb_headroom(skb), extra, 1203 int oldtail = skb_tailroom(skb);
1204 ab->gfp_mask); 1204 int ret = pskb_expand_head(skb, 0, extra, ab->gfp_mask);
1205 int newtail = skb_tailroom(skb);
1206
1205 if (ret < 0) { 1207 if (ret < 0) {
1206 audit_log_lost("out of memory in audit_expand"); 1208 audit_log_lost("out of memory in audit_expand");
1207 return 0; 1209 return 0;
1208 } 1210 }
1209 return skb_tailroom(skb); 1211
1212 skb->truesize += newtail - oldtail;
1213 return newtail;
1210} 1214}
1211 1215
1212/* 1216/*