Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp830763pxb; Wed, 22 Sep 2021 14:03:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyF4x0qmqZsKkcYOVJmI++Pyxn5eJuCgHyA1joFnYbdYONFV+qcLVclhxqeRH2f5UCLvLzb X-Received: by 2002:a02:a608:: with SMTP id c8mr930043jam.130.1632344621664; Wed, 22 Sep 2021 14:03:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632344621; cv=none; d=google.com; s=arc-20160816; b=M9ESIuVzGXQxcHBz3M8eR76Qbzr3HP1MXuTRv+TtGlr7iRpIB0XDScoVQ3JV7TusNC flBmit9soOUZCn6ia9u1dZkcvJ8ok0hQ072xP4idBt1tcYzASHm+TpqYlC2HNN3Jf6cq NmdQM7hDjB6et+s/4d8j069g/28n0C52gXICIvdEb7rh4G2G+2ey1/e5DrisKkgNcpg8 tew6PKpfmcUaJXIyEJiCVUoEFbX5WyVyLJvAdzFsEvy6HaM5AmtFNPPtu5kJOYA7cOFi QBviPlXttq8Dai9ZAGsEX6PhpIqe0yJ5cV6qSUYm02vFToQ6+LDTtMdf29O/RTaVDXwj S3wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ylKR3haDpzx/XGdglUXs0WpV2w2NrT0S4uYZo0ChHV8=; b=Bepp2i4dBpr3iUM8bY1CfbyQOLIoa+V2VKc60elrTUxKEEhrdlowWgWoTZxh1DSQHH ICumI5/vWfkMczv0qhK3DJxLu3+FgL0lXSoICox+CszsEvweQeF4kfsstdDA+QXzEZ15 L+tBPNvpd1ATtdGrWQMWtK2igDrI/kf9Vog7SKbOyFey4odiGXO/A7OQ1CKHgW8+hDZU Tpf8X4rbgiHy0yDYtetXZmntyk1nd5pC9JbGIIi+o1enB6Nicv1+ZaPQWIcc4FRgduzM r0UUJ7F3HTvp/IwnkeqGx/lxq/evBdmWtFALjScUmdWd/vOmF4Tej9zAOfYrfokdlX0m AnqA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d188si4166604iog.62.2021.09.22.14.03.23; Wed, 22 Sep 2021 14:03:41 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237943AbhIVVCO (ORCPT + 99 others); Wed, 22 Sep 2021 17:02:14 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:33094 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237790AbhIVVBz (ORCPT ); Wed, 22 Sep 2021 17:01:55 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 907CD1C0B76; Wed, 22 Sep 2021 23:00:15 +0200 (CEST) Date: Wed, 22 Sep 2021 23:00:15 +0200 From: Pavel Machek To: Greg Kroah-Hartman Cc: Pavel Machek , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Christophe JAILLET , Bartosz Golaszewski , Sasha Levin Subject: Re: [PATCH 5.10 100/122] gpio: mpc8xxx: Fix a potential double iounmap call in mpc8xxx_probe() Message-ID: <20210922210014.GA27285@amd> References: <20210920163915.757887582@linuxfoundation.org> <20210920163919.067590477@linuxfoundation.org> <20210921212526.GA28467@duo.ucw.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > > Commit 76c47d1449fc ("gpio: mpc8xxx: Add ACPI support") has switche= d to a > > > > managed version when dealing with 'mpc8xxx_gc->regs'. So the corres= ponding > > > > 'iounmap()' call in the error handling path and in the remove shoul= d be > > > > removed to avoid a double unmap. > > >=20 > > > This is wrong, AFAICT. 5.10 does not have 76c47d1449fc ("gpio: > > > mpc8xxx: Add ACPI support") so iounmap is still neccessary and this > > > adds a memory leak. > >=20 > > Ah, but then I have to drop 889a1b3f35db ("gpio: mpc8xxx: Use > > 'devm_gpiochip_add_data()' to simplify the code and avoid a leak") from > > the 5.10 queue as it depends on this one. > >=20 > > Can you provide a working backport of that commit so that I can queue up > > the fix? >=20 > Oh nevermind, I fixed it up myself. Thank you! Pavel --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmFLmV4ACgkQMOfwapXb+vKJ2ACgnOxLRd490CMXujD21PrSZCds 8p4An162c860YqMRc2FjSq27t8CxdrF8 =FNDf -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM--