From: Marco Elver <elver@google.com>
To: Qian Cai <cai@lca.pw>
Cc: Andrew Morton <akpm@linux-foundation.org>,
catalin.marinas@arm.com,
Linux Memory Management List <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next 2/2] Revert "mm/kmemleak: annotate various data races obj->ptr"
Date: Tue, 3 Mar 2020 21:21:05 +0100 [thread overview]
Message-ID: <CANpmjNOaZ7PBiQh9r06ZuvsbtyYpKjGCt+0hXTVabOJD18OXEA@mail.gmail.com> (raw)
In-Reply-To: <1583263716-25150-2-git-send-email-cai@lca.pw>
On Tue, 3 Mar 2020 at 20:28, Qian Cai <cai@lca.pw> wrote:
>
> This reverts commit a03184297d546c6531cdd40878f1f50732d3bac9.
>
> Signed-off-by: Qian Cai <cai@lca.pw>
Acked-by: Marco Elver <elver@google.com>
Thank you!
> ---
> 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
>
next prev parent reply other threads:[~2020-03-03 20:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 19:28 [PATCH -next 1/2] mm: disable KCSAN for kmemleak Qian Cai
2020-03-03 19:28 ` [PATCH -next 2/2] Revert "mm/kmemleak: annotate various data races obj->ptr" Qian Cai
2020-03-03 20:21 ` Marco Elver [this message]
2020-03-03 20:21 ` Marco Elver
2020-03-11 14:19 ` Catalin Marinas
2020-03-03 20:20 ` [PATCH -next 1/2] mm: disable KCSAN for kmemleak Marco Elver
2020-03-03 20:20 ` Marco Elver
2020-03-11 14:18 ` Catalin Marinas
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=CANpmjNOaZ7PBiQh9r06ZuvsbtyYpKjGCt+0hXTVabOJD18OXEA@mail.gmail.com \
--to=elver@google.com \
--cc=akpm@linux-foundation.org \
--cc=cai@lca.pw \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.