aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeet Chaudhuri <jeetlinux@yahoo.co.in>2007-04-25 21:53:20 +0200
committerAdrian Bunk <bunk@stusta.de>2007-04-25 21:53:20 +0200
commit15485523f2deacb7663af61538fbd786ebc1f7db (patch)
tree9e8ce97d552716707786ace472d31a817440d090
parentfe1a5ddff7186192f9c6316798a85b3095696ea6 (diff)
IrDA: Incorrect TTP header reservation
We must reserve SAR + MAX_HEADER bytes for IrLMP to fit in. This fixes an oops reported (and fixed) by Jeet Chaudhuri, when max_sdu_size is greater than 0. Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Adrian Bunk <bunk@stusta.de>
-rw-r--r--net/irda/irttp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index 8aff254cb41..5fc3597e552 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -1100,7 +1100,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel,
return -ENOMEM;
/* Reserve space for MUX_CONTROL and LAP header */
- skb_reserve(tx_skb, TTP_MAX_HEADER);
+ skb_reserve(tx_skb, TTP_MAX_HEADER + TTP_SAR_HEADER);
} else {
tx_skb = userdata;
/*
@@ -1348,7 +1348,7 @@ int irttp_connect_response(struct tsap_cb *self, __u32 max_sdu_size,
return -ENOMEM;
/* Reserve space for MUX_CONTROL and LAP header */
- skb_reserve(tx_skb, TTP_MAX_HEADER);
+ skb_reserve(tx_skb, TTP_MAX_HEADER + TTP_SAR_HEADER);
} else {
tx_skb = userdata;
/*