Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24.6 /kernel/audit.c

Filename:/kernel/audit.c
Lines Added:7
Lines Deleted:3
Also changed in: (Previous) 2.6.24.5  2.6.24.4  2.6.24.3  2.6.24.3-rc1  2.6.24-git22  2.6.24-git21 
(Following) 2.6.24.7  2.6.25-git19  2.6.25-git20  2.6.26-rc1  2.6.26-rc2  2.6.26-rc3 

Location
[  2.6.24.6
  [  kernel
     o  audit.c

Patch

diff --git a/kernel/audit.c b/kernel/audit.c
index f93c271..801c946 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,
 static inline int audit_expand(struct audit_buffer *ab, int extra)
 {
    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) {
       audit_log_lost("out of memory in audit_expand");
       return 0;
    }
-   return skb_tailroom(skb);
+
+   skb->truesize += newtail - oldtail;
+   return newtail;
 }
 
 /*


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.