|
@@ -1200,13 +1200,17 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask,
|
|
static inline int audit_expand(struct audit_buffer *ab, int extra)
|
|
static inline int audit_expand(struct audit_buffer *ab, int extra)
|
|
{
|
|
{
|
|
struct sk_buff *skb = ab->skb;
|
|
struct sk_buff *skb = ab->skb;
|
|
- int ret = pskb_expand_head(skb, skb_headroom(skb), extra,
|
|
|
|
- ab->gfp_mask);
|
|
|
|
|
|
+ int oldtail = skb_tailroom(skb);
|
|
|
|
+ int ret = pskb_expand_head(skb, 0, extra, ab->gfp_mask);
|
|
|
|
+ int newtail = skb_tailroom(skb);
|
|
|
|
+
|
|
if (ret < 0) {
|
|
if (ret < 0) {
|
|
audit_log_lost("out of memory in audit_expand");
|
|
audit_log_lost("out of memory in audit_expand");
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
- return skb_tailroom(skb);
|
|
|
|
|
|
+
|
|
|
|
+ skb->truesize += newtail - oldtail;
|
|
|
|
+ return newtail;
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|