Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752876AbdFMK6a (ORCPT ); Tue, 13 Jun 2017 06:58:30 -0400 Received: from mail-wr0-f177.google.com ([209.85.128.177]:35583 "EHLO mail-wr0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752236AbdFMK63 (ORCPT ); Tue, 13 Jun 2017 06:58:29 -0400 Subject: Re: brcmfmac: Fix kernel oops on resume when request firmware fails. To: Enric Balletbo Serra , Kalle Valo Cc: Enric Balletbo i Serra , "linux-wireless@vger.kernel.org" , brcm80211-dev-list.pdl@broadcom.com, netdev@vger.kernel.org, linux-kernel , Hante Meuleman , Christian Daudt References: <20170523180733.26276-1-enric.balletbo@collabora.com> <20170613055448.C0CD36075B@smtp.codeaurora.org> From: Arend van Spriel Message-ID: <6d327f50-8064-0c09-522e-09ef8732861f@broadcom.com> Date: Tue, 13 Jun 2017 12:58:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1593 Lines: 50 On 13-06-17 12:23, Enric Balletbo Serra wrote: > Hello Kalle, > > 2017-06-13 7:54 GMT+02:00 Kalle Valo : >> Enric Balletbo i Serra 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. >>> >>> Steps to reproduce the problem: >>> - modprobe brcmfmac without the firmware >>> brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac4354-sdio.bin >>> failed with error -2 >>> - do a suspend/resume cycle (echo mem > /sys/power/state) >>> >>> Protect against the NULL pointer derefence by checking if dev_get_drvdata >>> returned a valid pointer. >>> >>> Signed-off-by: Enric Balletbo i Serra >> >> My understanding is that there's a new version of this patch which fixes >> the issue. If not, let me know. >> >> Patch set to Superseded. >> > > Yes there are these patch series [1] that fixes the issue, I guess > Arend is working on a v2 to fix a small issue we found. > > [1] https://www.spinics.net/lists/linux-wireless/msg162762.html That series was actually RFT so not a formal submit. I send out a series yesterday, which indeed has the small issue fixed [2]. Regards, Arend [2] https://patchwork.kernel.org/patch/9780793/ >> -- >> https://patchwork.kernel.org/patch/9743159/ >> >> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches >> > > Regards, > Enric >