[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>
This commit is contained in:
committed by
David S. Miller
parent
b50660f1fe
commit
f83f1768f8
@@ -1,5 +1,8 @@
|
||||
#ifndef LLC_SAP_H
|
||||
#define LLC_SAP_H
|
||||
|
||||
#include <asm/types.h>
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 by Procom Technology,Inc.
|
||||
* 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
|
||||
@@ -19,8 +22,8 @@ struct sock;
|
||||
extern void llc_sap_rtn_pdu(struct llc_sap *sap, struct sk_buff *skb);
|
||||
extern void llc_save_primitive(struct sock *sk, struct sk_buff* skb,
|
||||
unsigned char prim);
|
||||
extern struct sk_buff *llc_alloc_frame(struct sock *sk,
|
||||
struct net_device *dev);
|
||||
extern struct sk_buff *llc_alloc_frame(struct sock *sk, struct net_device *dev,
|
||||
u8 type, u32 data_size);
|
||||
|
||||
extern void llc_build_and_send_test_pkt(struct llc_sap *sap,
|
||||
struct sk_buff *skb,
|
||||
|
Reference in New Issue
Block a user