diff options
author | Joonwoo Park <joonwpark81@gmail.com> | 2008-04-01 00:02:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-01 00:02:47 -0400 |
commit | f83f1768f833cb45bc93429fdc552252a4f55ac3 (patch) | |
tree | 15de7d2df2fc3a35e0a6b933bb37aefcba2cc3ef /include/net/llc_sap.h | |
parent | b50660f1fe4ebd6129064e4fba0bd882b60c2425 (diff) |
[LLC]: skb allocation size for responses
Allocate the skb for llc responses with the received packet size by
using the size adjustable llc_frame_alloc.
Don't allocate useless extra payload.
Cleanup magic numbers.
So, this fixes oops.
Reported by Jim Westfall:
kernel: skb_over_panic: text:c0541fc7 len:1000 put:997 head:c166ac00 data:c166ac2f tail:0xc166b017 end:0xc166ac80 dev:eth0
kernel: ------------[ cut here ]------------
kernel: kernel BUG at net/core/skbuff.c:95!
Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/llc_sap.h')
-rw-r--r-- | include/net/llc_sap.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/net/llc_sap.h b/include/net/llc_sap.h index 2c56dbece729..ed25bec2f648 100644 --- a/include/net/llc_sap.h +++ b/include/net/llc_sap.h | |||
@@ -1,5 +1,8 @@ | |||
1 | #ifndef LLC_SAP_H | 1 | #ifndef LLC_SAP_H |
2 | #define LLC_SAP_H | 2 | #define LLC_SAP_H |
3 | |||
4 | #include <asm/types.h> | ||
5 | |||
3 | /* | 6 | /* |
4 | * Copyright (c) 1997 by Procom Technology,Inc. | 7 | * Copyright (c) 1997 by Procom Technology,Inc. |
5 | * 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 8 | * 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
@@ -19,8 +22,8 @@ struct sock; | |||
19 | extern void llc_sap_rtn_pdu(struct llc_sap *sap, struct sk_buff *skb); | 22 | extern void llc_sap_rtn_pdu(struct llc_sap *sap, struct sk_buff *skb); |
20 | extern void llc_save_primitive(struct sock *sk, struct sk_buff* skb, | 23 | extern void llc_save_primitive(struct sock *sk, struct sk_buff* skb, |
21 | unsigned char prim); | 24 | unsigned char prim); |
22 | extern struct sk_buff *llc_alloc_frame(struct sock *sk, | 25 | extern struct sk_buff *llc_alloc_frame(struct sock *sk, struct net_device *dev, |
23 | struct net_device *dev); | 26 | u8 type, u32 data_size); |
24 | 27 | ||
25 | extern void llc_build_and_send_test_pkt(struct llc_sap *sap, | 28 | extern void llc_build_and_send_test_pkt(struct llc_sap *sap, |
26 | struct sk_buff *skb, | 29 | struct sk_buff *skb, |