2023-05-10 08:30:13

by Nimrod MacIomhair

[permalink] [raw]
Subject: [REGRESSION] wifi: brcmfmac: add firmware vendor info in driver info

Changes made by the mentioned commit lead to Oops when waking up after
suspend to RAM.

When waking up a Dell XPS 13 9350 with BCM4350 wifi card after suspend
to RAM, the kernel hangs with a NULL pointer dereference and Oops. The
issues was introduced by commit
da6d9c8ecd00e20218461007948f2b0a8e7fa242 and only happens when the
brcmfmac module is loaded. This issue is the reason we could not
upgrade to newer kernels than the 6.1 series on the affected machine.


Details:

On a Dell XPS 13 9350 laptop with Broadcom BCM4350 wifi card (according
to lspci), every kernel starting with 6.2 hangs when waking up after
suspend to RAM. The issue persisted as of May 2nd (last tested commit
was 348551ddaf311c76b01cdcbaf61b6fef06a49144). Passing the debug and
no_console_suspend parameters to the kernel show that a NULL pointer
dereference and an Oops happen at wakeup. Please find the kernel
messages readable on the screen at this point attached
(kernel_log_after_suspend.txt).

A bisection was successful and produced the first bad commit
[da6d9c8ecd00e20218461007948f2b0a8e7fa242] wifi: brcmfmac: add firmware
vendor info in driver info
I've attached the bisection log as well (bisect.txt).

Suspend to RAM works on this machine on newer kernels once the brcmfmac
module is unloaded.

Distribution: Arch Linux
Architecture: x86_64
Device: Dell XPS 13 9350 with BCM4350 wifi card
Kernel config used at compilation (created using the Arch Linux default
config and make olddefconfig):
https://gist.githubusercontent.com/maclomhair/e33fa7eece8f8c77e5a88c4eede2f523/raw/429dfb022498c026225865dbb3ab2f75d5030a54/config
Dmesg output after boot:
https://gist.githubusercontent.com/maclomhair/47c75fa759d93800e7fb5e937fabef3e/raw/10750996a1ea9dcb3fa14d9b94e11fedd3abf280/dmesg

#regzbot introduced da6d9c8ecd00e20218461007948f2b0a8e7fa242

Thank you for your time,
Felix



Attachments:
kernel_log_after_suspend.txt (3.20 kB)
bisect.log (2.68 kB)
Download all attachments

2023-05-10 10:07:52

by Hans de Goede

[permalink] [raw]
Subject: Re: [REGRESSION] wifi: brcmfmac: add firmware vendor info in driver info

Hi Felix,

On 5/10/23 10:25, Felix wrote:
> Changes made by the mentioned commit lead to Oops when waking up after
> suspend to RAM.
>
> When waking up a Dell XPS 13 9350 with BCM4350 wifi card after suspend
> to RAM, the kernel hangs with a NULL pointer dereference and Oops. The
> issues was introduced by commit
> da6d9c8ecd00e20218461007948f2b0a8e7fa242 and only happens when the
> brcmfmac module is loaded. This issue is the reason we could not
> upgrade to newer kernels than the 6.1 series on the affected machine.
>
>
> Details:
>
> On a Dell XPS 13 9350 laptop with Broadcom BCM4350 wifi card (according
> to lspci), every kernel starting with 6.2 hangs when waking up after
> suspend to RAM. The issue persisted as of May 2nd (last tested commit
> was 348551ddaf311c76b01cdcbaf61b6fef06a49144). Passing the debug and
> no_console_suspend parameters to the kernel show that a NULL pointer
> dereference and an Oops happen at wakeup. Please find the kernel
> messages readable on the screen at this point attached
> (kernel_log_after_suspend.txt).
>
> A bisection was successful and produced the first bad commit
> [da6d9c8ecd00e20218461007948f2b0a8e7fa242] wifi: brcmfmac: add firmware
> vendor info in driver info
> I've attached the bisection log as well (bisect.txt).
>
> Suspend to RAM works on this machine on newer kernels once the brcmfmac
> module is unloaded.
>
> Distribution: Arch Linux
> Architecture: x86_64
> Device: Dell XPS 13 9350 with BCM4350 wifi card
> Kernel config used at compilation (created using the Arch Linux default
> config and make olddefconfig):
> https://gist.githubusercontent.com/maclomhair/e33fa7eece8f8c77e5a88c4eede2f523/raw/429dfb022498c026225865dbb3ab2f75d5030a54/config
> Dmesg output after boot:
> https://gist.githubusercontent.com/maclomhair/47c75fa759d93800e7fb5e937fabef3e/raw/10750996a1ea9dcb3fa14d9b94e11fedd3abf280/dmesg
>
> #regzbot introduced da6d9c8ecd00e20218461007948f2b0a8e7fa242

Thank you for reporting this and thank you for bisecting it too!

As a result of your excellent bug report I've been able to write
a fix for this. I'm confident enough in the fix that I've submitted
it upstream right away.

