Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Johan Hedberg says:
====================
pull request: bluetooth 2015-07-02
A couple of regressions crept in because of a patch to use proper list
APIs rather than manually reading & writing the next/prev pointers
(commit 835a6a2f86
). Turns out this was
masking a few bugs: a missing INIT_LIST_HEAD() call and incorrectly
using list_del() rather than list_del_init(). The two patches in this
set fix these, and it'd be nice they could still make it to 4.2-rc1 to
avoid new bug reports from users.
Please let me know if there are any issues pulling. Thanks.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
c4555d16d9
@ -915,6 +915,7 @@ static int hidp_session_new(struct hidp_session **out, const bdaddr_t *bdaddr,
|
|||||||
session->conn = l2cap_conn_get(conn);
|
session->conn = l2cap_conn_get(conn);
|
||||||
session->user.probe = hidp_session_probe;
|
session->user.probe = hidp_session_probe;
|
||||||
session->user.remove = hidp_session_remove;
|
session->user.remove = hidp_session_remove;
|
||||||
|
INIT_LIST_HEAD(&session->user.list);
|
||||||
session->ctrl_sock = ctrl_sock;
|
session->ctrl_sock = ctrl_sock;
|
||||||
session->intr_sock = intr_sock;
|
session->intr_sock = intr_sock;
|
||||||
skb_queue_head_init(&session->ctrl_transmit);
|
skb_queue_head_init(&session->ctrl_transmit);
|
||||||
|
@ -1634,7 +1634,7 @@ void l2cap_unregister_user(struct l2cap_conn *conn, struct l2cap_user *user)
|
|||||||
if (list_empty(&user->list))
|
if (list_empty(&user->list))
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
|
|
||||||
list_del(&user->list);
|
list_del_init(&user->list);
|
||||||
user->remove(conn, user);
|
user->remove(conn, user);
|
||||||
|
|
||||||
out_unlock:
|
out_unlock:
|
||||||
@ -1648,7 +1648,7 @@ static void l2cap_unregister_all_users(struct l2cap_conn *conn)
|
|||||||
|
|
||||||
while (!list_empty(&conn->users)) {
|
while (!list_empty(&conn->users)) {
|
||||||
user = list_first_entry(&conn->users, struct l2cap_user, list);
|
user = list_first_entry(&conn->users, struct l2cap_user, list);
|
||||||
list_del(&user->list);
|
list_del_init(&user->list);
|
||||||
user->remove(conn, user);
|
user->remove(conn, user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user