Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp289630pxb; Wed, 22 Sep 2021 02:10:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvRYLIxRIFOspv96yJkdEP3EHec63JQReGqbH04kdJhuEEE5+J2YV/sPUlZBNSL3wt/avD X-Received: by 2002:a50:cf87:: with SMTP id h7mr14392923edk.330.1632301844210; Wed, 22 Sep 2021 02:10:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632301844; cv=none; d=google.com; s=arc-20160816; b=IrBkTyi2z0aqBhYtj0TAcgTnPlelpR13fZw2PmKVX1ImPF8jDN6BOm3llY1zO8VYXH bWXJRRGv70e6LcjyVK6X1VJkZXdn+xf0+ruc2Z/B7TY6swZDtVheu1pEsCweP9Mjd4Hg QGAUJh+bbqmLDo++4bsljA+/At2762txTShX00kF3+1uhwV//FD1P504KVL4y5gA/iKB OmBIbt62OoII63ysx4Ffc7zUFjd6mSuGC4fInrnbmAZReFkoREHAgGAuEFbUNTjYQRVc zqqeAmt6jQdZuES1P/rBCqefY8Tyv8zrji6C89s07YZ8eqSi1+X//IsimxsBV+pivEM4 9wQA== 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:dkim-signature; bh=au94x7YFsFOjptYPkO0jlIo3odXtbWPZhAz1h4NxRgY=; b=Ylq5NbLldxyDznnVp9RzClBJhl14KLs5ghjgPoZd+88MdowStKqaZFONFT2qv+eNmz ghJU/+TKx4Wy2qE2uebShoMEdjEXzS+nKSKqWiHwatDvtvNOAJh97vEg115GUSPw0My8 NnbdnrWaGZg2dfcZhY4OHgBEYQ3YnMKMxvzMfq/Omnp9NaiuW6jWeKOxZFdF08vbcZit 19jfSY2aC1R0AqO+kMyjTCEcig91Nj7uZjEZGLhTWvsS8yewvYi9Dfe/K2KPTgL09Kwo OHoifklktFY/aUKdKRJFkjhCL29SWGWF7NOXJvBbc1/CI2+xsdasns+H3KLBU4Fro+Qd k0XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=x5Cl62H0; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l24si1856017edv.231.2021.09.22.02.10.19; Wed, 22 Sep 2021 02:10:44 -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=@linuxfoundation.org header.s=korg header.b=x5Cl62H0; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234144AbhIVJIE (ORCPT + 99 others); Wed, 22 Sep 2021 05:08:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:41284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234059AbhIVJH7 (ORCPT ); Wed, 22 Sep 2021 05:07:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A91846137B; Wed, 22 Sep 2021 09:06:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632301590; bh=PmoI3qb9RefaDlrfo61jjLqF6GxCoCfoWkUsp5WGMUI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=x5Cl62H0bQTXibTROB6I8UFjNfjrUsvDa24fheVuClvVLZ+kdUAH64ZbG7s0bjn9J C/HyyF5wpLG0T7oBHENBxJsoVO/jKKo82Ywwq0uaHGfRNvUeL0QFEyIgcJn1TSdFc7 NmjLj3832SdblbUIszCzB4aIQ/FvxCB/ki5czlK4= Date: Wed, 22 Sep 2021 11:06:27 +0200 From: Greg Kroah-Hartman To: Pavel Machek Cc: 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: References: <20210920163915.757887582@linuxfoundation.org> <20210920163919.067590477@linuxfoundation.org> <20210921212526.GA28467@duo.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 22, 2021 at 11:05:19AM +0200, Greg Kroah-Hartman wrote: > On Tue, Sep 21, 2021 at 11:25:26PM +0200, Pavel Machek wrote: > > Hi! > > > > > [ Upstream commit 7d6588931ccd4c09e70a08175cf2e0cf7fc3b869 ] > > > > > > Commit 76c47d1449fc ("gpio: mpc8xxx: Add ACPI support") has switched to a > > > managed version when dealing with 'mpc8xxx_gc->regs'. So the corresponding > > > 'iounmap()' call in the error handling path and in the remove should be > > > removed to avoid a double unmap. > > > > 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. > > 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. > > Can you provide a working backport of that commit so that I can queue up > the fix? Oh nevermind, I fixed it up myself. greg k-h