diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-04-01 18:13:36 (GMT) |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-04-07 21:06:28 (GMT) |
commit | 2ead70b8390d199ca04cd35311b51f5f3676079e (patch) | |
tree | 320bbac4a45e2b4557c039feb928537e0e6c45c9 /net/bluetooth | |
parent | 311bb895e325e5f4d708c1ed2206da8a3885c83a (diff) | |
download | linux-fsl-qoriq-2ead70b8390d199ca04cd35311b51f5f3676079e.tar.xz |
Bluetooth: Fix lockdep warning with skb list lock
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>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index d3b5d64..7264119 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -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) { @@ -254,6 +258,7 @@ void l2cap_chan_del(struct l2cap_chan *chan, int err) } } +free: kfree(chan); } |