lkml.org 
[lkml]   [2020]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next 2/2] Revert "mm/kmemleak: annotate various data races obj->ptr"
Date
This reverts commit a03184297d546c6531cdd40878f1f50732d3bac9.

Signed-off-by: Qian Cai <cai@lca.pw>
---
mm/kmemleak.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 788dc5509539..e362dc3d2028 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1169,12 +1169,7 @@ static bool update_checksum(struct kmemleak_object *object)
u32 old_csum = object->checksum;

kasan_disable_current();
- /*
- * crc32() will dereference object->pointer. If an unstable value was
- * returned due to a data race, it will be corrected in the next scan.
- */
- object->checksum = data_race(crc32(0, (void *)object->pointer,
- object->size));
+ object->checksum = crc32(0, (void *)object->pointer, object->size);
kasan_enable_current();

return object->checksum != old_csum;
@@ -1248,7 +1243,7 @@ static void scan_block(void *_start, void *_end,
break;

kasan_disable_current();
- pointer = data_race(*ptr);
+ pointer = *ptr;
kasan_enable_current();

untagged_ptr = (unsigned long)kasan_reset_tag((void *)pointer);
--
1.8.3.1
\
 
 \ /
  Last update: 2020-03-03 20:30    [W:0.102 / U:3.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site