But it would still be good if you can test the fix and let us know
if it fixes this issue for you. You should have received a copy
of the patch when I submitted it upstream.

Regards,

Hans





2023-05-10 12:17:55

by Kalle Valo

[permalink] [raw]
Subject: Re: [REGRESSION] wifi: brcmfmac: add firmware vendor info in driver info

Hans de Goede <[email protected]> writes:

> On 5/10/23 10:25, Felix wrote:
>> Changes made by the mentioned commit lead to Oops when waking up after
>> suspend to RAM.
>>
>> When waking up a Dell XPS 13 9350 with BCM4350 wifi card after suspend
>> to RAM, the kernel hangs with a NULL pointer dereference and Oops. The
>> issues was introduced by commit
>> da6d9c8ecd00e20218461007948f2b0a8e7fa242 and only happens when the
>> brcmfmac module is loaded. This issue is the reason we could not
>> upgrade to newer kernels than the 6.1 series on the affected machine.
>>
>>
>> Details:
>>
>> On a Dell XPS 13 9350 laptop with Broadcom BCM4350 wifi card (according
>> to lspci), every kernel starting with 6.2 hangs when waking up after
>> suspend to RAM. The issue persisted as of May 2nd (last tested commit
>> was 348551ddaf311c76b01cdcbaf61b6fef06a49144). Passing the debug and
>> no_console_suspend parameters to the kernel show that a NULL pointer
>> dereference and an Oops happen at wakeup. Please find the kernel
>> messages readable on the screen at this point attached
>> (kernel_log_after_suspend.txt).
>>
>> A bisection was successful and produced the first bad commit
>> [da6d9c8ecd00e20218461007948f2b0a8e7fa242] wifi: brcmfmac: add firmware
>> vendor info in driver info
>> I've attached the bisection log as well (bisect.txt).
>>
>> Suspend to RAM works on this machine on newer kernels once the brcmfmac
>> module is unloaded.
>>
>> Distribution: Arch Linux
>> Architecture: x86_64
>> Device: Dell XPS 13 9350 with BCM4350 wifi card
>> Kernel config used at compilation (created using the Arch Linux default
>> config and make olddefconfig):
>> https://gist.githubusercontent.com/maclomhair/e33fa7eece8f8c77e5a88c4eede2f523/raw/429dfb022498c026225865dbb3ab2f75d5030a54/config
>> Dmesg output after boot:
>> https://gist.githubusercontent.com/maclomhair/47c75fa759d93800e7fb5e937fabef3e/raw/10750996a1ea9dcb3fa14d9b94e11fedd3abf280/dmesg
>>
>> #regzbot introduced da6d9c8ecd00e20218461007948f2b0a8e7fa242
>
> Thank you for reporting this and thank you for bisecting it too!
>
> As a result of your excellent bug report I've been able to write
> a fix for this. I'm confident enough in the fix that I've submitted
> it upstream right away.
>
> But it would still be good if you can test the fix and let us know
> if it fixes this issue for you. You should have received a copy
> of the patch when I submitted it upstream.

For the archives here's the patch:

https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

--
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

2023-05-10 13:01:00

by Nimrod MacIomhair

[permalink] [raw]
Subject: Re: [REGRESSION] wifi: brcmfmac: add firmware vendor info in driver info

On Wed, 2023-05-10 at 15:09 +0300, Kalle Valo wrote:
> Hans de Goede <[email protected]> writes:
>
> > On 5/10/23 10:25, Felix wrote:
> > > Changes made by the mentioned commit lead to Oops when waking up after
> > > suspend to RAM.
> > >
> > > When waking up a Dell XPS 13 9350 with BCM4350 wifi card after suspend
> > > to RAM, the kernel hangs with a NULL pointer dereference and Oops. The
> > > issues was introduced by commit
> > > da6d9c8ecd00e20218461007948f2b0a8e7fa242 and only happens when the
> > > brcmfmac module is loaded. This issue is the reason we could not
> > > upgrade to newer kernels than the 6.1 series on the affected machine.
> > >
> > >
> > > Details:
> > >
> > > On a Dell XPS 13 9350 laptop with Broadcom BCM4350 wifi card (according
> > > to lspci), every kernel starting with 6.2 hangs when waking up after
> > > suspend to RAM. The issue persisted as of May 2nd (last tested commit
> > > was 348551ddaf311c76b01cdcbaf61b6fef06a49144). Passing the debug and
> > > no_console_suspend parameters to the kernel show that a NULL pointer
> > > dereference and an Oops happen at wakeup. Please find the kernel
> > > messages readable on the screen at this point attached
> > > (kernel_log_after_suspend.txt).
> > >
> > > A bisection was successful and produced the first bad commit
> > > [da6d9c8ecd00e20218461007948f2b0a8e7fa242] wifi: brcmfmac: add firmware
> > > vendor info in driver info
> > > I've attached the bisection log as well (bisect.txt).
> > >
> > > Suspend to RAM works on this machine on newer kernels once the brcmfmac
> > > module is unloaded.
> > >
> > > Distribution: Arch Linux
> > > Architecture: x86_64
> > > Device: Dell XPS 13 9350 with BCM4350 wifi card
> > > Kernel config used at compilation (created using the Arch Linux default
> > > config and make olddefconfig):
> > > https://gist.githubusercontent.com/maclomhair/e33fa7eece8f8c77e5a88c4eede2f523/raw/429dfb022498c026225865dbb3ab2f75d5030a54/config
> > > Dmesg output after boot:
> > > https://gist.githubusercontent.com/maclomhair/47c75fa759d93800e7fb5e937fabef3e/raw/10750996a1ea9dcb3fa14d9b94e11fedd3abf280/dmesg
> > >
> > > #regzbot introduced da6d9c8ecd00e20218461007948f2b0a8e7fa242
> >
> > Thank you for reporting this and thank you for bisecting it too!
> >
> > As a result of your excellent bug report I've been able to write
> > a fix for this. I'm confident enough in the fix that I've submitted
> > it upstream right away.
> >
> > But it would still be good if you can test the fix and let us know
> > if it fixes this issue for you. You should have received a copy
> > of the patch when I submitted it upstream.

