From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E994C433EF for ; Wed, 22 Sep 2021 09:05:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 32BA86137A for ; Wed, 22 Sep 2021 09:05:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234225AbhIVJG5 (ORCPT ); Wed, 22 Sep 2021 05:06:57 -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