diff options
-rw-r--r-- | net/bluetooth/hci_core.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index ddf33900f7f3..91995f8ab0a0 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -4661,8 +4661,12 @@ static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue, | |||
4661 | 4661 | ||
4662 | skb_shinfo(skb)->frag_list = NULL; | 4662 | skb_shinfo(skb)->frag_list = NULL; |
4663 | 4663 | ||
4664 | /* Queue all fragments atomically */ | 4664 | /* Queue all fragments atomically. We need to use spin_lock_bh |
4665 | spin_lock(&queue->lock); | 4665 | * here because of 6LoWPAN links, as there this function is |
4666 | * called from softirq and using normal spin lock could cause | ||
4667 | * deadlocks. | ||
4668 | */ | ||
4669 | spin_lock_bh(&queue->lock); | ||
4666 | 4670 | ||
4667 | __skb_queue_tail(queue, skb); | 4671 | __skb_queue_tail(queue, skb); |
4668 | 4672 | ||
@@ -4679,7 +4683,7 @@ static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue, | |||
4679 | __skb_queue_tail(queue, skb); | 4683 | __skb_queue_tail(queue, skb); |
4680 | } while (list); | 4684 | } while (list); |
4681 | 4685 | ||
4682 | spin_unlock(&queue->lock); | 4686 | spin_unlock_bh(&queue->lock); |
4683 | } | 4687 | } |
4684 | } | 4688 | } |
4685 | 4689 | ||