Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp376028ybr; Fri, 22 May 2020 08:41:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcHYnz3mUv8SLDJKPkZQZT683+8TFZqxmxGeHtjh2VkKk6+TEvkgcA3l4/werozhndPpXc X-Received: by 2002:a17:906:d86:: with SMTP id m6mr9178849eji.434.1590162079023; Fri, 22 May 2020 08:41:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590162079; cv=none; d=google.com; s=arc-20160816; b=SwIGqDRhnMZNRUPvgaAIUgRVnkcKCcJyZ3rzHffpKkC4h1JrKkyV5UniRB37+bpABx Hp5nElBTWlrq4jFWIZLDFYV4oN/zSPNN7I+yX1NDmBrtkkpxJ5P4nCvR8EvOmJTzNlAw ZEFaBDQkdLrT5ytE3WnsYrDH81Tv8wBD6SPrzQ7ufLeCtobr1SEypzu4rnZUz23TcjqC L5u9bCvXirZTQXXgUYlm7Os2rH9jDroMhsIu2srq50h28zHfej7YGWK3frJe/ACm60S/ D67Wyn5DRBKgcCVm6pNPsyaZM7SU/A6fOJzrLhxSpiXh04hhfcPt2TlQFZBwHqoDnS8k lbrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=yZzcpQwJL/kh1WK69miiw7rFXitsdEt1ijc+Xzxc+2Q=; b=rMFDIoxrJCr32DjCJ7fJmsLivT0FbzJ02ZayGrafsQpxFHzjjioL8MpF7Qap3wN9mq lzmNM9jQ9tocELAM/rqu1PxpLaSkJW0fiVOI9byJtD8Fs3NfFXdp92AkZSHfSwRuxnBQ mRhADbXTM8YGoeXnTFiPdWfeMiPtfZ75ErU9vjWkCyqdTfWeOBI1EkyaZPQg+s2mz0ik BYO71xabS6MdmXMOr82cL3PAZoM053BrTY9aA/28g36d12noraDlqiL3T8evFhZc8L5y R8qSViLeKvuLa0ka9xW/MuxOQMNfZqTj48UrXX3cFZX+IZhHKw5UXVTMPxMy0pup64BZ egZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=a7VNhw3l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x26si4819463edv.448.2020.05.22.08.40.56; Fri, 22 May 2020 08:41:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=a7VNhw3l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730702AbgEVPhE (ORCPT + 99 others); Fri, 22 May 2020 11:37:04 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:40048 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730180AbgEVPhE (ORCPT ); Fri, 22 May 2020 11:37:04 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 04MFb17h091540; Fri, 22 May 2020 10:37:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1590161821; bh=yZzcpQwJL/kh1WK69miiw7rFXitsdEt1ijc+Xzxc+2Q=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=a7VNhw3l97Sh/H4i7bgkN/gUVhP82EwGtmf6Su+BFgMvvogdrtjUxd+fteI/X6GPq BUssnJ75DPIlBWeA9+irVDDHoyvyd9yldGoYtKdobhImeiNx+AkSqN+cM0droATrQP VRTAc1tl55TDRoeB7CfNAYxiNYAH+l+NK0imwDMA= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 04MFb157023220 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 22 May 2020 10:37:01 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 22 May 2020 10:37:01 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 22 May 2020 10:37:01 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 04MFb1ke012457; Fri, 22 May 2020 10:37:01 -0500 Date: Fri, 22 May 2020 10:37:01 -0500 From: Bin Liu To: Dinghao Liu CC: , Greg Kroah-Hartman , , Subject: Re: [PATCH] [v3] usb: musb: Fix runtime PM imbalance on error Message-ID: <20200522153701.GD25575@iaqt7> Mail-Followup-To: Bin Liu , Dinghao Liu , kjlu@umn.edu, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200522054235.7944-1-dinghao.liu@zju.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200522054235.7944-1-dinghao.liu@zju.edu.cn> User-Agent: Mutt/1.9.4 (2018-02-28) X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 22, 2020 at 01:42:35PM +0800, Dinghao Liu wrote: > When copy_from_user() returns an error code, there > is a runtime PM usage counter imbalance. > > Fix this by moving copy_from_user() to the beginning > of this function. > > Signed-off-by: Dinghao Liu > --- > > Changelog: > > v2: - Move copy_from_user() to the beginning rather > than adding pm_runtime_put_autosuspend(). > > v3: - Add missing changelog information. Queued for v5.8. Thanks. -Bin.