Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6235390yba; Wed, 1 May 2019 08:25:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDtAQ5c8YK3IyuSFW6MjDSxeAP7fhPue6MQCr2bE/I/Gp6Hrsh5s7TM+K+ABIAFXnNGfjB X-Received: by 2002:a17:902:2e83:: with SMTP id r3mr12924529plb.286.1556724343815; Wed, 01 May 2019 08:25:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556724343; cv=none; d=google.com; s=arc-20160816; b=VxTvAKrTgu0XOA68Xxh44KEQ1P6jIyXat3nlQA9LPE76Dlz1MVuaTIjqgd4oOuiKW8 zvEUERaVjWthBiXYGuAq9+4Hhd6wPkMgXd3that/d4TY729gPEUdXgu8B5GapAdmWCdf omyrNv59gF0ARXMArn//lqezJi6Ywd3OYPqc3/WqvWmnTJKmZyfV5k4tJ7fCd9dIPYxY 9/L9Hbbju8YEs5tgsx1LfmBCb7p3gaEY4rtJdUNbX2LJ8aLO1dp6FxA4rd6h/xtwWZYk sqxsmSP61tVAD+qxdcuXEfbc90RQIsnbxRl/6o2hMDyI2dLvSY8xZDx7sMmU3Yvw3uu3 +/LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:user-agent:cc:to :references:in-reply-to:from:subject:content-transfer-encoding :mime-version:dmarc-filter:dkim-signature:dkim-signature; bh=ybsFfyrJ11XsobWBLf0RtBuwHJjt1EA/0fRQYJvfdD8=; b=flpX2KCaf/xDAHT8yzhsuozxhzsuWWD9ayt6cpFwAUlDMVTCzFlHESfbbD+4z/4t/+ hOJsoF7uqNqMUFQVc2BTcGH2h9LabVEcciLVLcZo57FB1/qBjUOxzKmQmWEySDjVF0+n uEV5JUo9hac56ymTPmtUqlFr9mvwGRikIyn5Cf09OQ2pJ97faWv1tK/IM2mlo9g81qso pdv+5x7JEO/Au3BNZ5WNOfb6u1DsM8wVTr5MCe0Ycf7UDaD9nWKyKwAYzIMMVZSluIDu rP5sSrDhDkGvRezUCRgLcJnIRyBV8clg+RCzFJ4V80JLMUyaoiKhtYZlwhY7lLyqaP0l TdHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=fwE9o9fe; dkim=pass header.i=@codeaurora.org header.s=default header.b=Yc8AOimv; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n85si24958590pfi.288.2019.05.01.08.25.29; Wed, 01 May 2019 08:25:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=fwE9o9fe; dkim=pass header.i=@codeaurora.org header.s=default header.b=Yc8AOimv; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726608AbfEAPXq (ORCPT + 99 others); Wed, 1 May 2019 11:23:46 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:47560 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726555AbfEAPXq (ORCPT ); Wed, 1 May 2019 11:23:46 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 48CF960FEE; Wed, 1 May 2019 15:23:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1556724225; bh=l2WhRhZLGZQr9Ns7eemuc2avdXN2BMxD2MBmuagdNsU=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=fwE9o9feaga+FkHStTK0h1Bf2vqOqoVhFfTnS54r60rYo0FdDBRffdTl8rh1FtaqL D8EVYMka0Lz+YDLV+c4PGN4uzsOPGih182M/ZUQOgdSMfnH9Sbkk8xVAAgLIJNLmSP od0P6+9m4R+dpIGZnq1FOfPwP6wDquK0/2O1JvXA= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MISSING_DATE,MISSING_MID autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id A2E6460F37; Wed, 1 May 2019 15:23:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1556724224; bh=l2WhRhZLGZQr9Ns7eemuc2avdXN2BMxD2MBmuagdNsU=; h=Subject:From:In-Reply-To:References:To:Cc:From; b=Yc8AOimvyNaUDbgUtNeGJBH3sOY3tMtcFRApMtdrezyQrwILXBbfOpldMGKj9NT3r k3lFwnO49McALXtMEyJwNzQfZrsZWODnKQX7tBmxtFmbXCUsbzGoKTbxH6NLypYWs1 Om2xQYOkGoome5Y338TyF3QB8ZLqUXvH/v9mtaio= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A2E6460F37 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH] brcmfmac: change the order of things in brcmf_detach() From: Kalle Valo In-Reply-To: <1556532561-24428-1-git-send-email-arend.vanspriel@broadcom.com> References: <1556532561-24428-1-git-send-email-arend.vanspriel@broadcom.com> To: Arend van Spriel Cc: Piotr Figiel , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , linux-wireless@vger.kernel.org, Arend van Spriel User-Agent: pwcli/0.0.0-git (https://github.com/kvalo/pwcli/) Python/2.7.12 Message-Id: <20190501152345.48CF960FEE@smtp.codeaurora.org> Date: Wed, 1 May 2019 15:23:45 +0000 (UTC) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Arend van Spriel wrote: > When brcmf_detach() from the bus layer upon rmmod we can no longer > communicate. Hence we will set the bus state to DOWN and cleanup > the event and protocol layer. The network interfaces need to be > deleted before brcmf_cfg80211_detach() because the latter does the > wiphy_unregister() which issues a warning if there are still network > devices linked to the wiphy instance. > > This change solves a null pointer dereference issue which happened > upon issueing rmmod while there are packets queued in bus protocol > layer. > > Reported-by: Rafał Miłecki > Reviewed-by: Hante Meuleman > Reviewed-by: Pieter-Paul Giesberts > Reviewed-by: Franky Lin > Signed-off-by: Arend van Spriel Marked RFC as requested, please resend once this is ready to be applied. Patch set to RFC. -- https://patchwork.kernel.org/patch/10922029/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches