2017-12-11 21:49:18

by John Stultz

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: hci_serdev: Init hci_uart proto_lock to avoid oops

On Thu, Nov 16, 2017 at 10:07 PM, Marcel Holtmann <[email protected]> wrote:
> Hi Lukas,
>
>> John Stultz reports a boot time crash with the HiKey board (which uses
>> hci_serdev) occurring in hci_uart_tx_wakeup(). That function is
>> contained in hci_ldisc.c, but also called from the newer hci_serdev.c.
>> It acquires the proto_lock in struct hci_uart and it turns out that we
>> forgot to init the lock in the serdev code path, thus causing the crash.
>>
>> John bisected the crash to commit 67d2f8781b9f ("Bluetooth: hci_ldisc:
>> Allow sleeping while proto locks are held"), but the issue was present
>> before and the commit merely exposed it. (Perhaps by luck, the crash
>> did not occur with rwlocks.)
>>
>> Init the proto_lock in the serdev code path to avoid the oops.
>>
[snip]
> patch has been applied to bluetooth-next tree.

Sorry to be a nuisance if its just a timing thing, but I wanted to
follow up on this just to make sure it didn't fall through the cracks,
as I noticed w/ -rc3 it hasn't landed yet.

thanks
-john


2018-01-02 20:40:03

by John Stultz

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: hci_serdev: Init hci_uart proto_lock to avoid oops

On Mon, Dec 11, 2017 at 1:49 PM, John Stultz <[email protected]> wrote:
> On Thu, Nov 16, 2017 at 10:07 PM, Marcel Holtmann <[email protected]> wrote:
>> Hi Lukas,
>>
>>> John Stultz reports a boot time crash with the HiKey board (which uses
>>> hci_serdev) occurring in hci_uart_tx_wakeup(). That function is
>>> contained in hci_ldisc.c, but also called from the newer hci_serdev.c.
>>> It acquires the proto_lock in struct hci_uart and it turns out that we
>>> forgot to init the lock in the serdev code path, thus causing the crash.
>>>
>>> John bisected the crash to commit 67d2f8781b9f ("Bluetooth: hci_ldisc:
>>> Allow sleeping while proto locks are held"), but the issue was present
>>> before and the commit merely exposed it. (Perhaps by luck, the crash
>>> did not occur with rwlocks.)
>>>
>>> Init the proto_lock in the serdev code path to avoid the oops.
>>>
> [snip]
>> patch has been applied to bluetooth-next tree.
>
> Sorry to be a nuisance if its just a timing thing, but I wanted to
> follow up on this just to make sure it didn't fall through the cracks,
> as I noticed w/ -rc3 it hasn't landed yet.

Happy new year all,
Just wanted to send another ping on this as it seems it hasn't made
it into -rc6. Did this get missed as being tagged as a (at least
functional) regression fix?

thanks
-john

2018-01-02 20:45:48

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: hci_serdev: Init hci_uart proto_lock to avoid oops

Hi John,

>>>> John Stultz reports a boot time crash with the HiKey board (which uses
>>>> hci_serdev) occurring in hci_uart_tx_wakeup(). That function is
>>>> contained in hci_ldisc.c, but also called from the newer hci_serdev.c.
>>>> It acquires the proto_lock in struct hci_uart and it turns out that we
>>>> forgot to init the lock in the serdev code path, thus causing the crash.
>>>>
>>>> John bisected the crash to commit 67d2f8781b9f ("Bluetooth: hci_ldisc:
>>>> Allow sleeping while proto locks are held"), but the issue was present
>>>> before and the commit merely exposed it. (Perhaps by luck, the crash
>>>> did not occur with rwlocks.)
>>>>
>>>> Init the proto_lock in the serdev code path to avoid the oops.
>>>>
>> [snip]
>>> patch has been applied to bluetooth-next tree.
>>
>> Sorry to be a nuisance if its just a timing thing, but I wanted to
>> follow up on this just to make sure it didn't fall through the cracks,
>> as I noticed w/ -rc3 it hasn't landed yet.
>
> Happy new year all,
> Just wanted to send another ping on this as it seems it hasn't made
> it into -rc6. Did this get missed as being tagged as a (at least
> functional) regression fix?

since it wasn’t marked as urgent fix, it never went on the path to -rc. It is on the path for the next release. And then can be included in -stable if needed.

Regards

Marcel

2018-02-01 05:51:42

by Lukas Wunner

[permalink] [raw]
Subject: Backport d73e17281665 to v4.15 stable

Dear Greg,

when you refill the patch queue for v4.15 stable one of these days,
please consider adding

commit d73e172816652772114827abaa2dbc053eecbbd7
Author: Lukas Wunner <[email protected]>
Date: Fri Nov 17 00:54:53 2017 +0100

Bluetooth: hci_serdev: Init hci_uart proto_lock to avoid oops

to fix a boot crash on certain machines with UART-attached Bluetooth
which was kindly reported by John Stultz. The patch unfortunately
lacked a Fixes: or Cc: stable tag. It landed in Linus' tree 7 hours ago.

Thanks!

Lukas

2018-02-01 06:43:12

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: Backport d73e17281665 to v4.15 stable

On Thu, Feb 01, 2018 at 06:50:52AM +0100, Lukas Wunner wrote:
> Dear Greg,
>
> when you refill the patch queue for v4.15 stable one of these days,
> please consider adding
>
> commit d73e172816652772114827abaa2dbc053eecbbd7
> Author: Lukas Wunner <[email protected]>
> Date: Fri Nov 17 00:54:53 2017 +0100
>
> Bluetooth: hci_serdev: Init hci_uart proto_lock to avoid oops
>
> to fix a boot crash on certain machines with UART-attached Bluetooth
> which was kindly reported by John Stultz. The patch unfortunately
> lacked a Fixes: or Cc: stable tag. It landed in Linus' tree 7 hours ago.

Now queued up, thanks.

greg k-h