Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1f9e636ea21bd648a5cbd2f744a1d39a5e183b20
Commit:     1f9e636ea21bd648a5cbd2f744a1d39a5e183b20
Parent:     ea72912c888661d1a847f1b1450643d4114097cf
Author:     Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 11 02:12:04 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 14:57:07 2008 -0800

    [TCP]: Use BUILD_BUG_ON for tcp_skb_cb size checking
    
    The sizeof(struct tcp_skb_cb) should not be less than the
    sizeof(skb->cb). This is checked in net/ipv4/tcp.c, but
    this check can be made more gracefully.
    
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/tcp.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index eb77088..fdaf965 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2563,7 +2563,6 @@ void tcp_done(struct sock *sk)
 }
 EXPORT_SYMBOL_GPL(tcp_done);
 
-extern void __skb_cb_too_small_for_tcp(int, int);
 extern struct tcp_congestion_ops tcp_reno;
 
 static __initdata unsigned long thash_entries;
@@ -2582,9 +2581,7 @@ void __init tcp_init(void)
        unsigned long limit;
        int order, i, max_share;
 
-       if (sizeof(struct tcp_skb_cb) > sizeof(skb->cb))
-               __skb_cb_too_small_for_tcp(sizeof(struct tcp_skb_cb),
-                                          sizeof(skb->cb));
+       BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > sizeof(skb->cb));
 
        tcp_hashinfo.bind_bucket_cachep =
                kmem_cache_create("tcp_bind_bucket",
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to