2018-06-13 13:28:12

by Michael Büsch

[permalink] [raw]
Subject: Re: b43 crashes on rmmod (bcm4331)

On Wed, 13 Jun 2018 16:07:02 +0300
Wirz <spam-rxbgZ4vWfLhdz0/[email protected]> wrote:

> >>>> CONFIG_B43_HWRNG completely switches off hwrng support in b43.
> >>>> I don't see how a change in hwrng core could still lead to a crash in
> >>>> b43 with this option switched off.
> >>>>
> >>>> What do you mean by "manually in the .config"?
> >>>
> >>> What I meant is, that I have outcommented the line 'CONFIG_B43_HWRNG=y'
> >>> in .config.
> >>>
> >>>> Can you try to properly switch off the setting with make menuconfig and
> >>>> then recompile everything from scratch (make clean)?
> >>>
> >>> I was intending to do that before, but I cannot find the option for
> >>> that. Searching for b43_hwrng in menuconfig only shows the dependencies
> >>> of that option, and the Kconfig file where it is defined, but not the
> >>> path in menuconfig. Do I indirectly set CONFIG_B43_HWRNG through the
> >>> parameters it depends on? I'm sorry, but this is obviously above my
> >>> level of expertise ...
> >>
> >> Whoops, sorry. You are right. This is an automatic config option.
> >> That also means your manual editing of .config would be overridden.
> >>
> >> You can edit drivers/net/wireless/broadcom/b43/Kconfig
> >> go to the section config B43_HWRNG
> >> and change 'default y' to 'default n'
> >>
> >> That should disable it.
> >
> >
> >
> > Could you please also try the attached patch?
> > There seems to be a problem in hwrng core in that it does not disable
> > the current RNG, if the new RNG fails to initialize.
> > I don't know if that's the problem here, though.
>
> Ok. Do I apply your patch to the first version that fails for me, and
> revert my change to Kconfig?


Yes, please test the patch with a version that would otherwise fail.
You can use 4.16 or the latest kernel for that. I created it with latest
linus' version.


--
Michael


Attachments:
(No filename) (833.00 B)
OpenPGP digital signature

2018-06-14 09:47:19

by Wirz

[permalink] [raw]
Subject: Re: b43 crashes on rmmod (bcm4331)


>>>> You can edit drivers/net/wireless/broadcom/b43/Kconfig
>>>> go to the section config B43_HWRNG
>>>> and change 'default y' to 'default n'
>>>>
>>>> That should disable it.
>>>
>>>
>>>
>>> Could you please also try the attached patch?
>>> There seems to be a problem in hwrng core in that it does not disable
>>> the current RNG, if the new RNG fails to initialize.
>>> I don't know if that's the problem here, though.
>>
>> Ok. Do I apply your patch to the first version that fails for me, and
>> revert my change to Kconfig?
>
>
> Yes, please test the patch with a version that would otherwise fail.
> You can use 4.16 or the latest kernel for that. I created it with latest
> linus' version.

I tested both suggested cases. When I disable B43_HWRNG by editing
Kconfig, 'rmmod b43' succeeds in the first version where it previously
failed. When I apply your patch on top of an unmodified 4.16 it also
succeeds.

cheers, lukas

--
Do not believe the naysayers who say it cannot be done.


Attachments:
signature.asc (195.00 B)
OpenPGP digital signature