All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hideo AOKI <haoki@redhat.com>
To: netdev <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Herbert Xu <herbert@gondor.apana.org.au>
Subject: [RFC PATCH] [NET] [1/2] revert audit_expand()
Date: Tue, 25 Mar 2008 14:41:40 -0400	[thread overview]
Message-ID: <47E94764.6050901@redhat.com> (raw)
In-Reply-To: <47E946C8.6020006@redhat.com>

This patch reverts commit 406a1d868001423c85a3165288e566e65f424fe6
to apply bug fix of the root cause to kernel.

I leave the fix of pskb_expand_head() call in the commit. Changing
2nd argument from skb_headroom(skb) to 0 is correct, because
audit_expand() should expand only tail room as its definition.

Signed-off-by: Hideo Aoki <haoki@redhat.com>
---

 audit.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff -pruN net-2.6/kernel/audit.c net-2.6-mod-p1/kernel/audit.c
--- net-2.6/kernel/audit.c	2008-03-24 09:58:26.000000000 -0400
+++ net-2.6-mod-p1/kernel/audit.c	2008-03-24 14:22:18.000000000 -0400
@@ -1117,17 +1117,13 @@ struct audit_buffer *audit_log_start(str
 static inline int audit_expand(struct audit_buffer *ab, int extra)
 {
 	struct sk_buff *skb = ab->skb;
-	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;
 	}
-
-	skb->truesize += newtail - oldtail;
-	return newtail;
+	return skb_tailroom(skb);
 }
 
 /*
-- 
Hitachi Computer Products (America) Inc.



  reply	other threads:[~2008-03-25 18:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-25 18:39 [RFC] [NET] [0/2] pskb_expand_head() bugfix Hideo AOKI
2008-03-25 18:41 ` Hideo AOKI [this message]
2008-03-25 18:41 ` [RFC PATCH] [NET] [2/2] pskb_expand_head() updates truesize Hideo AOKI
2008-03-25 23:55 ` [RFC] [NET] [0/2] pskb_expand_head() bugfix Herbert Xu
2008-03-26 20:47   ` Hideo AOKI
2008-03-27  0:13     ` Herbert Xu
2008-03-29  1:01       ` Hideo AOKI
2008-03-27 23:49     ` David Miller
2008-03-29  1:14       ` Hideo AOKI
2008-03-27 23:48 ` David Miller
2008-03-29  1:02   ` Hideo AOKI
2008-03-29  1:11     ` David Miller
2008-03-29  1:21       ` Hideo AOKI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47E94764.6050901@redhat.com \
    --to=haoki@redhat.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.