UBI: Fastmap request for inclusion (v19)

Artem Bityutskiy artem.bityutskiy at linux.intel.com
Wed Oct 3 04:25:45 EDT 2012


On Wed, 2012-09-26 at 17:51 +0200, Richard Weinberger wrote:
> UBI Fastmap is an optional feature which stores the physical to
> logical eraseblock relations in a checkpoint (called fastmap) to reduce
> the initialization time of UBI. The current init time of UBI is
> proportional to the number of physical erase blocks on the FLASH
> device. With fastmap enabled the scan time is limited to a fixed
> number of blocks.

Aiaiai complains and linux-next build fails :-( Last time I forgot to
enable the fastmap kbuild option so aiaiai checked with that option
disabled. Now I enabled it with a simple hack (default n -> default y)
and here are aiaiai's complaints - there is a build failure for
ARCH=i386.

I should improve aiaiai to automatically enable new Kconfig features, or
at least warn about them. This is not the first time someone sends a new
driver which is default off, and I forget to enable it :-(


dedekind at blue:~/git/maintaining$ ../aiaiai/aiaiai-concat-mboxes ../linux-ubi/00* | ./verify ../linux-ubi gen -c 55393ba1bdedc5ded79b34b4cc08898a7776cddb
Tested the patch(es) on top of the following commits:
e4e9957 Quick fixes - applied by aiaiai
55393ba UBI: fix trivial typo 'it' => 'is'
cf38aca UBI: load after mtd device drivers
719bb84 UBI: print less

--------------------------------------------------------------------------------

Successfully built configuration "arm-omap2plus_defconfig,arm,arm-unknown-linux-gnueabi-", results:

--- before_patching.log
+++ after_patching.log
@@ @@
+drivers/mtd/ubi/fastmap.c:1012 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1012:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1017:7-11: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1027 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1027:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1033 ubi_scan_fastmap() error: dereferencing freed memory 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1033:1-3: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1077 ubi_scan_fastmap() warn: possible memory leak of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1479 ubi_update_fastmap() error: we previously assumed 'tmp_e' could be null (see line 1463) [smatch]
+drivers/mtd/ubi/fastmap.c:925 ubi_scan_fastmap() error: double free of 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:925:8-12: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:926 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:926:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:933 ubi_scan_fastmap() error: double free of 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:933:8-12: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:934 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:934:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:940 ubi_scan_fastmap() error: dereferencing freed memory 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:940:21-25: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:944 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:944:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:956 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:956:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:959 ubi_scan_fastmap() error: dereferencing freed memory 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:959:3-5: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:967 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:967:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:976 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:976:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:988 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:988:10-12: ERROR: reference preceded by free on line 919 [coccinelle]
@@ @@
+drivers/mtd/ubi/wl.c:284:3-9: preceding lock on line 282 [coccinelle]

--------------------------------------------------------------------------------
Failed to build the following commit for configuration "i386_defconfig" (architecture i386)":

88f4a02 UBI: Wire-up fastmap

drivers/mtd/nand/r852.c:571:6: warning: no previous prototype for ‘r852_engine_disable’ [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:581:6: warning: no previous prototype for ‘r852_card_update_present’ [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:596:6: warning: no previous prototype for ‘r852_update_card_detect’ [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:610:9: warning: no previous prototype for ‘r852_media_type_show’ [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:625:6: warning: no previous prototype for ‘r852_update_media_status’ [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:654:5: warning: no previous prototype for ‘r852_register_nand_device’ [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:692:6: warning: no previous prototype for ‘r852_unregister_nand_device’ [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:706:6: warning: no previous prototype for ‘r852_card_detect_work’ [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:845:6: warning: no previous prototype for ‘r852_probe’ [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:986:6: warning: no previous prototype for ‘r852_remove’ [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:1017:6: warning: no previous prototype for ‘r852_shutdown’ [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:44:9: warning: no previous prototype for ‘sm_attr_show’ [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:57:25: warning: no previous prototype for ‘sm_create_sysfs_attributes’ [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:110:6: warning: no previous prototype for ‘sm_delete_sysfs_attributes’ [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:575:5: warning: no previous prototype for ‘sm_get_media_info’ [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:882:18: warning: no previous prototype for ‘sm_get_zone’ [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:903:6: warning: no previous prototype for ‘sm_cache_init’ [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:913:6: warning: no previous prototype for ‘sm_cache_put’ [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:921:5: warning: no previous prototype for ‘sm_cache_get’ [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:932:5: warning: no previous prototype for ‘sm_cache_flush’ [-Wmissing-prototypes]
ERROR: "ubi_update_fastmap" [drivers/mtd/ubi/ubi.ko] undefined!
ERROR: "ubi_scan_fastmap" [drivers/mtd/ubi/ubi.ko] undefined!
ERROR: "ubi_calc_fm_size" [drivers/mtd/ubi/ubi.ko] undefined!
make[2]: *** [__modpost] Error 1

--------------------------------------------------------------------------------
Failed to build the following commit for configuration "ia64_defconfig" (architecture ia64)":

88f4a02 UBI: Wire-up fastmap

drivers/mtd/nand/r852.c:381:5: warning: no previous prototype for 'r852_wait' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:410:5: warning: no previous prototype for 'r852_ready' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:421:6: warning: no previous prototype for 'r852_ecc_hwctl' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:453:5: warning: no previous prototype for 'r852_ecc_calculate' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:485:5: warning: no previous prototype for 'r852_ecc_correct' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:553:6: warning: no previous prototype for 'r852_engine_enable' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:571:6: warning: no previous prototype for 'r852_engine_disable' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:581:6: warning: no previous prototype for 'r852_card_update_present' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:596:6: warning: no previous prototype for 'r852_update_card_detect' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:610:9: warning: no previous prototype for 'r852_media_type_show' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:625:6: warning: no previous prototype for 'r852_update_media_status' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:654:5: warning: no previous prototype for 'r852_register_nand_device' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:692:6: warning: no previous prototype for 'r852_unregister_nand_device' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:706:6: warning: no previous prototype for 'r852_card_detect_work' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:845:6: warning: no previous prototype for 'r852_probe' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:986:6: warning: no previous prototype for 'r852_remove' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:1017:6: warning: no previous prototype for 'r852_shutdown' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:1028:12: warning: 'r852_suspend' defined but not used [-Wunused-function]
drivers/mtd/nand/r852.c:1049:12: warning: 'r852_resume' defined but not used [-Wunused-function]
WARNING: modpost: Found 1 section mismatch(es).
ERROR: "ubi_update_fastmap" [drivers/mtd/ubi/ubi.ko] undefined!
ERROR: "ubi_scan_fastmap" [drivers/mtd/ubi/ubi.ko] undefined!
ERROR: "ubi_calc_fm_size" [drivers/mtd/ubi/ubi.ko] undefined!
make[2]: *** [__modpost] Error 1

--------------------------------------------------------------------------------

Successfully built configuration "m68k-m5208evb_defconfig,m68k,m68k-linux-", results:

--- before_patching.log
+++ after_patching.log
@@ @@
+drivers/mtd/ubi/fastmap.c:1012 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1012:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1017:7-11: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1027 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1027:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1033 ubi_scan_fastmap() error: dereferencing freed memory 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1033:1-3: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1077 ubi_scan_fastmap() warn: possible memory leak of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1479 ubi_update_fastmap() error: we previously assumed 'tmp_e' could be null (see line 1463) [smatch]
+drivers/mtd/ubi/fastmap.c:925 ubi_scan_fastmap() error: double free of 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:925:8-12: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:926 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:926:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:933 ubi_scan_fastmap() error: double free of 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:933:8-12: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:934 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:934:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:940 ubi_scan_fastmap() error: dereferencing freed memory 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:940:21-25: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:944 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:944:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:956 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:956:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:959 ubi_scan_fastmap() error: dereferencing freed memory 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:959:3-5: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:967 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:967:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:976 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:976:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:988 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:988:10-12: ERROR: reference preceded by free on line 919 [coccinelle]
@@ @@
+drivers/mtd/ubi/wl.c:284:3-9: preceding lock on line 282 [coccinelle]

--------------------------------------------------------------------------------
Failed to build the following commit for configuration "mips64_defconfig" (architecture mips)":

88f4a02 UBI: Wire-up fastmap

drivers/mtd/nand/r852.c:571:6: warning: no previous prototype for 'r852_engine_disable' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:581:6: warning: no previous prototype for 'r852_card_update_present' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:596:6: warning: no previous prototype for 'r852_update_card_detect' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:610:9: warning: no previous prototype for 'r852_media_type_show' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:625:6: warning: no previous prototype for 'r852_update_media_status' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:654:5: warning: no previous prototype for 'r852_register_nand_device' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:692:6: warning: no previous prototype for 'r852_unregister_nand_device' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:706:6: warning: no previous prototype for 'r852_card_detect_work' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:845:6: warning: no previous prototype for 'r852_probe' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:986:6: warning: no previous prototype for 'r852_remove' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:1017:6: warning: no previous prototype for 'r852_shutdown' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:44:9: warning: no previous prototype for 'sm_attr_show' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:57:25: warning: no previous prototype for 'sm_create_sysfs_attributes' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:110:6: warning: no previous prototype for 'sm_delete_sysfs_attributes' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:575:5: warning: no previous prototype for 'sm_get_media_info' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:882:18: warning: no previous prototype for 'sm_get_zone' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:903:6: warning: no previous prototype for 'sm_cache_init' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:913:6: warning: no previous prototype for 'sm_cache_put' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:921:5: warning: no previous prototype for 'sm_cache_get' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:932:5: warning: no previous prototype for 'sm_cache_flush' [-Wmissing-prototypes]
ERROR: "ubi_update_fastmap" [drivers/mtd/ubi/ubi.ko] undefined!
ERROR: "ubi_scan_fastmap" [drivers/mtd/ubi/ubi.ko] undefined!
ERROR: "ubi_calc_fm_size" [drivers/mtd/ubi/ubi.ko] undefined!
make[2]: *** [__modpost] Error 1

--------------------------------------------------------------------------------

Successfully built configuration "mips-bcm63xx_defconfig,mips,mips-linux-", results:

--- before_patching.log
+++ after_patching.log
@@ @@
+drivers/mtd/ubi/fastmap.c:1012 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1012:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1017:7-11: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1027 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1027:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1033 ubi_scan_fastmap() error: dereferencing freed memory 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1033:1-3: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1077 ubi_scan_fastmap() warn: possible memory leak of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1479 ubi_update_fastmap() error: we previously assumed 'tmp_e' could be null (see line 1463) [smatch]
+drivers/mtd/ubi/fastmap.c:925 ubi_scan_fastmap() error: double free of 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:925:8-12: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:926 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:926:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:933 ubi_scan_fastmap() error: double free of 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:933:8-12: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:934 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:934:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:940 ubi_scan_fastmap() error: dereferencing freed memory 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:940:21-25: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:944 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:944:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:956 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:956:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:959 ubi_scan_fastmap() error: dereferencing freed memory 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:959:3-5: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:967 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:967:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:976 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:976:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:988 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:988:10-12: ERROR: reference preceded by free on line 919 [coccinelle]
@@ @@
+drivers/mtd/ubi/wl.c:284:3-9: preceding lock on line 282 [coccinelle]

--------------------------------------------------------------------------------

Successfully built configuration "ppc32_defconfig,powerpc,powerpc-linux-", results:

--- before_patching.log
+++ after_patching.log
@@ @@
+drivers/mtd/ubi/fastmap.c:1012 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1012:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1017:7-11: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1027 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1027:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1033 ubi_scan_fastmap() error: dereferencing freed memory 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1033:1-3: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1077 ubi_scan_fastmap() warn: possible memory leak of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1479 ubi_update_fastmap() error: we previously assumed 'tmp_e' could be null (see line 1463) [smatch]
+drivers/mtd/ubi/fastmap.c:925 ubi_scan_fastmap() error: double free of 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:925:8-12: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:926 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:926:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:933 ubi_scan_fastmap() error: double free of 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:933:8-12: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:934 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:934:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:940 ubi_scan_fastmap() error: dereferencing freed memory 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:940:21-25: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:944 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:944:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:956 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:956:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:959 ubi_scan_fastmap() error: dereferencing freed memory 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:959:3-5: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:967 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:967:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:976 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:976:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:988 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:988:10-12: ERROR: reference preceded by free on line 919 [coccinelle]
@@ @@
+drivers/mtd/ubi/wl.c:284:3-9: preceding lock on line 282 [coccinelle]

--------------------------------------------------------------------------------

Successfully built configuration "ppc64_defconfig,powerpc,powerpc64-linux-", results:

--- before_patching.log
+++ after_patching.log
@@ @@
+drivers/mtd/ubi/fastmap.c:1012 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1012:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1017:7-11: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1027 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1027:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1033 ubi_scan_fastmap() error: dereferencing freed memory 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1033:1-3: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1077 ubi_scan_fastmap() warn: possible memory leak of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1479 ubi_update_fastmap() error: we previously assumed 'tmp_e' could be null (see line 1463) [smatch]
+drivers/mtd/ubi/fastmap.c:925 ubi_scan_fastmap() error: double free of 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:925:8-12: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:926 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:926:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:933 ubi_scan_fastmap() error: double free of 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:933:8-12: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:934 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:934:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:940 ubi_scan_fastmap() error: dereferencing freed memory 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:940:21-25: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:944 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:944:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:956 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:956:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:959 ubi_scan_fastmap() error: dereferencing freed memory 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:959:3-5: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:967 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:967:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:976 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:976:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:988 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:988:10-12: ERROR: reference preceded by free on line 919 [coccinelle]
@@ @@
+drivers/mtd/ubi/wl.c:284:3-9: preceding lock on line 282 [coccinelle]

--------------------------------------------------------------------------------

Successfully built configuration "x86_64_defconfig,x86_64,", results:

--- before_patching.log
+++ after_patching.log
@@ @@
+drivers/mtd/ubi/fastmap.c:1012 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1012:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1017:7-11: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1027 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1027:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1033 ubi_scan_fastmap() error: dereferencing freed memory 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1033:1-3: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:1077 ubi_scan_fastmap() warn: possible memory leak of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:1479 ubi_update_fastmap() error: we previously assumed 'tmp_e' could be null (see line 1463) [smatch]
+drivers/mtd/ubi/fastmap.c:925 ubi_scan_fastmap() error: double free of 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:925:8-12: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:926 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:926:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:933 ubi_scan_fastmap() error: double free of 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:933:8-12: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:934 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:934:8-10: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:940 ubi_scan_fastmap() error: dereferencing freed memory 'fmsb' [smatch]
+drivers/mtd/ubi/fastmap.c:940:21-25: ERROR: reference preceded by free on line 918 [coccinelle]
+drivers/mtd/ubi/fastmap.c:944 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:944:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:956 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:956:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:959 ubi_scan_fastmap() error: dereferencing freed memory 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:959:3-5: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:967 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:967:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:976 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:976:9-11: ERROR: reference preceded by free on line 919 [coccinelle]
+drivers/mtd/ubi/fastmap.c:988 ubi_scan_fastmap() error: double free of 'fm' [smatch]
+drivers/mtd/ubi/fastmap.c:988:10-12: ERROR: reference preceded by free on line 919 [coccinelle]
@@ @@
+drivers/mtd/ubi/wl.c:284:3-9: preceding lock on line 282 [coccinelle]

--------------------------------------------------------------------------------

checkpatch.pl has some complaints:

--------------------------------------------------------------------------------

checkpatch.pl results for patch "[PATCH 07/10] UBI: Add fastmap stuff to attach.c"

WARNING:LONG_LINE: line over 80 characters
#115: FILE: drivers/mtd/ubi/attach.c:1008:
+                               ubi_msg("\"delete\" compatible internal volume %d:%d found, will remove it",

total: 0 errors, 1 warnings, 550 lines checked

--------------------------------------------------------------------------------

checkpatch.pl results for the entire squashed patch-set

WARNING:LONG_LINE: line over 80 characters
#987: FILE: drivers/mtd/ubi/attach.c:1008:
+                               ubi_msg("\"delete\" compatible internal volume %d:%d found, will remove it",

total: 0 errors, 1 warnings, 3708 lines checked

--------------------------------------------------------------------------------

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20121003/58fc6d81/attachment-0001.sig>


More information about the linux-mtd mailing list