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-11 11:32:39 -0800 |
commit | d58808bcc7cb732a4f62af1105d46757d3167e57 (patch) | |
tree | fdbb35343342336401b58a8dfbf026d61778b4a3 | |
parent | 5bcd4af5fcd996bdd309bf506a60c6217810b1c6 (diff) | |
download | lwn-d58808bcc7cb732a4f62af1105d46757d3167e57.tar.gz lwn-d58808bcc7cb732a4f62af1105d46757d3167e57.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 3c2e70b77df1..da73e63ba5a6 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c @@ -1099,7 +1099,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; /* |