Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp610786pxu; Fri, 4 Dec 2020 10:56:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxicNPsXXbiykcYSgZOC2+hwD/AUpjROyuCZsNNJaaIbhq2TScQSNLs6O4ltzK5EEAN+UXZ X-Received: by 2002:a50:d8c8:: with SMTP id y8mr8755245edj.82.1607108193415; Fri, 04 Dec 2020 10:56:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607108193; cv=none; d=google.com; s=arc-20160816; b=fPZx7f780eMTyGUAqIk5fMj2AybemXrT8+DmdaaFsyyoJ6rSLC8q9MBKSoJQJiXvu6 J1HHKylpn5HgLG6aaq7M91+bohxxp4ejHWaZGFErTfaoAIdy72sDoMsi1f5NPoWiKkXE KqZDRx0wtVOigQkHggsMYUKuB+sLnonROaZqS7igBounpXnCE7JYqv093oeYbr6lT6RK caycD1Kh+8mf/WT+xKlODj/FlPYMubSgIvI4nQh55y3RYiYNUZsQXWw5nChOnC/E/ge4 YT+7k/JyTnQBwDRvduTebI1KftIPnL7R+OZZ/8CGye9vuBa+iwAdwrE3hq/nelwhr3Pb 7NXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:mime-version :dkim-signature; bh=i6PGv4ZUKAWV06uB1yhL9icgz9mN5bj5ndLK9GnWxk4=; b=pavEi/GwqbAaPJuZbEUmTQaQl2u36T4FOB9/MoMCQ097iuQVhi70tnxd9JcoWGZsAg 8P55WbnHkcfWjQcolVvuKV5IcTGhCOwRNVDHGl5+1pkye+3H2R5L/DXOtnUO6WrTcQO+ MUR4Ns3BHEQQ1i66vYuaimQvMPfYv62s1FANFWdXfQt/7vm6fgwjWoZt1ydej8/EdVNk lyiItXWPiw7Q4PWj3dlTi6yF3znzQzGjzlAEanBEwoBrRg4wIkA2XlWNppT9vbW6Xg/u 58qxveJRSzaKsMqlNkskwUYHh5+q7OYf63ANXa3FqqvkBZFlaWbUNopD/eb8zj1D4f52 z6KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ci93SS+C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r10si1863240ejg.233.2020.12.04.10.56.10; Fri, 04 Dec 2020 10:56:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ci93SS+C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387521AbgLDSwK (ORCPT + 99 others); Fri, 4 Dec 2020 13:52:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730386AbgLDSwJ (ORCPT ); Fri, 4 Dec 2020 13:52:09 -0500 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26506C061A4F for ; Fri, 4 Dec 2020 10:51:29 -0800 (PST) Received: by mail-ej1-x644.google.com with SMTP id a16so10176990ejj.5 for ; Fri, 04 Dec 2020 10:51:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=i6PGv4ZUKAWV06uB1yhL9icgz9mN5bj5ndLK9GnWxk4=; b=ci93SS+CG6n0v7E4m7ULxrSPf6CyS56AlDA1CA3gLog8XB8KPLFjtY02DPCC+YmAP4 NTSvdsS5QxuDfGgi/5R8/BPFPR4lAhDEO8xVX1Bls2UNztuEGA8hKBEvArcbZdlCdJ2A 1cKBeXmpgNxN0zSk6K6LfBaBlwFOKHTjylz9QYfMs6H8yzKiS7yeBQHbV1Ag3fb5XReo s8+XEqToy4hKB79jSxoqC6b2K1M0P+1wHgJQhJ0VfscYwQO1UyRrGjYV5rkjGpGs+3l3 SZoQGRluKFL7En+aVsfL2tne9XZnX12h/In1vr7/vOHoZLoST6je8O+GsYsV7c5FzIwB 5FZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=i6PGv4ZUKAWV06uB1yhL9icgz9mN5bj5ndLK9GnWxk4=; b=eso9fS13NSivuHaxZkU88G0n0CNfypdViIchrCK/9IL7TxJDZnB8oQ3qa/1p3Fz7hV mRVhtHX6v14H2M29JtxSQNnBxr85H4D8RGSQUHuA6R6AuLc2CkkV9jSxMdzKKsXA7cxV kRDnU3//r69kWO6xwGZ/ly2a2z9/6XNhPMRizz2VLxn9aD9RGH+KvK0op7KuJSzkdnjK wbS83V4MsB2sdoR2Y6DGqaoY+2V4x7e3HvWfIOYaoP3B8OTPXmb49juOtZAk9rj4DPkN YxdtY2f83sjLD5UFj/lfEyCnSsNEhDmmX6IaJkACbWKvNxjBhd88/NeXxuq9QkgowEkt u86w== X-Gm-Message-State: AOAM530FwPbg8mCp5ZfkdhNn+I+lRiDaGSh3LeUArdA6So63I4N6AT0/ XY6GmTH1y9KX15BiJJ2fsGhM5C3YXq+4q+7M4qbgow== X-Received: by 2002:a17:906:2ec3:: with SMTP id s3mr8195458eji.133.1607107887772; Fri, 04 Dec 2020 10:51:27 -0800 (PST) MIME-Version: 1.0 From: Naresh Kamboju Date: Sat, 5 Dec 2020 00:21:16 +0530 Message-ID: Subject: BUG: KCSAN: data-race in dec_zone_page_state / write_cache_pages To: linux-mm , linux-block , open list , kasan-dev , rcu@vger.kernel.org, linux-fsdevel@vger.kernel.org, lkft-triage@lists.linaro.org Cc: Andrew Morton , Jens Axboe , Al Viro , "Paul E. McKenney" , Peter Zijlstra , Marco Elver Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org LKFT started testing KCSAN enabled kernel from the linux next tree. Here we have found BUG: KCSAN: data-race in dec_zone_page_state / write_cache_pages This report is from an x86_64 machine clang-11 linux next 20201201. Since we are running for the first time we do not call this regression. [ 45.484972] BUG: KCSAN: data-race in dec_zone_page_state / write_cache_pages [ 45.492030] [ 45.493532] read-write (marked) to 0xffffd4e284455380 of 8 bytes by task 269 on cpu 0: [ 45.501453] write_cache_pages+0x270/0x6a0 [ 45.505560] generic_writepages+0x63/0xa0 [ 45.509582] blkdev_writepages+0xe/0x10 [ 45.513429] do_writepages+0x79/0x140 [ 45.517096] __writeback_single_inode+0x6d/0x390 [ 45.521714] writeback_sb_inodes+0x4fd/0xbe0 [ 45.525986] wb_writeback+0x42e/0x690 [ 45.529652] wb_do_writeback+0x4d2/0x530 [ 45.533578] wb_workfn+0xc8/0x4a0 [ 45.536897] process_one_work+0x4a6/0x830 [ 45.540908] worker_thread+0x5f7/0xaa0 [ 45.544661] kthread+0x20b/0x220 [ 45.547893] ret_from_fork+0x22/0x30 [ 45.551471] [ 45.552963] read to 0xffffd4e284455380 of 8 bytes by task 499 on cpu 2: [ 45.559576] dec_zone_page_state+0x1d/0x140 [ 45.563764] clear_page_dirty_for_io+0x2ab/0x3a0 [ 45.568382] write_cache_pages+0x388/0x6a0 [ 45.572480] generic_writepages+0x63/0xa0 [ 45.576495] blkdev_writepages+0xe/0x10 [ 45.580334] do_writepages+0x79/0x140 [ 45.584000] __filemap_fdatawrite_range+0x155/0x190 [ 45.588880] file_write_and_wait_range+0x51/0xa0 [ 45.593498] blkdev_fsync+0x45/0x70 [ 45.596991] __x64_sys_fsync+0xda/0x120 [ 45.600830] do_syscall_64+0x3b/0x50 [ 45.604409] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 45.609460] [ 45.610950] Reported by Kernel Concurrency Sanitizer on: [ 45.616259] CPU: 2 PID: 499 Comm: mkfs.ext4 Not tainted 5.10.0-rc6-next-20201201 #2 [ 45.623908] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS 2.2 05/23/2018 metadata: git_repo: https://gitlab.com/aroxell/lkft-linux-next target_arch: x86 toolchain: clang-11 git_describe: next-20201201 download_url: https://builds.tuxbuild.com/1l8eiWgGMi6W4aDobjAAlOleFVl/ Full test log link, https://lkft.validation.linaro.org/scheduler/job/2002643#L1866 -- Linaro LKFT https://lkft.linaro.org