Re: spi: Add call to spi_slave_abort() function when spidev driver is released

2019-10-07 Thread Mark Brown
On Fri, Sep 27, 2019 at 12:38:49AM +0200, Lukasz Majewski wrote: > Maybe, it would be sufficient for now to move the spi_slave_abort() in > spi_release() before we decrease (spidev->users--) the use count? I think that should be OK, or possibly safer to do it at the start of the if

Re: spi: Add call to spi_slave_abort() function when spidev driver is released

2019-09-26 Thread Lukasz Majewski
Hi Mark, Geert, > On Thu, Sep 26, 2019 at 04:06:45PM +0200, Lukasz Majewski wrote: > > > On Thu, Sep 26, 2019 at 2:49 PM Lukasz Majewski > > > wrote: > > > > > The question is if we shall call the spi_slave_abort() when > > > > cleaning up spi after releasing last reference, or each time > >

Re: spi: Add call to spi_slave_abort() function when spidev driver is released

2019-09-26 Thread Mark Brown
On Thu, Sep 26, 2019 at 04:06:45PM +0200, Lukasz Majewski wrote: > > On Thu, Sep 26, 2019 at 2:49 PM Lukasz Majewski wrote: > > > The question is if we shall call the spi_slave_abort() when > > > cleaning up spi after releasing last reference, or each time > > > release callback is called ? >

Re: spi: Add call to spi_slave_abort() function when spidev driver is released

2019-09-26 Thread Lukasz Majewski
Hi Geert, > Hi Lukasz, > > On Thu, Sep 26, 2019 at 2:49 PM Lukasz Majewski wrote: > > > On Thu, Sep 26, 2019 at 12:14 PM Lukasz Majewski > > > wrote: > > > > > Static analysis with Coverity has detected an potential > > > > > dereference of a free'd object with commit: > > > > > > > > > >

Re: spi: Add call to spi_slave_abort() function when spidev driver is released

2019-09-26 Thread Geert Uytterhoeven
Hi Lukasz, On Thu, Sep 26, 2019 at 2:49 PM Lukasz Majewski wrote: > > On Thu, Sep 26, 2019 at 12:14 PM Lukasz Majewski > > wrote: > > > > Static analysis with Coverity has detected an potential > > > > dereference of a free'd object with commit: > > > > > > > > commit

Re: spi: Add call to spi_slave_abort() function when spidev driver is released

2019-09-26 Thread Lukasz Majewski
Hi Geert, > Hi Lukasz, > > On Thu, Sep 26, 2019 at 12:14 PM Lukasz Majewski > wrote: > > > Static analysis with Coverity has detected an potential > > > dereference of a free'd object with commit: > > > > > > commit 9f918a728cf86b2757b6a7025e1f46824bfe3155 > > > Author: Lukasz Majewski > > >

Re: spi: Add call to spi_slave_abort() function when spidev driver is released

2019-09-26 Thread Geert Uytterhoeven
Hi Lukasz, On Thu, Sep 26, 2019 at 12:14 PM Lukasz Majewski wrote: > > Static analysis with Coverity has detected an potential dereference > > of a free'd object with commit: > > > > commit 9f918a728cf86b2757b6a7025e1f46824bfe3155 > > Author: Lukasz Majewski > > Date: Wed Sep 25 11:11:42 2019

Re: spi: Add call to spi_slave_abort() function when spidev driver is released

2019-09-26 Thread Colin Ian King
On 26/09/2019 11:14, Lukasz Majewski wrote: > Hi Colin, > >> Hi, >> >> Static analysis with Coverity has detected an potential dereference >> of a free'd object with commit: >> >> commit 9f918a728cf86b2757b6a7025e1f46824bfe3155 >> Author: Lukasz Majewski >> Date: Wed Sep 25 11:11:42 2019 +0200

Re: spi: Add call to spi_slave_abort() function when spidev driver is released

2019-09-26 Thread Lukasz Majewski
Hi Colin, > Hi, > > Static analysis with Coverity has detected an potential dereference > of a free'd object with commit: > > commit 9f918a728cf86b2757b6a7025e1f46824bfe3155 > Author: Lukasz Majewski > Date: Wed Sep 25 11:11:42 2019 +0200 > > spi: Add call to spi_slave_abort() function

re: spi: Add call to spi_slave_abort() function when spidev driver is released

2019-09-26 Thread Colin Ian King
Hi, Static analysis with Coverity has detected an potential dereference of a free'd object with commit: commit 9f918a728cf86b2757b6a7025e1f46824bfe3155 Author: Lukasz Majewski Date: Wed Sep 25 11:11:42 2019 +0200 spi: Add call to spi_slave_abort() function when spidev driver is released