From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751591AbdLXU6B (ORCPT ); Sun, 24 Dec 2017 15:58:01 -0500 Received: from mga05.intel.com ([192.55.52.43]:14289 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750825AbdLXU55 (ORCPT ); Sun, 24 Dec 2017 15:57:57 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,451,1508828400"; d="scan'208";a="186820961" Date: Sun, 24 Dec 2017 22:57:50 +0200 From: Jarkko Sakkinen To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, James Ettle , Hans de Goede , Azhar Shaikh , Arnd Bergmann , Peter Huewe , Jason Gunthorpe , Greg Kroah-Hartman , linux-integrity@vger.kernel.org Subject: Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region Message-ID: <20171224205750.z25vnk3apew3zuc6@linux.intel.com> References: <20171220113538.16099-1-javierm@redhat.com> <20171220113538.16099-2-javierm@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171220113538.16099-2-javierm@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 20, 2017 at 12:35:35PM +0100, Javier Martinez Canillas wrote: > The driver maps the I/O memory address to control the LPC bus CLKRUN_EN, > but on the error path the memory is accessed by the .clk_enable handler > after this was already unmapped. So only unmap the I/O memory region if > it will not be used anymore. > > Also, the correct thing to do is to cleanup the resources in the inverse > order that were acquired to prevent issues like these. > > Signed-off-by: Javier Martinez Canillas I applied Azhar's updated patches to master and next. Shouldn't this be dropped now? /Jarkko