Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3438043imu; Sun, 11 Nov 2018 15:05:50 -0800 (PST) X-Google-Smtp-Source: AJdET5f1jc8nRcZudQTj5l7zWgW7NV1+7NA6J2tRbENQ4jgcVLWYFvO8Yg1rqEZkGUJyM/Q7/wAh X-Received: by 2002:a17:902:d708:: with SMTP id w8-v6mr17356856ply.72.1541977550902; Sun, 11 Nov 2018 15:05:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977550; cv=none; d=google.com; s=arc-20160816; b=OYi3gcwsWwc2vkZar9wM4Vmq46J82Cl+FXHtPEGKACN9KuIXG6qqNLNxvjh5aG7LXD chfjMAcDyJi+JOHrIKIcj5otWp5LX1CRnKAEZPCRw8Jh238GdlkdpSt+j5pq0dKdiLHz VKqtTRDhQcPbEM9PxesRcntIj5X+5s1JedYVI4J1kmTrPHmnMqLszAt8zisMuAk2eDe0 XMa4ccb9UNNjl30ebLNx/kVjIaZKY9XwKCRxeIhFU+DeupD/BqjS/rn0GL9vvE3WCsqM AT0flqX9gb+E85U7TnSfYEwV0/QwEFzipFji6C/eR0Ucrh4DmnL9hQLStEI+gROn8XeF Edag== 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=5mGV/3FYEFkyCQ4dYtpQjkPGO0TiojZQ9G2YTktomn8=; b=o3eWiRQ6oNFALblKdGpgYjIomJfw+yUJ2VIyznqXHs5M8oXBFcEMbIC4pkkpMfe3b8 9IQdRgqhFjsI0Tz73RDZQZYx0qgwmBZdOr1CwRT4wQCbUQoNok39mZw85sSOGmv1HQnx 0oTIegWkCFX92jmFGG4HFcNrXYbpHgA18xL5BaFagMA1HtDgka2+Eng9iVVJkkpF/bRc Utc8K4Eviog0PLDmpPanCcFKYaTc6Jb4LSNN41GziG1Q6HlMnUoAYRp/mQaibReLZrVs qXs80zr77E+3j/BGzgz/WPao0vPUIvRyhI02bX+cfNxSzObX2VDDTSBMa1i6BFY6Kna7 XQ9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZXkYqaeT; 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 u6si14250737pgl.561.2018.11.11.15.05.36; Sun, 11 Nov 2018 15:05:50 -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=ZXkYqaeT; 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 S2390614AbeKLIyL (ORCPT + 99 others); Mon, 12 Nov 2018 03:54:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:52394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390519AbeKLIWW (ORCPT ); Mon, 12 Nov 2018 03:22:22 -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 D028E21508; Sun, 11 Nov 2018 22:32:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975544; bh=epNk5eUg/AJNRk97uV+Ygp3WVBsBilnOUGzjhDdXRYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZXkYqaeTTWb8HxJdSEFA1uZV63TOWl1TZABilN/8hhv9FW+H+lWnjtGRmind3t21+ ZBGLVRu+LKIW5XS5JhDH2/4i+R6jiK+p5rpbfFqet1sEUfgXdsy8jvieUmus/HGaY/ eRxr8W28JCSoisdZ7iv0vy/tSI57P9e6p16mCkr8= 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.14 075/222] thermal: da9062/61: Prevent hardware access during system suspend Date: Sun, 11 Nov 2018 14:22:52 -0800 Message-Id: <20181111221654.795995745@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@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.14-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; }