Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1454627ybt; Mon, 15 Jun 2020 00:09:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdPb7K4BrbjpUTTUVCeMjtSv75115JvwPEJ9Fzs1uDXTM1xiDnYjlA8fMmjRXeReuGg/iR X-Received: by 2002:a17:906:4c46:: with SMTP id d6mr23686878ejw.503.1592204951294; Mon, 15 Jun 2020 00:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592204951; cv=none; d=google.com; s=arc-20160816; b=u/iMHLr9nHBOUaH0jItWwDHR8I1+UxjwS/aeB/xpys6k3zNG3OCcUN7c03Kr32gEJN 6dxdtWbqF+nvQNhU329vFRdYhLOBFejXEw8aDPRTCccl+ZOn1Jc378VBALRPgJcUbPTO HV7WZG7DktB7UKqJVczc3rNZ3Z2x4kCGOXEcv6QDY/qvQNpodAeaON0T8IbEXx2VnDyW mPO3+kPI8Irp7P1XpsBAgRAjTnXm02gHIGdHKJB3GU/h0Wz4H95sRXJxtMif6IFQKW37 Bk3q3F2LcAzXMl1oURYqIdH25nSsOleJv9bqDjPi7qbyuTbOKfmC39BteTRQMdCEN3Ut 44SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=6psTtzAfbsjDtbI/z29o3KFAc048XX2lv+HUU1uNcQI=; b=Afob6f2E3vE9YqojSQQm/oEtABPSVlr6sHOKULBhJh5N9+4KMEc5rDmMgCBHFAKI0u S7451q0RC2Pifb7dIywRshUEdxWcet3bpF2qWA5urItrXEZigSPe1vbpm33yE8ELsSUt FPvd8DfJY8cz/MC4V+6MHDadj0LN860d0OpzuTLnt6jrUenkc5M+H2baHjBqY1ldpvEF YCoUjs8+mcEPugxFh51llozaQrccFcTxBOQOcI4BvGoEehspZ83rd+sMMrfArzXPk5VZ eDKXDMLPHpAiH55zSFZqZ3C89kvvJ0/bnHyyQ/JzvSRYy4hMmJbfM63YyfA2iJhZucek VSBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=s3l13uj1; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c11si8703490edk.514.2020.06.15.00.08.49; Mon, 15 Jun 2020 00:09:11 -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=@kernel.org header.s=default header.b=s3l13uj1; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728380AbgFOHGv (ORCPT + 99 others); Mon, 15 Jun 2020 03:06:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:51462 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728180AbgFOHGu (ORCPT ); Mon, 15 Jun 2020 03:06:50 -0400 Received: from localhost (p54b333b6.dip0.t-ipconnect.de [84.179.51.182]) (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 653CC20707; Mon, 15 Jun 2020 07:06:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592204809; bh=6psTtzAfbsjDtbI/z29o3KFAc048XX2lv+HUU1uNcQI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=s3l13uj1XZS1WBdldnJCn3f5+SFeLOaZ8S1ea0UTQV/itoVqOoLHakP1OBqipHKlT sPbxkdBLH7WrB7A3vmIjKHSsrQonpoiQAYD78eiT5aA4ueabO2TmSvlQdxSbLCqzFO JyL5apU3ar9zjYz97ZdT+L6tCtWhGBOqVbCMHk+8= Date: Mon, 15 Jun 2020 09:06:47 +0200 From: Wolfram Sang To: Aisheng Dong Cc: Andy Duan , "wu000273@umn.edu" , "kjlu@umn.edu" , Ulf Hansson , "rjw@rjwysocki.net" , "khilman@kernel.org" , "linux-pm@vger.kernel.org" , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , dl-linux-imx , "linux-i2c@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] i2c: busses: Fix a reference count leak. Message-ID: <20200615070647.GB1497@kunai> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="p4qYPpj5QlsIQJ0K" Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --p4qYPpj5QlsIQJ0K Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 15, 2020 at 06:31:28AM +0000, Aisheng Dong wrote: > > From: Andy Duan > > Sent: Monday, June 15, 2020 10:49 AM > > > > From: wu000273@umn.edu Sent: Sunday, June 14, > > 2020 6:12 AM > > > From: Qiushi Wu > > > > > > pm_runtime_get_sync() increments the runtime PM usage counter even > > > when it returns an error code. Thus call pm_runtime_put_noidle() if > > > pm_runtime_get_sync() fails. > > > > > > Fixes: 13d6eb20fc79 ("i2c: imx-lpi2c: add runtime pm support") > > > Signed-off-by: Qiushi Wu > >=20 > > Again, which case can trigger the issue ? >=20 > It's just error handling improvement because pm_runtime_get_sync() will i= ncrease the > reference count even it's failed. >=20 > I wonder if such de-reference can be better handled by pm runtime core co= de. > Copy pm guys to comment. I started a seperate thread: https://lkml.org/lkml/2020/6/14/76 Still, on-going discussion if the proper fix is to remove the error check. --p4qYPpj5QlsIQJ0K Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl7nHgcACgkQFA3kzBSg KbZY1A//fhA+SLIYCIw1oxbGkvOuAJdvlyjRz1RH5ItN+G7xbJEp/zkTPn0fYa2u /T4qRUqlIQlS2ybcthqwxLGhmD2rbEkGxTq1gOvYilWCfREU+E0I/GhmfoxAWO8s mIb3advwOJybe6/UHP1kGAllVDd2f60UKDGDaqhMQX8ilCPAE0e+9i3dmm+rTF70 y7U99kq1jV4eGRggiZUvQUOyl2xjxwYi4sOz29/X/B0WILHmmOLAVsgAxY0l1+tF +nXAFQySpYB1JV/sXSxbM+1IrA7uWvu83lbyn8lghooz7bDjbWXQ7FecF2oGKH3v FW5iRAk3puNzGA6RMckqiMM3SGlV+Y3hOhhbFLihh+E+P814LgxN2y2qUjH7TWQP 40Cah28Zex8p1Dfip9p9bmoUlhtuEiCSCE18v7UKTUcBgLzXiEp/oI9qkP05zA+F R3p37IWGv32TQUR5tOTykeO3tTNI0Bkn/nCaV9/7Rhfku7CN3CRrMtmGyVI/048C wp1+MCaI9V2yGO33NQfT9CdYjDqBaZi+YdmvyzGC7CUm2Qe+Puqcmei9uk7VKz3U OPQ+XeeQF2YTVGOB/8HBc7q0G7q/eapYueKqv/e2RTQOk0fRoNGS6WNiWdL8X4R3 Pre8u39yAQg3uu+0Ei/7QmRizjVxt5BrsU+jw441VNdV5E7wKpA= =GS0g -----END PGP SIGNATURE----- --p4qYPpj5QlsIQJ0K--