diff options
author | Joonwoo Park <joonwpark81@gmail.com> | 2008-03-31 21:02:47 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-31 21:02:47 -0700 |
commit | f83f1768f833cb45bc93429fdc552252a4f55ac3 (patch) | |
tree | 15de7d2df2fc3a35e0a6b933bb37aefcba2cc3ef /net/llc/llc_pdu.c | |
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 'net/llc/llc_pdu.c')
-rw-r--r-- | net/llc/llc_pdu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/llc/llc_pdu.c b/net/llc/llc_pdu.c index fa8324396db3..2e6cb79196bb 100644 --- a/net/llc/llc_pdu.c +++ b/net/llc/llc_pdu.c @@ -241,7 +241,7 @@ void llc_pdu_init_as_frmr_rsp(struct sk_buff *skb, struct llc_pdu_sn *prev_pdu, FRMR_INFO_SET_PDU_INFO_2LONG_IND(frmr_info, vzyxw); FRMR_INFO_SET_PDU_INVALID_Nr_IND(frmr_info, vzyxw); FRMR_INFO_SET_PDU_INVALID_Ns_IND(frmr_info, vzyxw); - skb_put(skb, 5); + skb_put(skb, sizeof(struct llc_frmr_info)); } /** |