diff options
author | Jeet Chaudhuri <jeetlinux@yahoo.co.in> | 2006-12-08 01:32:22 +0200 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2006-12-16 16:20:47 -0800 |
commit | 6cfea1e1f15cb5eb76bb80e9e8310fde254b8792 (patch) | |
tree | 4de41a6ffa1faf3f7054c1f50fa2994534bae03a | |
parent | 0b427874213aae83d3a93b48c667e6946e331772 (diff) | |
download | lwn-6cfea1e1f15cb5eb76bb80e9e8310fde254b8792.tar.gz lwn-6cfea1e1f15cb5eb76bb80e9e8310fde254b8792.zip |
[PATCH] 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: Chris Wright <chrisw@sous-sol.org>
-rw-r--r-- | net/irda/irttp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/irda/irttp.c b/net/irda/irttp.c index 42acf1cde737..be0d8fa852a8 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c @@ -1098,7 +1098,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; /* @@ -1346,7 +1346,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; /* |