Message ID | 20200508123049.823407886@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=PqvE=6W=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 202EBC47254 for <stable@archiver.kernel.org>; Fri, 8 May 2020 12:58:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F1FC124965 for <stable@archiver.kernel.org>; Fri, 8 May 2020 12:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588942729; bh=fz6CLdUpCDSaLjd3B3xuSOgy4BelqdfkSdmnrAQkoOY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=yArYHvP40DbNtWsC8/0xyoektaLFu1lDQ/Nc1U3jan/knRN4Dn3Ca8Jaeq6ar/Aqi fPBU7ASI/da59prgw+hAzkDbiSHm98YCuW2HQj6uzphlP6oKooeqYoTNORNyJsYY34 1t4YGD6Lm0THYuWKk9SASfY8+w5aCdVafLtUIchQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730177AbgEHMyN (ORCPT <rfc822;stable@archiver.kernel.org>); Fri, 8 May 2020 08:54:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:36374 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730168AbgEHMyL (ORCPT <rfc822;stable@vger.kernel.org>); Fri, 8 May 2020 08:54:11 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 71B0F24959; Fri, 8 May 2020 12:54:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588942450; bh=fz6CLdUpCDSaLjd3B3xuSOgy4BelqdfkSdmnrAQkoOY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZG+RoErcyKAeBQddOpMwr+BMhJIRQebu5GWIq1e4LP/5uQ5yPtxVjxvdrju4OzMU6 XrhO3vKWcv3fh69RUN64ifXV1R/vq3SZVrG55psDE9zR4gDpwolHZ6n8CNRXLBP/6M crSImXLq5gNns3KvDuIC+IAa8WRNg7a188vusc/Y= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Marek Szyprowski <m.szyprowski@samsung.com>, Chanwoo Choi <cw00.choi@samsung.com>, "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Subject: [PATCH 5.4 50/50] PM / devfreq: Add missing locking while setting suspend_freq Date: Fri, 8 May 2020 14:35:56 +0200 Message-Id: <20200508123049.823407886@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200508123043.085296641@linuxfoundation.org> References: <20200508123043.085296641@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -902,7 +902,9 @@ int devfreq_suspend_device(struct devfre } if (devfreq->suspend_freq) { + mutex_lock(&devfreq->lock); ret = devfreq_set_target(devfreq, devfreq->suspend_freq, 0); + mutex_unlock(&devfreq->lock); if (ret) return ret; } @@ -930,7 +932,9 @@ int devfreq_resume_device(struct devfreq return 0; if (devfreq->resume_freq) { + mutex_lock(&devfreq->lock); ret = devfreq_set_target(devfreq, devfreq->resume_freq, 0); + mutex_unlock(&devfreq->lock); if (ret) return ret; }