From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
To: Richard Weinberger <richard@nod.at>
Cc: Heinz.Egger@linutronix.de, tglx@linutronix.de,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
tim.bird@am.sony.com
Subject: Re: UBI: Fastmap request for inclusion (v19)
Date: Wed, 03 Oct 2012 11:25:45 +0300 [thread overview]
Message-ID: <1349252745.2017.120.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <1348674710-102885-1-git-send-email-richard@nod.at>
[-- Attachment #1: Type: text/plain, Size: 29813 bytes --]
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@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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-10-03 8:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 15:51 UBI: Fastmap request for inclusion (v19) Richard Weinberger
2012-09-26 15:51 ` [PATCH 01/10] UBI: Add fastmap on-flash data structures Richard Weinberger
2012-09-26 15:51 ` [PATCH 02/10] UBI: Add fastmap stuff to ubi.h Richard Weinberger
2012-09-26 15:51 ` [PATCH 03/10] UBI: Export next_sqnum() Richard Weinberger
2012-09-26 15:51 ` [PATCH 04/10] UBI: Add self_check_eba() Richard Weinberger
2012-09-26 15:51 ` [PATCH 05/10] UBI: Add fastmap bits to build.c Richard Weinberger
2012-09-26 15:51 ` [PATCH 06/10] UBI: Wire-up ->fm_sem Richard Weinberger
2012-09-26 15:51 ` [PATCH 07/10] UBI: Add fastmap stuff to attach.c Richard Weinberger
2012-09-26 15:51 ` [PATCH 08/10] UBI: Add fastmap support to the WL sub-system Richard Weinberger
2012-09-26 15:51 ` [PATCH 09/10] UBI: Add fastmap core Richard Weinberger
2012-09-26 15:51 ` [PATCH 10/10] UBI: Wire-up fastmap Richard Weinberger
2012-09-27 22:18 ` UBI: Fastmap request for inclusion (v19) richard -rw- weinberger
2012-10-03 8:25 ` Artem Bityutskiy [this message]
2012-10-03 8:36 ` Richard Weinberger
2012-10-03 8:43 ` Artem Bityutskiy
2012-10-03 8:44 ` Artem Bityutskiy
2012-10-03 9:03 ` Richard Weinberger
2012-10-03 9:30 ` Artem Bityutskiy
2012-10-03 9:32 ` Richard Weinberger
2012-10-03 11:05 ` Artem Bityutskiy
2012-10-03 11:18 ` Artem Bityutskiy
2012-10-03 12:13 ` Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349252745.2017.120.camel@sauron.fi.intel.com \
--to=artem.bityutskiy@linux.intel.com \
--cc=Heinz.Egger@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=tglx@linutronix.de \
--cc=tim.bird@am.sony.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox