Skip to content

Commit

Permalink
Bluetooth: Fix lockdep warning with skb list lock
Browse files Browse the repository at this point in the history
This is a regression acctually, caused by the first patch series for
creating a formal strcut l2cap_chan.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
  • Loading branch information
Gustavo F. Padovan committed Apr 7, 2011
1 parent 311bb89 commit 2ead70b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ void l2cap_chan_del(struct l2cap_chan *chan, int err)
} else
sk->sk_state_change(sk);

if (!(l2cap_pi(sk)->conf_state & L2CAP_CONF_OUTPUT_DONE &&
l2cap_pi(sk)->conf_state & L2CAP_CONF_INPUT_DONE))
goto free;

skb_queue_purge(TX_QUEUE(sk));

if (l2cap_pi(sk)->mode == L2CAP_MODE_ERTM) {
Expand All @@ -254,6 +258,7 @@ void l2cap_chan_del(struct l2cap_chan *chan, int err)
}
}

free:
kfree(chan);
}

Expand Down

0 comments on commit 2ead70b

Please sign in to comment.