On Mon, 2012-05-14 at 20:47 +0200, Joel Reardon wrote: > This is part of a multipart patch to allow UBI to force the erasure of > particular logical eraseblock numbers. In this patch, the logical erase block > number is added to ubi_work data structure, and it is also passed as a > parameter to schedule erase to set it appropriately. Whenever ubi_wl_put_peb > is called, the lnum is also passed to be forwarded to schedule erase. Later, > a new ubi_sync_lnum will be added to execute immediately all work related to > that lnum. Hmm, I've just checked your patch with Aiaiai and it complains about your changes - and the complaints are correct - you introduce a bug. --- before_patching.log +++ after_patching.log @@ @@ +drivers/mtd/ubi/wl.c:1023 erase_worker() error: dereferencing freed memory 'wl_wrk' [smatch] +drivers/mtd/ubi/wl.c:1023:35-41: ERROR: reference preceded by free on line 1016 [coccinelle] -- Best Regards, Artem Bityutskiy