diff options
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r-- | net/bluetooth/l2cap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 162eab6a4478..a5867879b615 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -2107,7 +2107,8 @@ static int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 fl | |||
2107 | if (!(conn->rx_skb = bt_skb_alloc(len, GFP_ATOMIC))) | 2107 | if (!(conn->rx_skb = bt_skb_alloc(len, GFP_ATOMIC))) |
2108 | goto drop; | 2108 | goto drop; |
2109 | 2109 | ||
2110 | memcpy(skb_put(conn->rx_skb, skb->len), skb->data, skb->len); | 2110 | skb_copy_from_linear_data(skb, skb_put(conn->rx_skb, skb->len), |
2111 | skb->len); | ||
2111 | conn->rx_len = len - skb->len; | 2112 | conn->rx_len = len - skb->len; |
2112 | } else { | 2113 | } else { |
2113 | BT_DBG("Cont: frag len %d (expecting %d)", skb->len, conn->rx_len); | 2114 | BT_DBG("Cont: frag len %d (expecting %d)", skb->len, conn->rx_len); |
@@ -2128,7 +2129,8 @@ static int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 fl | |||
2128 | goto drop; | 2129 | goto drop; |
2129 | } | 2130 | } |
2130 | 2131 | ||
2131 | memcpy(skb_put(conn->rx_skb, skb->len), skb->data, skb->len); | 2132 | skb_copy_from_linear_data(skb, skb_put(conn->rx_skb, skb->len), |
2133 | skb->len); | ||
2132 | conn->rx_len -= skb->len; | 2134 | conn->rx_len -= skb->len; |
2133 | 2135 | ||
2134 | if (!conn->rx_len) { | 2136 | if (!conn->rx_len) { |