Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-24 Thread Jarkko Sakkinen
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 >

Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-24 Thread Jarkko Sakkinen
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 >

Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-22 Thread Jarkko Sakkinen
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 >

Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-22 Thread Jarkko Sakkinen
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 >

RE: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-21 Thread Shaikh, Azhar
rnel.org; James Ettle <ja...@ettle.org.uk>; >>> Hans de Goede <hdego...@redhat.com>; Arnd Bergmann ><a...@arndb.de>; >>> Jarkko Sakkinen <jarkko.sakki...@linux.intel.com>; Peter Huewe >>> <peterhu...@gmx.de>; Greg Kroah-Ha

RE: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-21 Thread Shaikh, Azhar
eter Huewe >; Greg Kroah-Hartman >; linux-integr...@vger.kernel.org >Subject: Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O >memory region > >On 12/21/2017 04:39 PM, Shaikh, Azhar wrote: >> HI Javier, >> >> >>> -Original Messa

Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-21 Thread Javier Martinez Canillas
>> Sakkinen <jarkko.sakki...@linux.intel.com>; Peter Huewe >> <peterhu...@gmx.de>; Greg Kroah-Hartman >> <gre...@linuxfoundation.org>; linux-integr...@vger.kernel.org >> Subject: Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O >> memor

Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-21 Thread Javier Martinez Canillas
2017 4:49 AM >> To: Shaikh, Azhar ; Jason Gunthorpe >> >> Cc: linux-kernel@vger.kernel.org; James Ettle ; Hans de >> Goede ; Arnd Bergmann ; Jarkko >> Sakkinen ; Peter Huewe >> ; Greg Kroah-Hartman >> ; linux-integr...@vger.kernel.org >> Subject: Re

RE: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-21 Thread Shaikh, Azhar
x.de>; Greg Kroah-Hartman ><gre...@linuxfoundation.org>; linux-integr...@vger.kernel.org >Subject: Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O >memory region > >Hello Azhar, > >On 12/20/2017 08:15 PM, Shaikh, Azhar wrote: >> >> >>> ---

RE: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-21 Thread Shaikh, Azhar
ger.kernel.org; James Ettle ; Hans de >Goede ; Arnd Bergmann ; Jarkko >Sakkinen ; Peter Huewe >; Greg Kroah-Hartman >; linux-integr...@vger.kernel.org >Subject: Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O >memory region > >Hello Azhar, &

Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-21 Thread Javier Martinez Canillas
<peterhu...@gmx.de>; >> Greg Kroah-Hartman <gre...@linuxfoundation.org>; linux- >> integr...@vger.kernel.org >> Subject: Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O >> memory region >> >> On Wed, Dec 20, 2017 at 07:21:31PM +0100, Javier Ma

Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-21 Thread Javier Martinez Canillas
.org; James Ettle ; Hans de >> Goede ; Shaikh, Azhar ; >> Arnd Bergmann ; Jarkko Sakkinen >> ; Peter Huewe ; >> Greg Kroah-Hartman ; linux- >> integr...@vger.kernel.org >> Subject: Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O >> memory region

RE: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-20 Thread Shaikh, Azhar
ego...@redhat.com>; Shaikh, Azhar <azhar.sha...@intel.com>; >Arnd Bergmann <a...@arndb.de>; Jarkko Sakkinen ><jarkko.sakki...@linux.intel.com>; Peter Huewe <peterhu...@gmx.de>; >Greg Kroah-Hartman <gre...@linuxfoundation.org>; linux- >integr...@vger.kernel.or

RE: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-20 Thread Shaikh, Azhar
eter Huewe ; >Greg Kroah-Hartman ; linux- >integr...@vger.kernel.org >Subject: Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O >memory region > >On Wed, Dec 20, 2017 at 07:21:31PM +0100, Javier Martinez Canillas wrote: > >> > The below draft fixes everyt

Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-20 Thread Jason Gunthorpe
On Wed, Dec 20, 2017 at 07:21:31PM +0100, Javier Martinez Canillas wrote: > > The below draft fixes everything except #1. That needs a more thoughtful > > idea.. > > > > I'll just drop this patch from the series and you can fix all the issues in > the error / driver removal paths. It's not a

Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-20 Thread Jason Gunthorpe
On Wed, Dec 20, 2017 at 07:21:31PM +0100, Javier Martinez Canillas wrote: > > The below draft fixes everything except #1. That needs a more thoughtful > > idea.. > > > > I'll just drop this patch from the series and you can fix all the issues in > the error / driver removal paths. It's not a

Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-20 Thread Javier Martinez Canillas
On 12/20/2017 07:08 PM, Jason Gunthorpe wrote: > 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

Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-20 Thread Javier Martinez Canillas
On 12/20/2017 07:08 PM, Jason Gunthorpe wrote: > 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

Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-20 Thread Jason Gunthorpe
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 >

Re: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-20 Thread Jason Gunthorpe
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 >

RE: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-20 Thread Shaikh, Azhar
uxfoundation.org>; linux-integr...@vger.kernel.org >Subject: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O >memory region > >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 ha

RE: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-20 Thread Shaikh, Azhar
o Sakkinen ; Peter Huewe >; Jason Gunthorpe ; Greg Kroah- >Hartman ; linux-integr...@vger.kernel.org >Subject: [PATCH 1/4] tpm: fix access attempt to an already unmapped I/O >memory region > >The driver maps the I/O memory address to control the LPC bus CLKRUN_EN, >

[PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-20 Thread Javier Martinez Canillas
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

[PATCH 1/4] tpm: fix access attempt to an already unmapped I/O memory region

2017-12-20 Thread Javier Martinez Canillas
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