Re: [U-Boot] [PATCH v3 11/11] mtd: sf: Make sf_mtd.c more robust

2018-11-27 Thread Jagan Teki
On Tue, Nov 27, 2018 at 6:06 PM Boris Brezillon wrote: > > On Mon, 26 Nov 2018 14:25:44 +0100 > Miquel Raynal wrote: > > > Hi Jagan, > > > > Jagan Teki wrote on Mon, 26 Nov 2018 18:35:01 > > +0530: > > > > > On 26/11/18 6:12 PM, Boris Brezillon wrote: > > > > On Mon, 26 Nov 2018 13:37:46 +0100 >

Re: [U-Boot] [PATCH v3 11/11] mtd: sf: Make sf_mtd.c more robust

2018-11-27 Thread Boris Brezillon
On Mon, 26 Nov 2018 14:25:44 +0100 Miquel Raynal wrote: > Hi Jagan, > > Jagan Teki wrote on Mon, 26 Nov 2018 18:35:01 > +0530: > > > On 26/11/18 6:12 PM, Boris Brezillon wrote: > > > On Mon, 26 Nov 2018 13:37:46 +0100 > > > Boris Brezillon wrote: > > > > > >> On Mon, 26 Nov 2018 16:42:48

Re: [U-Boot] [PATCH v3 11/11] mtd: sf: Make sf_mtd.c more robust

2018-11-26 Thread Miquel Raynal
Hi Jagan, Jagan Teki wrote on Mon, 26 Nov 2018 18:35:01 +0530: > On 26/11/18 6:12 PM, Boris Brezillon wrote: > > On Mon, 26 Nov 2018 13:37:46 +0100 > > Boris Brezillon wrote: > > > >> On Mon, 26 Nov 2018 16:42:48 +0530 > >> Jagan Teki wrote: > >> > >>> On 26/11/18 2:12 PM, Boris Brezillon wro

Re: [U-Boot] [PATCH v3 11/11] mtd: sf: Make sf_mtd.c more robust

2018-11-26 Thread Jagan Teki
On 26/11/18 6:12 PM, Boris Brezillon wrote: On Mon, 26 Nov 2018 13:37:46 +0100 Boris Brezillon wrote: On Mon, 26 Nov 2018 16:42:48 +0530 Jagan Teki wrote: On 26/11/18 2:12 PM, Boris Brezillon wrote: Hi Jagan, On Thu, 22 Nov 2018 09:40:56 +0100 Boris Brezillon wrote: + /* +

Re: [U-Boot] [PATCH v3 11/11] mtd: sf: Make sf_mtd.c more robust

2018-11-26 Thread Boris Brezillon
On Mon, 26 Nov 2018 13:37:46 +0100 Boris Brezillon wrote: > On Mon, 26 Nov 2018 16:42:48 +0530 > Jagan Teki wrote: > > > On 26/11/18 2:12 PM, Boris Brezillon wrote: > > > Hi Jagan, > > > > > > On Thu, 22 Nov 2018 09:40:56 +0100 > > > Boris Brezillon wrote: > > > > > + /* > >

Re: [U-Boot] [PATCH v3 11/11] mtd: sf: Make sf_mtd.c more robust

2018-11-26 Thread Boris Brezillon
On Mon, 26 Nov 2018 16:42:48 +0530 Jagan Teki wrote: > On 26/11/18 2:12 PM, Boris Brezillon wrote: > > Hi Jagan, > > > > On Thu, 22 Nov 2018 09:40:56 +0100 > > Boris Brezillon wrote: > > > + /* > +* Setting mtd->priv to NULL is the best we can do. Thanks to > th

Re: [U-Boot] [PATCH v3 11/11] mtd: sf: Make sf_mtd.c more robust

2018-11-26 Thread Jagan Teki
On 26/11/18 2:12 PM, Boris Brezillon wrote: Hi Jagan, On Thu, 22 Nov 2018 09:40:56 +0100 Boris Brezillon wrote: + /* +* Setting mtd->priv to NULL is the best we can do. Thanks to that, +* the MTD layer can still call mtd hooks without risking a +* use-after-free

Re: [U-Boot] [PATCH v3 11/11] mtd: sf: Make sf_mtd.c more robust

2018-11-26 Thread Boris Brezillon
Hi Jagan, On Thu, 22 Nov 2018 09:40:56 +0100 Boris Brezillon wrote: > > > + /* > > > +* Setting mtd->priv to NULL is the best we can do. Thanks to > > > that, > > > +* the MTD layer can still call mtd hooks without risking a > > > +* use-after-free bug. Still, thin

Re: [U-Boot] [PATCH v3 11/11] mtd: sf: Make sf_mtd.c more robust

2018-11-22 Thread Boris Brezillon
On Thu, 22 Nov 2018 12:40:57 +0530 Jagan Teki wrote: > On Tue, Nov 20, 2018 at 2:33 AM Boris Brezillon > wrote: > > > > SPI flash based MTD devs can be registered/unregistered at any time > > through the sf probe command or the spi_flash_free() function. > > > > This commit does not try to fix t

Re: [U-Boot] [PATCH v3 11/11] mtd: sf: Make sf_mtd.c more robust

2018-11-21 Thread Jagan Teki
On Tue, Nov 20, 2018 at 2:33 AM Boris Brezillon wrote: > > SPI flash based MTD devs can be registered/unregistered at any time > through the sf probe command or the spi_flash_free() function. > > This commit does not try to fix the root cause as it would probably > require rewriting most of the co

Re: [U-Boot] [PATCH v3 11/11] mtd: sf: Make sf_mtd.c more robust

2018-11-20 Thread Heiko Schocher
Hello Boris, Am 19.11.2018 um 21:59 schrieb Boris Brezillon: SPI flash based MTD devs can be registered/unregistered at any time through the sf probe command or the spi_flash_free() function. This commit does not try to fix the root cause as it would probably require rewriting most of the code

[U-Boot] [PATCH v3 11/11] mtd: sf: Make sf_mtd.c more robust

2018-11-19 Thread Boris Brezillon
SPI flash based MTD devs can be registered/unregistered at any time through the sf probe command or the spi_flash_free() function. This commit does not try to fix the root cause as it would probably require rewriting most of the code and have an mtd_info object instance per spi_flash object (not t