Loading net/bluetooth/af_bluetooth.c +4 −2 Original line number Diff line number Diff line Loading @@ -240,7 +240,8 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, if (flags & (MSG_OOB)) return -EOPNOTSUPP; if (!(skb = skb_recv_datagram(sk, flags, noblock, &err))) { skb = skb_recv_datagram(sk, flags, noblock, &err); if (!skb) { if (sk->sk_shutdown & RCV_SHUTDOWN) return 0; return err; Loading Loading @@ -323,7 +324,8 @@ int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock, if (copied >= target) break; if ((err = sock_error(sk)) != 0) err = sock_error(sk); if (err) break; if (sk->sk_shutdown & RCV_SHUTDOWN) break; Loading net/bluetooth/cmtp/capi.c +2 −1 Original line number Diff line number Diff line Loading @@ -155,7 +155,8 @@ static void cmtp_send_interopmsg(struct cmtp_session *session, BT_DBG("session %p subcmd 0x%02x appl %d msgnum %d", session, subcmd, appl, msgnum); if (!(skb = alloc_skb(CAPI_MSG_BASELEN + 6 + len, GFP_ATOMIC))) { skb = alloc_skb(CAPI_MSG_BASELEN + 6 + len, GFP_ATOMIC); if (!skb) { BT_ERR("Can't allocate memory for interoperability packet"); return; } Loading net/bluetooth/cmtp/core.c +6 −3 Original line number Diff line number Diff line Loading @@ -115,7 +115,8 @@ static inline void cmtp_add_msgpart(struct cmtp_session *session, int id, const size = (skb) ? skb->len + count : count; if (!(nskb = alloc_skb(size, GFP_ATOMIC))) { nskb = alloc_skb(size, GFP_ATOMIC); if (!nskb) { BT_ERR("Can't allocate memory for CAPI message"); return; } Loading Loading @@ -216,7 +217,8 @@ static void cmtp_process_transmit(struct cmtp_session *session) BT_DBG("session %p", session); if (!(nskb = alloc_skb(session->mtu, GFP_ATOMIC))) { nskb = alloc_skb(session->mtu, GFP_ATOMIC); if (!nskb) { BT_ERR("Can't allocate memory for new frame"); return; } Loading @@ -224,7 +226,8 @@ static void cmtp_process_transmit(struct cmtp_session *session) while ((skb = skb_dequeue(&session->transmit))) { struct cmtp_scb *scb = (void *) skb->cb; if ((tail = (session->mtu - nskb->len)) < 5) { tail = session->mtu - nskb->len; if (tail < 5) { cmtp_send_frame(session, nskb->data, nskb->len); skb_trim(nskb, 0); tail = session->mtu; Loading net/bluetooth/hci_core.c +9 −3 Original line number Diff line number Diff line Loading @@ -429,7 +429,8 @@ int hci_inquiry(void __user *arg) if (copy_from_user(&ir, ptr, sizeof(ir))) return -EFAULT; if (!(hdev = hci_dev_get(ir.dev_id))) hdev = hci_dev_get(ir.dev_id); if (!hdev) return -ENODEV; hci_dev_lock_bh(hdev); Loading Loading @@ -489,7 +490,8 @@ int hci_dev_open(__u16 dev) struct hci_dev *hdev; int ret = 0; if (!(hdev = hci_dev_get(dev))) hdev = hci_dev_get(dev); if (!hdev) return -ENODEV; BT_DBG("%s %p", hdev->name, hdev); Loading Loading @@ -1940,7 +1942,11 @@ static void hci_cmd_task(unsigned long arg) } /* Send queued commands */ if (atomic_read(&hdev->cmd_cnt) && (skb = skb_dequeue(&hdev->cmd_q))) { if (atomic_read(&hdev->cmd_cnt)) { skb = skb_dequeue(&hdev->cmd_q); if (!skb) return; kfree_skb(hdev->sent_cmd); hdev->sent_cmd = skb_clone(skb, GFP_ATOMIC); Loading net/bluetooth/hci_event.c +14 −8 Original line number Diff line number Diff line Loading @@ -851,12 +851,15 @@ static void hci_cs_add_sco(struct hci_dev *hdev, __u8 status) hci_dev_lock(hdev); acl = hci_conn_hash_lookup_handle(hdev, handle); if (acl && (sco = acl->link)) { if (acl) { sco = acl->link; if (sco) { sco->state = BT_CLOSED; hci_proto_connect_cfm(sco, status); hci_conn_del(sco); } } hci_dev_unlock(hdev); } Loading Loading @@ -1037,12 +1040,15 @@ static void hci_cs_setup_sync_conn(struct hci_dev *hdev, __u8 status) hci_dev_lock(hdev); acl = hci_conn_hash_lookup_handle(hdev, handle); if (acl && (sco = acl->link)) { if (acl) { sco = acl->link; if (sco) { sco->state = BT_CLOSED; hci_proto_connect_cfm(sco, status); hci_conn_del(sco); } } hci_dev_unlock(hdev); } Loading Loading
net/bluetooth/af_bluetooth.c +4 −2 Original line number Diff line number Diff line Loading @@ -240,7 +240,8 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, if (flags & (MSG_OOB)) return -EOPNOTSUPP; if (!(skb = skb_recv_datagram(sk, flags, noblock, &err))) { skb = skb_recv_datagram(sk, flags, noblock, &err); if (!skb) { if (sk->sk_shutdown & RCV_SHUTDOWN) return 0; return err; Loading Loading @@ -323,7 +324,8 @@ int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock, if (copied >= target) break; if ((err = sock_error(sk)) != 0) err = sock_error(sk); if (err) break; if (sk->sk_shutdown & RCV_SHUTDOWN) break; Loading
net/bluetooth/cmtp/capi.c +2 −1 Original line number Diff line number Diff line Loading @@ -155,7 +155,8 @@ static void cmtp_send_interopmsg(struct cmtp_session *session, BT_DBG("session %p subcmd 0x%02x appl %d msgnum %d", session, subcmd, appl, msgnum); if (!(skb = alloc_skb(CAPI_MSG_BASELEN + 6 + len, GFP_ATOMIC))) { skb = alloc_skb(CAPI_MSG_BASELEN + 6 + len, GFP_ATOMIC); if (!skb) { BT_ERR("Can't allocate memory for interoperability packet"); return; } Loading
net/bluetooth/cmtp/core.c +6 −3 Original line number Diff line number Diff line Loading @@ -115,7 +115,8 @@ static inline void cmtp_add_msgpart(struct cmtp_session *session, int id, const size = (skb) ? skb->len + count : count; if (!(nskb = alloc_skb(size, GFP_ATOMIC))) { nskb = alloc_skb(size, GFP_ATOMIC); if (!nskb) { BT_ERR("Can't allocate memory for CAPI message"); return; } Loading Loading @@ -216,7 +217,8 @@ static void cmtp_process_transmit(struct cmtp_session *session) BT_DBG("session %p", session); if (!(nskb = alloc_skb(session->mtu, GFP_ATOMIC))) { nskb = alloc_skb(session->mtu, GFP_ATOMIC); if (!nskb) { BT_ERR("Can't allocate memory for new frame"); return; } Loading @@ -224,7 +226,8 @@ static void cmtp_process_transmit(struct cmtp_session *session) while ((skb = skb_dequeue(&session->transmit))) { struct cmtp_scb *scb = (void *) skb->cb; if ((tail = (session->mtu - nskb->len)) < 5) { tail = session->mtu - nskb->len; if (tail < 5) { cmtp_send_frame(session, nskb->data, nskb->len); skb_trim(nskb, 0); tail = session->mtu; Loading
net/bluetooth/hci_core.c +9 −3 Original line number Diff line number Diff line Loading @@ -429,7 +429,8 @@ int hci_inquiry(void __user *arg) if (copy_from_user(&ir, ptr, sizeof(ir))) return -EFAULT; if (!(hdev = hci_dev_get(ir.dev_id))) hdev = hci_dev_get(ir.dev_id); if (!hdev) return -ENODEV; hci_dev_lock_bh(hdev); Loading Loading @@ -489,7 +490,8 @@ int hci_dev_open(__u16 dev) struct hci_dev *hdev; int ret = 0; if (!(hdev = hci_dev_get(dev))) hdev = hci_dev_get(dev); if (!hdev) return -ENODEV; BT_DBG("%s %p", hdev->name, hdev); Loading Loading @@ -1940,7 +1942,11 @@ static void hci_cmd_task(unsigned long arg) } /* Send queued commands */ if (atomic_read(&hdev->cmd_cnt) && (skb = skb_dequeue(&hdev->cmd_q))) { if (atomic_read(&hdev->cmd_cnt)) { skb = skb_dequeue(&hdev->cmd_q); if (!skb) return; kfree_skb(hdev->sent_cmd); hdev->sent_cmd = skb_clone(skb, GFP_ATOMIC); Loading
net/bluetooth/hci_event.c +14 −8 Original line number Diff line number Diff line Loading @@ -851,12 +851,15 @@ static void hci_cs_add_sco(struct hci_dev *hdev, __u8 status) hci_dev_lock(hdev); acl = hci_conn_hash_lookup_handle(hdev, handle); if (acl && (sco = acl->link)) { if (acl) { sco = acl->link; if (sco) { sco->state = BT_CLOSED; hci_proto_connect_cfm(sco, status); hci_conn_del(sco); } } hci_dev_unlock(hdev); } Loading Loading @@ -1037,12 +1040,15 @@ static void hci_cs_setup_sync_conn(struct hci_dev *hdev, __u8 status) hci_dev_lock(hdev); acl = hci_conn_hash_lookup_handle(hdev, handle); if (acl && (sco = acl->link)) { if (acl) { sco = acl->link; if (sco) { sco->state = BT_CLOSED; hci_proto_connect_cfm(sco, status); hci_conn_del(sco); } } hci_dev_unlock(hdev); } Loading