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-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
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
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
.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
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 depe

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 already

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
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, >but on

[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 reso