Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp67743pxy; Wed, 21 Apr 2021 18:45:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDAgcorYWFT/GsKLpO1Ik3AnuBcNsdbPAsQVibK10YTF54r1ZtdmXJ9uYAt4Mgn3Ph83vd X-Received: by 2002:a17:906:1284:: with SMTP id k4mr676647ejb.409.1619055956167; Wed, 21 Apr 2021 18:45:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619055956; cv=none; d=google.com; s=arc-20160816; b=rWDSCv/z/twWpWJA0CdG5N2ByodDfg7oD+pBbuntvEF6UzO6JtTwTXT76hFG5O/6lj zdrAyq2X47HcDTWJFcTapRdEtrQnocdSJOOCJ0mElqIy0VLMPgq7zjEVZ1lLIcly4fFL oRDg74Oz5xjdT+kMCbLMbnW8Xl0GyHCykGKmQDEj7d3G85kfKhwDMn7W4G+n6DzNwiEX rKFPcTCyAAzg9kl+N0AzdhsYD7TbCCOVT8WZzK7SXtjS3Z9JmMKHK1uhYgveX5czUgA8 5ZZUbTVnw7UFCqBXat3S0N5lQqt7CSjYJuHs7p7P1lWky2JZt3Yi8xJ1ichksZltx7SJ Ex8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=VOsELx8/zIbQ2dtf96PvvjBJ+Z/8FszwrO1Lr+L6+J8=; b=fD6TUFfvQbtJqC1fYqrBHym96Wa7nojwQiDnz/xtrmdSG9BgdRDGd/qn6qmbOGokC1 mjpMMyuer5Rocs6e9VU3FcKKfFWxKHgXKppl7ZX/m111Gz+18ss6paNEaMYiaZFaPgON tGF1UcCKhrL01DoCGv/lnA5bPtP3RaP4/4eXlOPdwi83CI/agV1CtKYymbUYcOslTBPw OZMR8vakblvr9vzis6XSQDF2prMx6zTOoyVywGPwKSovLHO3s5InhIVDEKSKfoatpwFA O04tnkV1FuohK+m7oWEZLJGtZyOHWt+CWRVkWUg9RtBf5JM8zqoY8OYa3BWblxLmcK/H sKAA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c5si862473eds.46.2021.04.21.18.45.33; Wed, 21 Apr 2021 18:45:56 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238960AbhDUQOp (ORCPT + 99 others); Wed, 21 Apr 2021 12:14:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238855AbhDUQOo (ORCPT ); Wed, 21 Apr 2021 12:14:44 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7295C06174A for ; Wed, 21 Apr 2021 09:14:10 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id BE1191F42123 Received: by earth.universe (Postfix, from userid 1000) id A2CCB3C0C96; Wed, 21 Apr 2021 18:14:07 +0200 (CEST) Date: Wed, 21 Apr 2021 18:14:07 +0200 From: Sebastian Reichel To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Kangjie Lu Subject: Re: [PATCH 143/190] Revert "power: twl4030: fix a missing check of return value" Message-ID: <20210421161407.jhcy5gp24z3cko4e@earth.universe> References: <20210421130105.1226686-1-gregkh@linuxfoundation.org> <20210421130105.1226686-144-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iivphz7ibvztyqoa" Content-Disposition: inline In-Reply-To: <20210421130105.1226686-144-gregkh@linuxfoundation.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --iivphz7ibvztyqoa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Apr 21, 2021 at 03:00:18PM +0200, Greg Kroah-Hartman wrote: > This reverts commit 6f12e46eebf1a7d4fdd66df5e815df96b8f8b1b5. >=20 > Commits from @umn.edu addresses have been found to be submitted in "bad > faith" to try to test the kernel community's ability to review "known > malicious" changes. The result of these submissions can be found in a > paper published at the 42nd IEEE Symposium on Security and Privacy > entitled, "Open Source Insecurity: Stealthily Introducing > Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University > of Minnesota) and Kangjie Lu (University of Minnesota). >=20 > Because of this, all submissions from this group must be reverted from > the kernel tree and will need to be re-reviewed again to determine if > they actually are a valid fix. Until that work is complete, remove this > change to ensure that no problems are being introduced into the > codebase. >=20 > Cc: Kangjie Lu > Cc: Sebastian Reichel > Signed-off-by: Greg Kroah-Hartman > --- Doing another review: twl4030 is an I2C connected PMIC, so any read operation can result in -EIO. If this happens 's' will not be initialized, so without handling the error is_charging will be set to an arbitrary state in the following lines. Exiting early from twl4030_bci_get_property is ok and other HW read operation failures in the same function are exiting early with proper error code (as the patch introduced for the only read missing this). TL;DR: original patch is ok, I suggest to drop the revert. -- Sebastian > drivers/power/supply/twl4030_charger.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) >=20 > diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/suppl= y/twl4030_charger.c > index 1bc49b2e12e8..dcbd9f03f31a 100644 > --- a/drivers/power/supply/twl4030_charger.c > +++ b/drivers/power/supply/twl4030_charger.c > @@ -805,9 +805,7 @@ static int twl4030_bci_get_property(struct power_supp= ly *psy, > is_charging =3D state & TWL4030_MSTATEC_AC; > if (!is_charging) { > u8 s; > - ret =3D twl4030_bci_read(TWL4030_BCIMDEN, &s); > - if (ret < 0) > - return ret; > + twl4030_bci_read(TWL4030_BCIMDEN, &s); > if (psy->desc->type =3D=3D POWER_SUPPLY_TYPE_USB) > is_charging =3D s & 1; > else > --=20 > 2.31.1 >=20 --iivphz7ibvztyqoa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmCAT0sACgkQ2O7X88g7 +poeng/+M6yBbDUluiVNPJ+L6a6vmYG/Kg41MrFM4D70m6DHgcNQzTgZS/Tba9xj fRnmlluOftB3VapYAu74JlDyPiWoPbmD/VHlFomKIf84CpUhc5q0bM5k05bNiuSa 828g9iWWO0HG0vy0k34sjyxU0H/Wkv7cibrDahZN1AFmrsOiRtHVOf22gKHgE5SB UXVeisbVSb2vy0QOUd5WbJMAvBawFmioMCNlcgtglSVoX/yppQRr2TR0p0i9RsOA jLujdokqXw3gzmTVk7HwB1rJA0khJiJJSyHsqU1yMq+RhqlL65Rd7NZygfffF5UY JGGd2H7grTFCs6m1H1UJmuILbAIQ/s+iUYBjk59zPjNn4etCrf9UAHYuSv5maktD 64mgKc8k7RmwM5D0s/MiSDmsA5n6iCEwPsn8YkbuuogOFxAQSxyG2XYtejDyJFcr thNgy6XVZHBiRALVaW41Acbgc2LUHljWMDmw9RufVQ8MCBtr/xXzY8k98ICEcH1o DfHP1IrOAebGtM3PSSPhONWJzpGu+xnE8ZeTx5CnzH/fUqQsuApzRE5ZDDmXgFez 6Im0t7dPaa+JSkBqxRu80QIlxGVK6zHQhvPSty3tFxIVrsa8C6Os4X+7L9htojMU KrjrZRqS9XVT0ty6+N0Xv5K86XhxarT3rdgximCeVx5/qyyft9k= =g1Pe -----END PGP SIGNATURE----- --iivphz7ibvztyqoa--