I have now tested the patch you sent and it indeed fixes the issue for
me! Thank you for your quick response!


>
> For the archives here's the patch:
>
> https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
>


2023-05-13 17:39:38

by Nimrod MacIomhair

[permalink] [raw]
Subject: Re: [REGRESSION] wifi: brcmfmac: add firmware vendor info in driver info


On Wed, 2023-05-10 at 14:53 +0200, Felix wrote:
> On Wed, 2023-05-10 at 15:09 +0300, Kalle Valo wrote:
> > Hans de Goede <[email protected]> writes:
> >
> > > On 5/10/23 10:25, Felix wrote:
> > > > Changes made by the mentioned commit lead to Oops when waking up after
> > > > suspend to RAM.
> > > >
> > > > When waking up a Dell XPS 13 9350 with BCM4350 wifi card after suspend
> > > > to RAM, the kernel hangs with a NULL pointer dereference and Oops. The
> > > > issues was introduced by commit
> > > > da6d9c8ecd00e20218461007948f2b0a8e7fa242 and only happens when the
> > > > brcmfmac module is loaded. This issue is the reason we could not
> > > > upgrade to newer kernels than the 6.1 series on the affected machine.
> > > >
> > > >
> > > > Details:
> > > >
> > > > On a Dell XPS 13 9350 laptop with Broadcom BCM4350 wifi card (according
> > > > to lspci), every kernel starting with 6.2 hangs when waking up after
> > > > suspend to RAM. The issue persisted as of May 2nd (last tested commit
> > > > was 348551ddaf311c76b01cdcbaf61b6fef06a49144). Passing the debug and
> > > > no_console_suspend parameters to the kernel show that a NULL pointer
> > > > dereference and an Oops happen at wakeup. Please find the kernel
> > > > messages readable on the screen at this point attached
> > > > (kernel_log_after_suspend.txt).
> > > >
> > > > A bisection was successful and produced the first bad commit
> > > > [da6d9c8ecd00e20218461007948f2b0a8e7fa242] wifi: brcmfmac: add firmware
> > > > vendor info in driver info
> > > > I've attached the bisection log as well (bisect.txt).
> > > >
> > > > Suspend to RAM works on this machine on newer kernels once the brcmfmac
> > > > module is unloaded.
> > > >
> > > > Distribution: Arch Linux
> > > > Architecture: x86_64
> > > > Device: Dell XPS 13 9350 with BCM4350 wifi card
> > > > Kernel config used at compilation (created using the Arch Linux default
> > > > config and make olddefconfig):
> > > > https://gist.githubusercontent.com/maclomhair/e33fa7eece8f8c77e5a88c4eede2f523/raw/429dfb022498c026225865dbb3ab2f75d5030a54/config
> > > > Dmesg output after boot:
> > > > https://gist.githubusercontent.com/maclomhair/47c75fa759d93800e7fb5e937fabef3e/raw/10750996a1ea9dcb3fa14d9b94e11fedd3abf280/dmesg
> > > >
> > > > #regzbot introduced da6d9c8ecd00e20218461007948f2b0a8e7fa242
> > >
> > > Thank you for reporting this and thank you for bisecting it too!
> > >
> > > As a result of your excellent bug report I've been able to write
> > > a fix for this. I'm confident enough in the fix that I've submitted
> > > it upstream right away.
> > >
> > > But it would still be good if you can test the fix and let us know
> > > if it fixes this issue for you. You should have received a copy
> > > of the patch when I submitted it upstream.
>
> I have now tested the patch you sent and it indeed fixes the issue for
> me! Thank you for your quick response!

I have now also tested the second version of the patch, and it also
fixes the issue for me!

>
>
> >
> > For the archives here's the patch:
> >
> > https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
> >
>