The patch titled fix deadlock in the bluetooth l2cap layer has been added to the -mm tree. Its filename is fix-deadlock-in-the-bluetooth-l2cap-layer.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: fix deadlock in the bluetooth l2cap layer From: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx> The bluetooth l2cap layer has 2 locks that are used in softirq context, (one spinlock and one rwlock, where the softirq usage is readlock) but where not all usages of the lock were _bh safe. The patch below corrects this. Signed-off-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx> Signed-off-by: Ingo Molnar <mingo@xxxxxxx> Cc: Marcel Holtmann <marcel@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- net/bluetooth/l2cap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff -puN net/bluetooth/l2cap.c~fix-deadlock-in-the-bluetooth-l2cap-layer net/bluetooth/l2cap.c --- a/net/bluetooth/l2cap.c~fix-deadlock-in-the-bluetooth-l2cap-layer +++ a/net/bluetooth/l2cap.c @@ -185,7 +185,7 @@ static inline void l2cap_chan_unlink(str { struct sock *next = l2cap_pi(sk)->next_c, *prev = l2cap_pi(sk)->prev_c; - write_lock(&l->lock); + write_lock_bh(&l->lock); if (sk == l->head) l->head = next; @@ -193,7 +193,7 @@ static inline void l2cap_chan_unlink(str l2cap_pi(next)->prev_c = prev; if (prev) l2cap_pi(prev)->next_c = next; - write_unlock(&l->lock); + write_unlock_bh(&l->lock); __sock_put(sk); } @@ -313,9 +313,9 @@ static void l2cap_conn_del(struct hci_co static inline void l2cap_chan_add(struct l2cap_conn *conn, struct sock *sk, struct sock *parent) { struct l2cap_chan_list *l = &conn->chan_list; - write_lock(&l->lock); + write_lock_bh(&l->lock); __l2cap_chan_add(conn, sk, parent); - write_unlock(&l->lock); + write_unlock_bh(&l->lock); } static inline u8 l2cap_get_ident(struct l2cap_conn *conn) @@ -328,14 +328,14 @@ static inline u8 l2cap_get_ident(struct * 200 - 254 are used by utilities like l2ping, etc. */ - spin_lock(&conn->lock); + spin_lock_bh(&conn->lock); if (++conn->tx_ident > 128) conn->tx_ident = 1; id = conn->tx_ident; - spin_unlock(&conn->lock); + spin_unlock_bh(&conn->lock); return id; } @@ -1416,7 +1416,7 @@ static inline int l2cap_connect_req(stru if (!sk) goto response; - write_lock(&list->lock); + write_lock_bh(&list->lock); /* Check if we already have channel with that dcid */ if (__l2cap_get_chan_by_dcid(list, scid)) { @@ -1458,7 +1458,7 @@ static inline int l2cap_connect_req(stru result = status = 0; done: - write_unlock(&list->lock); + write_unlock_bh(&list->lock); response: bh_unlock_sock(parent); _ Patches currently in -mm which might be from arjan@xxxxxxxxxxxxxxx are origin.patch improve-lockdep-debug-output.patch lockdep-core-reduce-per-lock-class-cache-size.patch put-a-comment-at-register_die_notifier-that-the-export-is-used.patch git-acpi.patch lockdep-annotate-8390c-disable_irq-2.patch lockdep-fix-sk_dst_check-deadlock.patch lockdep-split-the-skb_queue_head_init-lock-class.patch fix-deadlock-in-the-bluetooth-l2cap-layer.patch sleazy-fpu-feature-x86_64-support.patch sleazy-fpu-feature-i386-support.patch delay-accounting-taskstats-interface-send-tgid-once.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html