summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2016-11-10 10:46:44 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-11-11 08:12:37 -0800
commitd7c19b066dcf4bd19c4385e8065558d4e74f9e73 (patch)
treebd0185782655c900a4fafd1f51219d46905c943b /mm
parentf773e36de3d77c4000ca914c9d146f55f2fd51e8 (diff)
downloadop-kernel-dev-d7c19b066dcf4bd19c4385e8065558d4e74f9e73.zip
op-kernel-dev-d7c19b066dcf4bd19c4385e8065558d4e74f9e73.tar.gz
mm: kmemleak: scan .data.ro_after_init
Limit the number of kmemleak false positives by including .data.ro_after_init in memory scanning. To achieve this we need to add symbols for start and end of the section to the linker scripts. The problem was been uncovered by commit 56989f6d8568 ("genetlink: mark families as __ro_after_init"). Link: http://lkml.kernel.org/r/1478274173-15218-1-git-send-email-jakub.kicinski@netronome.com Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Cong Wang <xiyou.wangcong@gmail.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/kmemleak.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index e5355a5..d1380ed 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1414,6 +1414,7 @@ static void kmemleak_scan(void)
/* data/bss scanning */
scan_large_block(_sdata, _edata);
scan_large_block(__bss_start, __bss_stop);
+ scan_large_block(__start_data_ro_after_init, __end_data_ro_after_init);
#ifdef CONFIG_SMP
/* per-cpu sections scanning */
OpenPOWER on IntegriCloud