Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-10-03 Thread Artem Bityutskiy
On Tue, 2014-09-30 at 10:07 +0200, Richard Weinberger wrote: > > UBI consists of subsystems. Subsystems try to be more or less > > independent, whenever possible. They expose interface functions for > > other subsystems. Of course the split is not ideal, but we do our best. > > > > * wl.c does

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-10-03 Thread Artem Bityutskiy
On Tue, 2014-09-30 at 10:07 +0200, Richard Weinberger wrote: UBI consists of subsystems. Subsystems try to be more or less independent, whenever possible. They expose interface functions for other subsystems. Of course the split is not ideal, but we do our best. * wl.c does

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-10-02 Thread Richard Weinberger
Am 02.10.2014 15:05, schrieb Tanya Brokhman: >> +#ifdef CONFIG_MTD_UBI_FASTMAP >> +flush_work(>fm_work); > > flush_work returns bool. It might be useful to print that value for debugging. Why would this be useful? The sole purpose of this flush is having a barrier. If flush_work() had to

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-10-02 Thread Tanya Brokhman
Hi Richard, On 9/30/2014 1:20 AM, Richard Weinberger wrote: ...otherwise the deferred work might run after datastructures got freed and corrupt memory. Signed-off-by: Richard Weinberger --- drivers/mtd/ubi/wl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/ubi/wl.c

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-10-02 Thread Tanya Brokhman
Hi Richard, On 9/30/2014 1:20 AM, Richard Weinberger wrote: ...otherwise the deferred work might run after datastructures got freed and corrupt memory. Signed-off-by: Richard Weinberger rich...@nod.at --- drivers/mtd/ubi/wl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-10-02 Thread Richard Weinberger
Am 02.10.2014 15:05, schrieb Tanya Brokhman: +#ifdef CONFIG_MTD_UBI_FASTMAP +flush_work(ubi-fm_work); flush_work returns bool. It might be useful to print that value for debugging. Why would this be useful? The sole purpose of this flush is having a barrier. If flush_work() had to wait

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-09-30 Thread Richard Weinberger
Am 30.09.2014 09:53, schrieb Bityutskiy, Artem: > On Tue, 2014-09-30 at 08:58 +0200, Richard Weinberger wrote: >> Am 30.09.2014 08:26, schrieb Artem Bityutskiy: >>> On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: ...otherwise the deferred work might run after datastructures

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-09-30 Thread Bityutskiy, Artem
On Tue, 2014-09-30 at 08:58 +0200, Richard Weinberger wrote: > Am 30.09.2014 08:26, schrieb Artem Bityutskiy: > > On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: > >> ...otherwise the deferred work might run after datastructures > >> got freed and corrupt memory. > > > > How can this

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-09-30 Thread Richard Weinberger
Am 30.09.2014 08:26, schrieb Artem Bityutskiy: > On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: >> ...otherwise the deferred work might run after datastructures >> got freed and corrupt memory. > > How can this happend? The background thread is stopped by this time > already, so

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-09-30 Thread Artem Bityutskiy
On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: > ...otherwise the deferred work might run after datastructures > got freed and corrupt memory. How can this happend? The background thread is stopped by this time already, so what are the other possibilities? And why is this

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-09-30 Thread Artem Bityutskiy
On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: ...otherwise the deferred work might run after datastructures got freed and corrupt memory. How can this happend? The background thread is stopped by this time already, so what are the other possibilities? And why is this

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-09-30 Thread Richard Weinberger
Am 30.09.2014 08:26, schrieb Artem Bityutskiy: On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: ...otherwise the deferred work might run after datastructures got freed and corrupt memory. How can this happend? The background thread is stopped by this time already, so what are

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-09-30 Thread Bityutskiy, Artem
On Tue, 2014-09-30 at 08:58 +0200, Richard Weinberger wrote: Am 30.09.2014 08:26, schrieb Artem Bityutskiy: On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: ...otherwise the deferred work might run after datastructures got freed and corrupt memory. How can this happend? The

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-09-30 Thread Richard Weinberger
Am 30.09.2014 09:53, schrieb Bityutskiy, Artem: On Tue, 2014-09-30 at 08:58 +0200, Richard Weinberger wrote: Am 30.09.2014 08:26, schrieb Artem Bityutskiy: On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: ...otherwise the deferred work might run after datastructures got freed and

[PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-09-29 Thread Richard Weinberger
...otherwise the deferred work might run after datastructures got freed and corrupt memory. Signed-off-by: Richard Weinberger --- drivers/mtd/ubi/wl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 20f491713..dc01b1f 100644 ---

[PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-09-29 Thread Richard Weinberger
...otherwise the deferred work might run after datastructures got freed and corrupt memory. Signed-off-by: Richard Weinberger rich...@nod.at --- drivers/mtd/ubi/wl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 20f491713..dc01b1f 100644