Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3474581imu; Sun, 11 Nov 2018 15:57:17 -0800 (PST) X-Google-Smtp-Source: AJdET5dSGxW2BfDD5OypXdMC2ScOaOnZAxUVPnSQygTzuDUIsxyqCDoqXbp0h4CC9hQAZRNtmGzh X-Received: by 2002:a17:902:d90c:: with SMTP id c12mr2038466plz.52.1541980636985; Sun, 11 Nov 2018 15:57:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980636; cv=none; d=google.com; s=arc-20160816; b=04Jjb6XlY52dRq2SCy1YB/BTFJLhFha+CY+AoNyb5wxWZlt/bJZds2N6P/MiKOE34N o5uAN9zrlyEyC/6uq9uqOCwGVwiPwDxsEAITSAEQzp91rSIb2cht3k7vskpjgUceNuMI ZrHAvPJ2VBVx1PjxL97IEWKPz77dmFH022UYfXCypyOvXp/xf4a8BjQ1IklqosWJj+71 SZKWY4CwrPw2bQWN9NBgwE4JEhGeve0x+zAaGcIbFVQWoeXzmGaZIyNz+0cTjMg7uLHQ uMvQEousQNRe+U0ZjQJDrcfvmsVggdboiyNaQdu9QY9H+TxsLDvAX+pPsAI0EB30TCUA b3Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+Vl9A/HBZBErOviRWwHwK//sEIEFqBmHOn7D5gVGoTQ=; b=FpTDlJM3uUwUwMu4a84r4r2KKeLbRRb53JdtVGbGzIpBPcGucjwaITdtt0AAlTxzX9 /fq6S2Ajn8fJcW1cWZiyKYGdzqpBSD5uMOveDj3wdj4wADRyuQB36IQ29Egmw51fzOzI aBI1yqd6acMl3tryGvCFqHmvDHMCoehkaRQ5Cn4I3ydDmwRQZ5KOTdtU0XkGnqI7nbQ4 hJ9n9yY/2IyPYDGXHZPcGGI1q4Dw38AAw8RfhS6+8nXtlYV5qtgRBCywsPVn+aVNSGYa OZ4RbdbAi2EyNbxnKFlg2mL45/fgTm783UY5DBbteC9lANq8a3/+gWkWN5epsByYJp1n +I7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H861wqtB; 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 az12-v6si15315219plb.166.2018.11.11.15.57.02; Sun, 11 Nov 2018 15:57:16 -0800 (PST) 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=@kernel.org header.s=default header.b=H861wqtB; 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 S1732657AbeKLISS (ORCPT + 99 others); Mon, 12 Nov 2018 03:18:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:35400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732622AbeKLISQ (ORCPT ); Mon, 12 Nov 2018 03:18:16 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CECAD21508; Sun, 11 Nov 2018 22:28:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975301; bh=tkcqaUFyHNS2oGNzVMWqGXlvaMGyceZGZIAv2e2TqPA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H861wqtBqqgh+XdWmqv69Xjrby3wzdhDDrQ+RWZjMvfQB8e2USmrQBkMu79s3ozel BcA96NWemKmbvXt2UJBkO225+UipNWxCF5MksKFEOUCJtLAnR8Uagqt9TVbaSrnw7h LF3vCAPgbIRzQGBKahmqe3e17Hhh1ag/IcUyqPB4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andreas Kemnade Subject: [PATCH 4.19 262/361] w1: omap-hdq: fix missing bus unregister at removal Date: Sun, 11 Nov 2018 14:20:09 -0800 Message-Id: <20181111221654.070863395@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andreas Kemnade commit a007734618fee1bf35556c04fa498d41d42c7301 upstream. The bus master was not removed after unloading the module or unbinding the driver. That lead to oopses like this [ 127.842987] Unable to handle kernel paging request at virtual address bf01d04c [ 127.850646] pgd = 70e3cd9a [ 127.853698] [bf01d04c] *pgd=8f908811, *pte=00000000, *ppte=00000000 [ 127.860412] Internal error: Oops: 80000007 [#1] PREEMPT SMP ARM [ 127.866668] Modules linked in: bq27xxx_battery overlay [last unloaded: omap_hdq] [ 127.874542] CPU: 0 PID: 1022 Comm: w1_bus_master1 Not tainted 4.19.0-rc4-00001-g2d51da718324 #12 [ 127.883819] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 127.890441] PC is at 0xbf01d04c [ 127.893798] LR is at w1_search_process_cb+0x4c/0xfc [ 127.898956] pc : [] lr : [] psr: a0070013 [ 127.905609] sp : cf885f48 ip : bf01d04c fp : ddf1e11c [ 127.911132] r10: cf8fe040 r9 : c05f8d00 r8 : cf8fe040 [ 127.916656] r7 : 000000f0 r6 : cf8fe02c r5 : cf8fe000 r4 : cf8fe01c [ 127.923553] r3 : c05f8d00 r2 : 000000f0 r1 : cf8fe000 r0 : dde1ef10 [ 127.930450] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 127.938018] Control: 10c5387d Table: 8f8f0019 DAC: 00000051 [ 127.944091] Process w1_bus_master1 (pid: 1022, stack limit = 0x9135699f) [ 127.951171] Stack: (0xcf885f48 to 0xcf886000) [ 127.955810] 5f40: cf8fe000 00000000 cf884000 cf8fe090 000003e8 c05f8d00 [ 127.964477] 5f60: dde5fc34 c05f9700 ddf1e100 ddf1e540 cf884000 cf8fe000 c05f9694 00000000 [ 127.973114] 5f80: dde5fc34 c01499a4 00000000 ddf1e540 c0149874 00000000 00000000 00000000 [ 127.981781] 5fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000 [ 127.990447] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 127.999114] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 128.007781] [] (w1_search_process_cb) from [] (w1_process+0x6c/0x118) [ 128.016479] [] (w1_process) from [] (kthread+0x130/0x148) [ 128.024047] [] (kthread) from [] (ret_from_fork+0x14/0x2c) [ 128.031677] Exception stack(0xcf885fb0 to 0xcf885ff8) [ 128.037017] 5fa0: 00000000 00000000 00000000 00000000 [ 128.045684] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 128.054351] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 128.061340] Code: bad PC value [ 128.064697] ---[ end trace af066e33c0e14119 ]--- Cc: Signed-off-by: Andreas Kemnade Signed-off-by: Greg Kroah-Hartman --- drivers/w1/masters/omap_hdq.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/w1/masters/omap_hdq.c +++ b/drivers/w1/masters/omap_hdq.c @@ -763,6 +763,8 @@ static int omap_hdq_remove(struct platfo /* remove module dependency */ pm_runtime_disable(&pdev->dev); + w1_remove_master_device(&omap_w1_master); + return 0; }