diff options
author | Mat Martineau <mathewm@codeaurora.org> | 2011-07-22 23:53:58 +0200 |
---|---|---|
committer | Gustavo F. Padovan <gustavo@padovan.org> | 2011-09-27 23:15:55 +0200 |
commit | 449357200c5d73d80a9c42dee5dafed684b3cd17 (patch) | |
tree | 333e387c99dc8cd03d334e61f1a5147b4e5bd8f9 /net/bluetooth/bnep | |
parent | Bluetooth: Allow ACL packets over USB in HCI_RAW mode (diff) | |
download | linux-449357200c5d73d80a9c42dee5dafed684b3cd17.tar.xz linux-449357200c5d73d80a9c42dee5dafed684b3cd17.zip |
Bluetooth: Linearize skbs for use in BNEP, CMTP, HIDP, and RFCOMM
Fragmented skbs are only encountered when receiving ERTM or streaming
mode L2CAP data. BNEP, CMTP, HIDP, and RFCOMM generally use basic
mode, but they need to handle fragments without crashing.
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/bnep')
-rw-r--r-- | net/bluetooth/bnep/core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index d9edfe8bf9d6..91bcd3a961ec 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c @@ -492,7 +492,10 @@ static int bnep_session(void *arg) /* RX */ while ((skb = skb_dequeue(&sk->sk_receive_queue))) { skb_orphan(skb); - bnep_rx_frame(s, skb); + if (!skb_linearize(skb)) + bnep_rx_frame(s, skb); + else + kfree_skb(skb); } if (sk->sk_state != BT_CONNECTED) |