diff options
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r-- | net/bluetooth/l2cap_sock.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index 1842141baedb..a8ba752732c9 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c | |||
@@ -1019,7 +1019,7 @@ static int l2cap_sock_recvmsg(struct socket *sock, struct msghdr *msg, | |||
1019 | goto done; | 1019 | goto done; |
1020 | 1020 | ||
1021 | if (pi->rx_busy_skb) { | 1021 | if (pi->rx_busy_skb) { |
1022 | if (!sock_queue_rcv_skb(sk, pi->rx_busy_skb)) | 1022 | if (!__sock_queue_rcv_skb(sk, pi->rx_busy_skb)) |
1023 | pi->rx_busy_skb = NULL; | 1023 | pi->rx_busy_skb = NULL; |
1024 | else | 1024 | else |
1025 | goto done; | 1025 | goto done; |
@@ -1270,7 +1270,17 @@ static int l2cap_sock_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) | |||
1270 | goto done; | 1270 | goto done; |
1271 | } | 1271 | } |
1272 | 1272 | ||
1273 | err = sock_queue_rcv_skb(sk, skb); | 1273 | if (chan->mode != L2CAP_MODE_ERTM && |
1274 | chan->mode != L2CAP_MODE_STREAMING) { | ||
1275 | /* Even if no filter is attached, we could potentially | ||
1276 | * get errors from security modules, etc. | ||
1277 | */ | ||
1278 | err = sk_filter(sk, skb); | ||
1279 | if (err) | ||
1280 | goto done; | ||
1281 | } | ||
1282 | |||
1283 | err = __sock_queue_rcv_skb(sk, skb); | ||
1274 | 1284 | ||
1275 | /* For ERTM, handle one skb that doesn't fit into the recv | 1285 | /* For ERTM, handle one skb that doesn't fit into the recv |
1276 | * buffer. This is important to do because the data frames | 1286 | * buffer. This is important to do because the data frames |