Bluetooth: use hdev lock for accept_list and reject_list in conn req
stable inclusion from stable-v5.10.121 commit 8ace1e63550a4488f3eb4ce0fea7007898908f7d category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6CQ Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8ace1e63550a4488f3eb4ce0fea7007898908f7d -------------------------------- [ Upstream commit fb048cae ] All accesses (both reads and modifications) to hdev->{accept,reject}_list are protected by hdev lock, except the ones in hci_conn_request_evt. This can cause a race condition in the form of a list corruption. The solution is to protect these lists in hci_conn_request_evt as well. I was unable to find the exact commit that introduced the issue for the reject list, I was only able to find it for the accept list. Fixes: a55bd29d ("Bluetooth: Add white list lookup for incoming connection requests") Signed-off-by: NNiels Dossche <dossche.niels@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Showing
想要评论请 注册 或 登录