Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp287487pxb; Wed, 22 Sep 2021 02:07:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8RZ+XMyXjXfz31pz5YZy/XV3JxkSTl9NWfbqLKpPG5ZVvWnFcfsTD0eXPHfmF6/6fM5IK X-Received: by 2002:a17:906:228d:: with SMTP id p13mr19045022eja.526.1632301633053; Wed, 22 Sep 2021 02:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632301633; cv=none; d=google.com; s=arc-20160816; b=T39122MP9A45ptWlepPLPuMK9zhRX5HXCONpHSU7+htJQFwwPp1u2A3QURAmWieMhq NAUtKSN5LO8h38ZMd/y62PymQ6IHDSzbQScV+viPNw1a1oeZlVI5OtrA/25CFAmhjECb DItBkrGyc+Fa7Kk1oDKcg6N0tSYg8SVw/BJYnfHvF2h7nqO466eW//lv7lZS5bx4DCUh Z3n05DNP7yv6CoXOiGP1FoYeuBWNslECBofPjJ1Ut7Z3KQ1Nat+mHxcgbp6dCX/4gPhU NA3qJFGbnSVCkJe2sgzSS0ahhvDlKp+sbobnjQ2/i3pQ58XOWBWVvgagfA4PEF0B9jlL R2YA== 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=44ElukPdw4HXgsXa+jVNr6iVBNP2k4lK/46WAdznC1U=; b=Ax6nli8srGFvHmXBvFaWBYrvj7jGmTbGroiErun9fBWzx/VZg3eOeu97pdgdYFMrpB zBfBseWFqaxcTCeMTrSGsxiVuG7ITcKcJVYLK2seOOqSmQ45KC+l9zjhJQ2A10PzTtE7 ZkeENsIpJKLQ9kRVd6sjrZgl8yFh3XbmDPPacNYzaGkJH7ry5RfgvVWDgHEEJW6juWaX gkAgCiiQLYLMy/Rs7qbBk446uYa/wKE/pHy4MynxIj6WMBzknPZiv0Cxx8CX/C0PTL3Y XLN6mbVQfj/XivNWWe17ztMrgrn7G3lN9MbpAtg9Dww+IrgwhZofqx2hE/ELHwSdMj2i UQHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wsyIPmuq; 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 w3si1922302edi.35.2021.09.22.02.06.49; Wed, 22 Sep 2021 02:07:13 -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=wsyIPmuq; 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 S234213AbhIVJGz (ORCPT + 99 others); Wed, 22 Sep 2021 05:06:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:40952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234203AbhIVJGv (ORCPT ); Wed, 22 Sep 2021 05:06:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BFB9A6120F; Wed, 22 Sep 2021 09:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632301521; bh=i1ZuVgR89V/t0znAa7boPt9g0yKj5SY8/b+8mOxQl04=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wsyIPmuq4FSFusXHdeozGXEJQX/1ejqkHJUekyUuz9tx7To65bJn9EHzTWxepzJHt wampQOzkhuWHBLj2JRDGWx0QM8ekKRzGqfgyTokSnAQ8vATQHgGbgDG94SSmjYe6no ++7YD1LWb7xGtrqUKfohvg1daRv8nyp+cFZhv7Sc= Date: Wed, 22 Sep 2021 11:05:19 +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: <20210921212526.GA28467@duo.ucw.cz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? thanks, greg k-h