Re: [PATCH 1/4] Bluetooth: hci_sync: pin conn across hci_le_create_conn_sync

From: Luiz Augusto von Dentz

Date: Mon May 11 2026 - 13:49:48 EST


Hi Michael,

On Mon, May 11, 2026 at 1:01 PM Michael Bommarito
<michael.bommarito@xxxxxxxxx> wrote:
>
> On Mon, May 11, 2026 at 10:53 AM Luiz Augusto von Dentz
> <luiz.dentz@xxxxxxxxx> wrote:
> > Id suggest we dropped the once at the end so just hci_cmd_sync_queue_conn.
> >
> > > + hci_cmd_sync_work_func_t func,
> > > + struct hci_conn *conn,
> > > + hci_cmd_sync_work_destroy_t destroy)
> > > +{
> > > + int err;
> > > +
> > > + err = hci_cmd_sync_queue_once(hdev, func, hci_conn_get(conn), destroy);
> > > + if (err)
> > > + hci_conn_put(conn);
> > > +
> > > + return err;
> >
> > Then we incorporate return (err == -EEXIST) ? 0 : err; logic above, so
> > I don't think any caller should require queuing multiple procedures
> > for the same conn.
>
> OK, good call. I checked the other 10 callers for
> hci_cmd_sync_queue_once and there isn't any variation today, so that
> seems safe.
>
> Do you want me to wait another 24-48 for others to weigh in or ship v2 now?

Just create a v2, anyone with comments can add them there as well.

--
Luiz Augusto von Dentz