提交 1158fe43 编写于 作者: C Christopher William Snowhill 提交者: Zheng Zengkai

Bluetooth: Fix initializing response id after clearing struct

stable inclusion
from stable-5.10.20
commit 65933b074ae0b5cbfa5796e0a0631ba75f34f5c2
bugzilla: 50608

--------------------------------

[ Upstream commit a5687c64 ]

Looks like this was missed when patching the source to clear the structures
throughout, causing this one instance to clear the struct after the response
id is assigned.

Fixes: eddb7732 ("Bluetooth: A2MP: Fix not initializing all members")
Signed-off-by: NChristopher William Snowhill <chris@kode54.net>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 a8e9c35a
...@@ -381,9 +381,9 @@ static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb, ...@@ -381,9 +381,9 @@ static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb,
hdev = hci_dev_get(req->id); hdev = hci_dev_get(req->id);
if (!hdev || hdev->amp_type == AMP_TYPE_BREDR || tmp) { if (!hdev || hdev->amp_type == AMP_TYPE_BREDR || tmp) {
struct a2mp_amp_assoc_rsp rsp; struct a2mp_amp_assoc_rsp rsp;
rsp.id = req->id;
memset(&rsp, 0, sizeof(rsp)); memset(&rsp, 0, sizeof(rsp));
rsp.id = req->id;
if (tmp) { if (tmp) {
rsp.status = A2MP_STATUS_COLLISION_OCCURED; rsp.status = A2MP_STATUS_COLLISION_OCCURED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册