2017-06-13 11:36:15

by Arend Van Spriel

[permalink] [raw]
Subject: Re: [for-4.12, 3/3] brcmfmac: unbind all devices upon failure in firmware callback



On 13-06-17 08:12, Kalle Valo wrote:
> Arend Van Spriel <[email protected]> wrote:
>
>> In brcmf_sdio_firmware_callback() we need to unbind the driver from
>> both sdio_func devices.
>>
>> Cc: [email protected] # 4.9.x-
>> Tested-by: Enric Balletbo i Serra <[email protected]>
>> Reviewed-by: Hante Meuleman <[email protected]>
>> Reviewed-by: Pieter-Paul Giesberts <[email protected]>
>> Reviewed-by: Franky Lin <[email protected]>
>> Signed-off-by: Arend van Spriel <[email protected]>
>
> The commit log doesn't really describe the bug you are fixing (ie. doesn't
> answer "why?"). Can you give some more info, logs etc (as a reply to this mail)
> and I'll add it.

Merging with the commit message that Enric wrote:

"""
When request firmware fails, brcmf_ops_sdio_remove is being called and
brcmf_bus freed. In such circumstancies if you do a suspend/resume cycle
the kernel hangs on resume due a NULL pointer dereference in resume
function. So in brcmf_sdio_firmware_callback() we need to unbind the
driver from both sdio_func devices when firmware load failure is indicated.
"""

Regards,
Arend