Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3485487imu; Sun, 11 Nov 2018 16:10:21 -0800 (PST) X-Google-Smtp-Source: AJdET5eFlxd1PqMQ7TlXVJavVX9lDRy+VxZ8k7H1eBBdnS0R6VmLhdTMJCsp7711Uuc885N2sX4d X-Received: by 2002:a63:b94c:: with SMTP id v12mr1664260pgo.221.1541981421733; Sun, 11 Nov 2018 16:10:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981421; cv=none; d=google.com; s=arc-20160816; b=NnaOncYhQ/bWv+0nPkEDylPDBRuyTdtQVdAubfQZHMxBXOKWbvex7t2BFOoL2oAKn7 9qR3WcVg+/xARMhJSgjY2kmi8ymftK6kE9QE3sGU3UgeUhuq0ArsnPb6iiAL7hD978Ni LDyIbshvJI8ohn+LnKv+7ZyLT2mCGzS1rOWoGbLlA5tMEDmSU8gIMglF4GJvyTum/BCu gdKlauePF53qGVo0neWcjrr834FnUV7DtLnfbDWvxL2Ok+qDhgB+bXZZiWLdT3HMply5 7qrWpL3etWCrqOKV7hoR+6hnID7g5id9lgrvwn1CspWpBTKNET9qYebI+B4zCZNlkL5h NXCA== 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=nIVsUUxqbXh49hxKy70GR1KOKyWw3nMkB6VxchNXu4Q=; b=p+kJCDWa9j18jKmDtl65fMudUtwd5hD5qIcb++OJRhLpf2GkCgi8DWyecNGgQxHpQ/ /PozXqQN/fBTO4X4JcxJqylBuLgEeuPJH0jPrqnfCXlQBt9JfE2RJNPq49ZmMnpFKCTS ooUvzd4cB9rs40YJNb/bLFB4MTppsiZNHFMJm1r8H3ffZ5tQWoVLbpbioUagetqrm0+S W63jBfgXRhZQnVbHOWfVxlbeM356r7GysGLIIydPGQ38aWzu5rSZaDU8IpecAa7qEM1X L4oC3Qz4akfVCXkD0yFFmTJP2Z9sxjziqTKAaDQ+2iG+IbSjVIC5abbGQU/GFjMMaryX dK5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xdteGCox; 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 m26-v6si16132800pfe.80.2018.11.11.16.10.06; Sun, 11 Nov 2018 16:10:21 -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=xdteGCox; 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 S1731773AbeKLJ67 (ORCPT + 99 others); Mon, 12 Nov 2018 04:58:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:60706 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731012AbeKLIRb (ORCPT ); Mon, 12 Nov 2018 03:17:31 -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 F41D321527; Sun, 11 Nov 2018 22:27:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975256; bh=vCmsWWxVSefIfj2SoIndguSDLHF0CgrMj+cYlxMGRas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xdteGCoxLl0Cnq6fFzNmgFDbVvDp13DZrurL7hgeHUslkhjdXw1Bzm1qSgxiE+6JV +2RCe08qsWKdIcxWdQAcJtIIM+PK5riovy3MGWqizImG6RBakfF7CStBUi+JS67jg0 B5bBNKAR82xXyHHF2olRE4oavwIWkomIW0IRazEE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Steve Twiss , Eduardo Valentin , Sasha Levin Subject: [PATCH 4.19 129/361] thermal: da9062/61: Prevent hardware access during system suspend Date: Sun, 11 Nov 2018 14:17:56 -0800 Message-Id: <20181111221638.317338146@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: Geert Uytterhoeven [ Upstream commit 760eea43f8c6d48684f1f34b8a02fddc1456e849 ] The workqueue used for monitoring the hardware may run while the device is already suspended. Fix this by using the freezable system workqueue instead, cfr. commit 51e20d0e3a60cf46 ("thermal: Prevent polling from happening during system suspend"). Fixes: 608567aac3206ae8 ("thermal: da9062/61: Thermal junction temperature monitoring driver") Signed-off-by: Geert Uytterhoeven Acked-by: Steve Twiss Signed-off-by: Eduardo Valentin Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/thermal/da9062-thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/thermal/da9062-thermal.c +++ b/drivers/thermal/da9062-thermal.c @@ -106,7 +106,7 @@ static void da9062_thermal_poll_on(struc THERMAL_EVENT_UNSPECIFIED); delay = msecs_to_jiffies(thermal->zone->passive_delay); - schedule_delayed_work(&thermal->work, delay); + queue_delayed_work(system_freezable_wq, &thermal->work, delay); return; } @@ -125,7 +125,7 @@ static irqreturn_t da9062_thermal_irq_ha struct da9062_thermal *thermal = data; disable_irq_nosync(thermal->irq); - schedule_delayed_work(&thermal->work, 0); + queue_delayed_work(system_freezable_wq, &thermal->work, 0); return IRQ_HANDLED; }