projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8cc708
)
mm: prevent KASAN false positives in kmemleak
author
Dmitry Vyukov
<
[email protected]
>
Fri, 24 Jun 2016 21:50:07 +0000
(14:50 -0700)
committer
Linus Torvalds
<
[email protected]
>
Sat, 25 Jun 2016 00:23:52 +0000
(17:23 -0700)
When kmemleak dumps contents of leaked objects it reads whole objects
regardless of user-requested size. This upsets KASAN. Disable KASAN
checks around object dump.
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Dmitry Vyukov <
[email protected]
>
Acked-by: Catalin Marinas <
[email protected]
>
Cc: Andrey Ryabinin <
[email protected]
>
Cc: Alexander Potapenko <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/kmemleak.c
patch
|
blob
|
history
diff --git
a/mm/kmemleak.c
b/mm/kmemleak.c
index e6429926e95741055fe1aa87a3082e6ed073f909..04320d3adbef9922edda52e43cc516463e9e33c6 100644
(file)
--- a/
mm/kmemleak.c
+++ b/
mm/kmemleak.c
@@
-307,8
+307,10
@@
static void hex_dump_object(struct seq_file *seq,
len = min_t(size_t, object->size, HEX_MAX_LINES * HEX_ROW_SIZE);
seq_printf(seq, " hex dump (first %zu bytes):\n", len);
+ kasan_disable_current();
seq_hex_dump(seq, " ", DUMP_PREFIX_NONE, HEX_ROW_SIZE,
HEX_GROUP_SIZE, ptr, len, HEX_ASCII);
+ kasan_enable_current();
}
/*