netdev
[Top] [All Lists]

Re: [PATCH] NETLINK: Use SKB_MAXORDER to calculate NLMSG_GOODSIZE

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] NETLINK: Use SKB_MAXORDER to calculate NLMSG_GOODSIZE
From: Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>
Date: Sat, 29 Jan 2005 02:48:28 +0300
Cc: Thomas Graf <tgraf@xxxxxxx>, davem@xxxxxxxxxxxxx, kuznet@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ms2.inr.ac.ru; b=QHPll+5qt6wioK4QRwho4vSjmdmLscMoQxba/ycrYB/lEpQWzqiE8rFwJ22nyvmFHg4B+lMUQzSaF1b7/M4FLtBfMiDxO2h3fBaNGWEKk4pU4cax3rY+ASJyUfcEzcnrgYz3tWZLqHLwis1FjiKa0RUUUSC8CWdtp73aSwbuDQ8=;
In-reply-to: <E1CufRB-0000zf-00@xxxxxxxxxxxxxxxxxxxxxxxx>
References: <20050128230327.GV31837@xxxxxxxxxxxxxx> <E1CufRB-0000zf-00@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6i
Hello!

> > -#define NLMSG_GOODSIZE (PAGE_SIZE - ((sizeof(struct sk_buff)+0xF)&~0xF))


... which reminded me about an old stale patchlet:


Comment: improper size calculation for collapsed skb size.
         Noticed by Denis V. Lunev <den@xxxxxxxxxxx>

===== net/ipv4/tcp_input.c 1.89 vs edited =====
--- 1.89/net/ipv4/tcp_input.c   Tue Jan 18 01:09:33 2005
+++ edited/net/ipv4/tcp_input.c Thu Jan 27 19:41:07 2005
@@ -3760,8 +3760,8 @@
        while (before(start, end)) {
                struct sk_buff *nskb;
                int header = skb_headroom(skb);
-               int copy = (PAGE_SIZE - sizeof(struct sk_buff) -
-                           sizeof(struct skb_shared_info) - header - 31)&~15;
+               int copy = (PAGE_SIZE - sizeof(struct skb_shared_info)
+                           - header - 31)&~15;
 
                /* Too big header? This can happen with IPv6. */
                if (copy < 0)



<Prev in Thread] Current Thread [Next in Thread>