Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2160129imm; Mon, 28 May 2018 02:55:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrdH1j5CA6vUjpYMUH/j6ZBUmcmvqlvTf9dfSBMikMoVI7BvW1rgRhRIulJcTVfZ7QkcWMW X-Received: by 2002:a17:902:c5:: with SMTP id a63-v6mr13039266pla.149.1527501309319; Mon, 28 May 2018 02:55:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527501309; cv=none; d=google.com; s=arc-20160816; b=KpQCFOUomgQpB3/YzWvs4dkeq0DrN2tD9+9LNbvMdzGBWnXfKWGmIeTK79iXLEe9gb Az8iJBMd6Mv3/zOS92SoKoNjODWri6tvTqILUknNLa/Cqq0tHuUo9qcK7peMUjvGN7Ff sXJaudSjEm+mOR5VlbqEUxMPdPnf8KsvLpm3LSxR9wSc8PM7DyXjpgITQnla1McMcf2b rkAtoE06JDYXPhbtQ7GfCAYi6v0EtI7OU9Pxc3CdRN+/WzVvTBw/tA/Hu/LhpIT3c1c0 axhN0iOvbdaLuJ/HkFUz/VdlazRKqFZMmgmRIS8+HuGNAAFQNRrWKDN9WfuDaeybr88n 6Sqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=wsqunjb7ObAMzdgyaekgInaCUjuheIArspDnd1z/Dic=; b=c+vCTYvGSQ6SJvm7ukCOAQ8EX/YYswO24f1aCm7YlIZT9bpR3iDEniJjhHCr7ghWIB WMN1VD1bXaOhNkYEX5UrkKM0e4gUPbcyNGzfKZmz7BfZfo2fDv8SIF37+Yk2r9oU5dd5 8MAgehHD32HZYVT49dmPz7aR2UrYDYS8kCd4SENB2hY+Nqn6xf89ujIbNy0EzRQ9jg36 qOG2Vk89BVEShpae2JXEG3yUKAXF1blo3nLO+EEFHs1t+1jT0OuPHsnU6MsWLmi1c4Cu LFTKGk5B48agCvSbXpYRN/mE/rSiitu5ncm8LTBnAlEERpgqfS7Gud09VPR7MwJN2VXx KNcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rCq91FWj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 h8-v6si30139603pfi.115.2018.05.28.02.54.54; Mon, 28 May 2018 02:55:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@amarulasolutions.com header.s=google header.b=rCq91FWj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754484AbeE1Jyg (ORCPT + 99 others); Mon, 28 May 2018 05:54:36 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:55903 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754444AbeE1Jyd (ORCPT ); Mon, 28 May 2018 05:54:33 -0400 Received: by mail-wm0-f66.google.com with SMTP id a8-v6so30550625wmg.5 for ; Mon, 28 May 2018 02:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=wsqunjb7ObAMzdgyaekgInaCUjuheIArspDnd1z/Dic=; b=rCq91FWjEcLkedqbbYotVFBr6P1nO6p0Nd91QPcPvmPk+Aq26h/ufWm4kNw7YDXZKm siu4cjH1Ycx9Z0aWPUbYC7tYexgXLcvFZgXs2+/AKasuTmMRZwXIb+j4bROCBI8QhGOf MQId1KFzuLEcQyjSpIIKIEGOTKEVMzBKYnsJk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wsqunjb7ObAMzdgyaekgInaCUjuheIArspDnd1z/Dic=; b=oJRYGqf+AyDI6KCx1P1a5ln4kMYlXN+ZFjBfn5mHyw01k8KUral+6da6jXf0GNp63F S980jDurJEom+c63hZ9LbXf/iqaF6Oqm6Cc+e/CZkEjP/q9Zgh6K7c+fi7eVSzHKgmVJ iKhhWQkaIPNdG7Off2StD0Bb8uRCQdGVzrpNG9lbrQ7yg3zU0WThwNrfX0J6GCL3S30z mZ5hDpJTK1cKrT/w9d6zKGEfX0uEUG4o/D4NeqrJSLrcf3TY2ciNX921jtAnUegryszs qJYBWHQDOgJuuYsIg4f+S9NfhRB+QN3XPvS6/GQQTYBAKCGlaswcfrN2exG2J8DwP+Wn R/xg== X-Gm-Message-State: ALKqPwf39/s42wcgtNiUbQ4Qi6yistRKBTA+c88koyvCCE2c4yPq2e2C vrS3uEJKvdBM88w3ADceI0pJwNavEPwplRQ0+NY4cg== X-Received: by 2002:a1c:8851:: with SMTP id k78-v6mr7313841wmd.99.1527501271952; Mon, 28 May 2018 02:54:31 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:8684:0:0:0:0:0 with HTTP; Mon, 28 May 2018 02:54:31 -0700 (PDT) In-Reply-To: <5B0BD13D.8000809@broadcom.com> References: <1527493857-2220-1-git-send-email-michael@amarulasolutions.com> <5B0BD13D.8000809@broadcom.com> From: Michael Nazzareno Trimarchi Date: Mon, 28 May 2018 11:54:31 +0200 Message-ID: Subject: Re: [PATCH] brcmfmac: stop watchdog before detach and free everything To: Arend van Spriel Cc: Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Kalle Valo , "David S. Miller" , Pieter-Paul Giesberts , Ian Molton , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, netdev@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arend On Mon, May 28, 2018 at 11:51 AM, Arend van Spriel wrote: > On 5/28/2018 9:50 AM, Michael Trimarchi wrote: >> >> Watchdog need to be stopped in brcmf_sdio_remove to avoid >> i >> The system is going down NOW! >> [ 1348.110759] Unable to handle kernel NULL pointer dereference at virtual >> address 000002f8 >> Sent SIGTERM to all processes >> [ 1348.121412] Mem abort info: >> [ 1348.126962] ESR = 0x96000004 >> [ 1348.130023] Exception class = DABT (current EL), IL = 32 bits >> [ 1348.135948] SET = 0, FnV = 0 >> [ 1348.138997] EA = 0, S1PTW = 0 >> [ 1348.142154] Data abort info: >> [ 1348.145045] ISV = 0, ISS = 0x00000004 >> [ 1348.148884] CM = 0, WnR = 0 >> [ 1348.151861] user pgtable: 4k pages, 48-bit VAs, pgdp = (____ptrval____) >> [ 1348.158475] [00000000000002f8] pgd=0000000000000000 >> [ 1348.163364] Internal error: Oops: 96000004 [#1] PREEMPT SMP >> [ 1348.168927] Modules linked in: ipv6 >> [ 1348.172421] CPU: 3 PID: 1421 Comm: brcmf_wdog/mmc0 Not tainted >> 4.17.0-rc5-next-20180517 #18 >> [ 1348.180757] Hardware name: Amarula A64-Relic (DT) >> [ 1348.185455] pstate: 60000005 (nZCv daif -PAN -UAO) >> [ 1348.190251] pc : brcmf_sdiod_freezer_count+0x0/0x20 >> [ 1348.195124] lr : brcmf_sdio_watchdog_thread+0x64/0x290 > > > Hi Michael, > > Thanks for the patch. In normal scenario the callstack looks like this: > > brcmf_sdio_remove() > -> brcmf_detach() > -> brcmf_bus_stop() > -> brcmf_sdio_bus_stop() > > In brcmf_sdio_bus_stop() the watchdog is terminated. So in what scenario did > you encounter this null pointer deref? Is this happen even when there is not wifi firmware? boot without any firmware in the filesystem and then trigger a reboot Michael > > Regards, > Arend -- | Michael Nazzareno Trimarchi Amarula Solutions BV | | COO - Founder Cruquiuskade 47 | | +31(0)851119172 Amsterdam 1018 AM NL | | [`as] http://www.amarulasolutions.com |