Merge 48ca7139ab ("cifs: Fix validation of SMB1 query reparse point response") into android16-6.12-lts
Steps on the way to 6.12.34 Resolves merge conflicts in: kernel/sched/core.c net/netfilter/xt_mark.c Change-Id: I6df5e27c2a5bfa8b077b1f2814ad98b2a3dc0877 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -2067,6 +2067,8 @@ struct hci_conn *hci_pa_create_sync(struct hci_dev *hdev, bdaddr_t *dst,
|
||||
{
|
||||
struct hci_conn *conn;
|
||||
|
||||
bt_dev_dbg(hdev, "dst %pMR type %d sid %d", dst, dst_type, sid);
|
||||
|
||||
conn = hci_conn_add_unset(hdev, ISO_LINK, dst, HCI_ROLE_SLAVE);
|
||||
if (IS_ERR(conn))
|
||||
return conn;
|
||||
|
||||
@@ -4082,10 +4082,13 @@ static void hci_send_cmd_sync(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
return;
|
||||
}
|
||||
|
||||
err = hci_send_frame(hdev, skb);
|
||||
if (err < 0) {
|
||||
hci_cmd_sync_cancel_sync(hdev, -err);
|
||||
return;
|
||||
if (hci_skb_opcode(skb) != HCI_OP_NOP) {
|
||||
err = hci_send_frame(hdev, skb);
|
||||
if (err < 0) {
|
||||
hci_cmd_sync_cancel_sync(hdev, -err);
|
||||
return;
|
||||
}
|
||||
atomic_dec(&hdev->cmd_cnt);
|
||||
}
|
||||
|
||||
if (hdev->req_status == HCI_REQ_PEND &&
|
||||
@@ -4093,8 +4096,6 @@ static void hci_send_cmd_sync(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
kfree_skb(hdev->req_skb);
|
||||
hdev->req_skb = skb_clone(hdev->sent_cmd, GFP_KERNEL);
|
||||
}
|
||||
|
||||
atomic_dec(&hdev->cmd_cnt);
|
||||
}
|
||||
|
||||
static void hci_cmd_work(struct work_struct *work)
|
||||
|
||||
@@ -6333,6 +6333,17 @@ static void hci_le_ext_adv_report_evt(struct hci_dev *hdev, void *data,
|
||||
info->secondary_phy &= 0x1f;
|
||||
}
|
||||
|
||||
/* Check if PA Sync is pending and if the hci_conn SID has not
|
||||
* been set update it.
|
||||
*/
|
||||
if (hci_dev_test_flag(hdev, HCI_PA_SYNC)) {
|
||||
struct hci_conn *conn;
|
||||
|
||||
conn = hci_conn_hash_lookup_create_pa_sync(hdev);
|
||||
if (conn && conn->sid == HCI_SID_INVALID)
|
||||
conn->sid = info->sid;
|
||||
}
|
||||
|
||||
if (legacy_evt_type != LE_ADV_INVALID) {
|
||||
process_adv_report(hdev, legacy_evt_type, &info->bdaddr,
|
||||
info->bdaddr_type, NULL, 0,
|
||||
@@ -7136,7 +7147,8 @@ static void hci_le_meta_evt(struct hci_dev *hdev, void *data,
|
||||
|
||||
/* Only match event if command OGF is for LE */
|
||||
if (hdev->req_skb &&
|
||||
hci_opcode_ogf(hci_skb_opcode(hdev->req_skb)) == 0x08 &&
|
||||
(hci_opcode_ogf(hci_skb_opcode(hdev->req_skb)) == 0x08 ||
|
||||
hci_skb_opcode(hdev->req_skb) == HCI_OP_NOP) &&
|
||||
hci_skb_event(hdev->req_skb) == ev->subevent) {
|
||||
*opcode = hci_skb_opcode(hdev->req_skb);
|
||||
hci_req_cmd_complete(hdev, *opcode, 0x00, req_complete,
|
||||
@@ -7492,8 +7504,10 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
goto done;
|
||||
}
|
||||
|
||||
hci_dev_lock(hdev);
|
||||
kfree_skb(hdev->recv_event);
|
||||
hdev->recv_event = skb_clone(skb, GFP_KERNEL);
|
||||
hci_dev_unlock(hdev);
|
||||
|
||||
event = hdr->evt;
|
||||
if (!event) {
|
||||
|
||||
@@ -6890,20 +6890,37 @@ int hci_le_conn_update_sync(struct hci_dev *hdev, struct hci_conn *conn,
|
||||
|
||||
static void create_pa_complete(struct hci_dev *hdev, void *data, int err)
|
||||
{
|
||||
struct hci_conn *conn = data;
|
||||
struct hci_conn *pa_sync;
|
||||
|
||||
bt_dev_dbg(hdev, "err %d", err);
|
||||
|
||||
if (!err)
|
||||
return;
|
||||
|
||||
hci_dev_clear_flag(hdev, HCI_PA_SYNC);
|
||||
|
||||
if (err == -ECANCELED)
|
||||
return;
|
||||
|
||||
hci_dev_lock(hdev);
|
||||
|
||||
hci_update_passive_scan_sync(hdev);
|
||||
hci_dev_clear_flag(hdev, HCI_PA_SYNC);
|
||||
|
||||
if (!hci_conn_valid(hdev, conn))
|
||||
clear_bit(HCI_CONN_CREATE_PA_SYNC, &conn->flags);
|
||||
|
||||
if (!err)
|
||||
goto unlock;
|
||||
|
||||
/* Add connection to indicate PA sync error */
|
||||
pa_sync = hci_conn_add_unset(hdev, ISO_LINK, BDADDR_ANY,
|
||||
HCI_ROLE_SLAVE);
|
||||
|
||||
if (IS_ERR(pa_sync))
|
||||
goto unlock;
|
||||
|
||||
set_bit(HCI_CONN_PA_SYNC_FAILED, &pa_sync->flags);
|
||||
|
||||
/* Notify iso layer */
|
||||
hci_connect_cfm(pa_sync, bt_status(err));
|
||||
|
||||
unlock:
|
||||
hci_dev_unlock(hdev);
|
||||
}
|
||||
|
||||
@@ -6917,9 +6934,23 @@ static int hci_le_pa_create_sync(struct hci_dev *hdev, void *data)
|
||||
if (!hci_conn_valid(hdev, conn))
|
||||
return -ECANCELED;
|
||||
|
||||
if (conn->sync_handle != HCI_SYNC_HANDLE_INVALID)
|
||||
return -EINVAL;
|
||||
|
||||
if (hci_dev_test_and_set_flag(hdev, HCI_PA_SYNC))
|
||||
return -EBUSY;
|
||||
|
||||
/* Stop scanning if SID has not been set and active scanning is enabled
|
||||
* so we use passive scanning which will be scanning using the allow
|
||||
* list programmed to contain only the connection address.
|
||||
*/
|
||||
if (conn->sid == HCI_SID_INVALID &&
|
||||
hci_dev_test_flag(hdev, HCI_LE_SCAN)) {
|
||||
hci_scan_disable_sync(hdev);
|
||||
hci_dev_set_flag(hdev, HCI_LE_SCAN_INTERRUPTED);
|
||||
hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
|
||||
}
|
||||
|
||||
/* Mark HCI_CONN_CREATE_PA_SYNC so hci_update_passive_scan_sync can
|
||||
* program the address in the allow list so PA advertisements can be
|
||||
* received.
|
||||
@@ -6928,6 +6959,14 @@ static int hci_le_pa_create_sync(struct hci_dev *hdev, void *data)
|
||||
|
||||
hci_update_passive_scan_sync(hdev);
|
||||
|
||||
/* SID has not been set listen for HCI_EV_LE_EXT_ADV_REPORT to update
|
||||
* it.
|
||||
*/
|
||||
if (conn->sid == HCI_SID_INVALID)
|
||||
__hci_cmd_sync_status_sk(hdev, HCI_OP_NOP, 0, NULL,
|
||||
HCI_EV_LE_EXT_ADV_REPORT,
|
||||
conn->conn_timeout, NULL);
|
||||
|
||||
memset(&cp, 0, sizeof(cp));
|
||||
cp.options = qos->bcast.options;
|
||||
cp.sid = conn->sid;
|
||||
|
||||
+7
-2
@@ -938,7 +938,7 @@ static int iso_sock_bind_bc(struct socket *sock, struct sockaddr *addr,
|
||||
|
||||
iso_pi(sk)->dst_type = sa->iso_bc->bc_bdaddr_type;
|
||||
|
||||
if (sa->iso_bc->bc_sid > 0x0f)
|
||||
if (sa->iso_bc->bc_sid > 0x0f && sa->iso_bc->bc_sid != HCI_SID_INVALID)
|
||||
return -EINVAL;
|
||||
|
||||
iso_pi(sk)->bc_sid = sa->iso_bc->bc_sid;
|
||||
@@ -1963,6 +1963,9 @@ static bool iso_match_sid(struct sock *sk, void *data)
|
||||
{
|
||||
struct hci_ev_le_pa_sync_established *ev = data;
|
||||
|
||||
if (iso_pi(sk)->bc_sid == HCI_SID_INVALID)
|
||||
return true;
|
||||
|
||||
return ev->sid == iso_pi(sk)->bc_sid;
|
||||
}
|
||||
|
||||
@@ -2009,8 +2012,10 @@ int iso_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags)
|
||||
if (ev1) {
|
||||
sk = iso_get_sock(&hdev->bdaddr, bdaddr, BT_LISTEN,
|
||||
iso_match_sid, ev1);
|
||||
if (sk && !ev1->status)
|
||||
if (sk && !ev1->status) {
|
||||
iso_pi(sk)->sync_handle = le16_to_cpu(ev1->handle);
|
||||
iso_pi(sk)->bc_sid = ev1->sid;
|
||||
}
|
||||
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ void mgmt_mesh_foreach(struct hci_dev *hdev,
|
||||
{
|
||||
struct mgmt_mesh_tx *mesh_tx, *tmp;
|
||||
|
||||
list_for_each_entry_safe(mesh_tx, tmp, &hdev->mgmt_pending, list) {
|
||||
list_for_each_entry_safe(mesh_tx, tmp, &hdev->mesh_pending, list) {
|
||||
if (!sk || mesh_tx->sk == sk)
|
||||
cb(mesh_tx, data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user