Skip to content

Commit

Permalink
[PATCH] lockdep: annotate bcsp driver
Browse files Browse the repository at this point in the history
    =============================================
    [ INFO: possible recursive locking detected ]
    2.6.18-1.2699.fc6 #1
    ---------------------------------------------
    swapper/0 is trying to acquire lock:
     (&list->lock#3){+...}, at: [<c05ad307>] skb_dequeue+0x12/0x43

    but task is already holding lock:
     (&list->lock#3){+...}, at: [<df98cd79>] bcsp_dequeue+0x6a/0x11e [hci_uart]

Two different list locks nest, annotate so.

Signed-off-by: Peter Zijlstra <[email protected]>
Acked-by: Marcel Holtmann <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Peter Zijlstra authored and Linus Torvalds committed Dec 7, 2006
1 parent 9774a1f commit f89d75f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/bluetooth/hci_bcsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ static struct sk_buff *bcsp_dequeue(struct hci_uart *hu)
reliable packet if the number of packets sent but not yet ack'ed
is < than the winsize */

spin_lock_irqsave(&bcsp->unack.lock, flags);
spin_lock_irqsave_nested(&bcsp->unack.lock, flags, SINGLE_DEPTH_NESTING);

if (bcsp->unack.qlen < BCSP_TXWINSIZE && (skb = skb_dequeue(&bcsp->rel)) != NULL) {
struct sk_buff *nskb = bcsp_prepare_pkt(bcsp, skb->data, skb->len, bt_cb(skb)->pkt_type);
Expand Down Expand Up @@ -696,7 +696,7 @@ static void bcsp_timed_event(unsigned long arg)

BT_DBG("hu %p retransmitting %u pkts", hu, bcsp->unack.qlen);

spin_lock_irqsave(&bcsp->unack.lock, flags);
spin_lock_irqsave_nested(&bcsp->unack.lock, flags, SINGLE_DEPTH_NESTING);

while ((skb = __skb_dequeue_tail(&bcsp->unack)) != NULL) {
bcsp->msgq_txseq = (bcsp->msgq_txseq - 1) & 0x07;
Expand Down

0 comments on commit f89d75f

Please sign in to comment.