From patchwork Tue Mar 3 19:28:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qian Cai X-Patchwork-Id: 11418705 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E11814BC for ; Tue, 3 Mar 2020 19:29:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5B000214DB for ; Tue, 3 Mar 2020 19:29:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="daGqKylB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B000214DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lca.pw Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A011F6B0006; Tue, 3 Mar 2020 14:29:01 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9D73B6B000A; Tue, 3 Mar 2020 14:29:01 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8C64A6B000C; Tue, 3 Mar 2020 14:29:01 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0189.hostedemail.com [216.40.44.189]) by kanga.kvack.org (Postfix) with ESMTP id 748426B0006 for ; Tue, 3 Mar 2020 14:29:01 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id DDBE28248D52 for ; Tue, 3 Mar 2020 19:29:00 +0000 (UTC) X-FDA: 76555038882.30.boys85_6bc3b6ba95352 X-Spam-Summary: 2,0,0,26a93b15e341cd0a,d41d8cd98f00b204,cai@lca.pw,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1359:1437:1534:1541:1711:1730:1747:1777:1792:2393:2559:2562:2693:3138:3139:3140:3141:3142:3352:3865:3867:3870:3872:4321:5007:6261:6653:8603:10004:11026:11658:11914:12043:12296:12297:12438:12517:12519:12555:12895:12986:13069:13311:13357:14018:14096:14181:14384:14394:14721:21080:21444:21627:21990:30054,0,RBL:209.85.219.68:@lca.pw:.lbl8.mailshell.net-66.100.201.201 62.2.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: boys85_6bc3b6ba95352 X-Filterd-Recvd-Size: 3947 Received: from mail-qv1-f68.google.com (mail-qv1-f68.google.com [209.85.219.68]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Tue, 3 Mar 2020 19:29:00 +0000 (UTC) Received: by mail-qv1-f68.google.com with SMTP id c19so2239023qvv.4 for ; Tue, 03 Mar 2020 11:28:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5sB0rUv2y/FHn+2J4ke7VwpHWKH7r4gCKIkGyO1umgw=; b=daGqKylBIlAi05SY9J399ZZ2Y08VyEwEoo9tk80ZrcKcKxqZMlCtGyiYiZZO7BqhuT r69j/D9J4NoIk9x++Ba4c3nWXvLHE1CqqYXFJAwY0LNWoUwutCpjEEvtWhmZApPNcSB2 +vj+k2bNBUOvltMhLa4JkKJN89nFj/bopSPcetCwJE9kBjkGHYHi0t2m/fKFGfv4cIUf aktTqZjUm8o+5TSHHehGW1JANsTuhXMxv1wpv3Om+O87PS+uMIXh51l/nuKYg3Q5gb2z njXkMUxx4zFQMqjrlxwonYSv646HhRq/PdQEBz53X2RdFhelWAwYRSQ6S4Pz4Y3sy//w EWpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5sB0rUv2y/FHn+2J4ke7VwpHWKH7r4gCKIkGyO1umgw=; b=hRc4A4gvLd8iS9+54MHaskCno/92Yk3MQB7qUfE136QDip7u+6CVbZXrcY7Gszsklz tisAgKUIfReVxh5APLfF5uI2lwAQUMEtsnBi9Q2Q+O4gkRzu6Cz5E4KjqBSnp48UjhBa I1QhthSaU8VquSjMBKLCS9Qa8HOaxbA4x6LMto+n9+q92yvNCkVe9J1Vzx5Y+/fk03Dg XGtkaH/N5Oe5cdQL49FIpdClwPcWmNfcEQH4nDhBLsedEAEyaXRGUk96J5PnmEEIHJrO pOBpxSYl7G1CMklK1Dv0/8E4vr19Qri3y5PmdPY7qMXxGENtkbL+/l7ZqdVJQ4PGX8xE Pcdw== X-Gm-Message-State: ANhLgQ2sUzT1b+3rbTtLX1N97VkA+NdLqOCnO99+vyTstRWC0+e7UVf+ ygjRnkbEpEYeKnrnhQ54jAnd+g== X-Google-Smtp-Source: ADFU+vsdN08+hzzkYgx52slbfyXtJEtnMWJ/t/Xpb46+aEucSVYgw91EmssD2oQy1FgomzbaEwvJnA== X-Received: by 2002:ad4:4a6e:: with SMTP id cn14mr5364150qvb.21.1583263738513; Tue, 03 Mar 2020 11:28:58 -0800 (PST) Received: from qcai.nay.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id j7sm8872582qti.14.2020.03.03.11.28.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Mar 2020 11:28:58 -0800 (PST) From: Qian Cai To: akpm@linux-foundation.org Cc: elver@google.com, catalin.marinas@arm.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Qian Cai Subject: [PATCH -next 2/2] Revert "mm/kmemleak: annotate various data races obj->ptr" Date: Tue, 3 Mar 2020 14:28:36 -0500 Message-Id: <1583263716-25150-2-git-send-email-cai@lca.pw> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1583263716-25150-1-git-send-email-cai@lca.pw> References: <1583263716-25150-1-git-send-email-cai@lca.pw> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000008, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This reverts commit a03184297d546c6531cdd40878f1f50732d3bac9. Signed-off-by: Qian Cai Acked-by: Marco Elver Acked-by: Catalin Marinas --- 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);