Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp36199pxb; Fri, 17 Sep 2021 18:00:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzM3j7MwH+UNP9t91GchzzFguzy5QbLp5HGI6ltJjRTxm0j7JZOqyNAi6Yhwta7Khr6GxFq X-Received: by 2002:aa7:c459:: with SMTP id n25mr15454613edr.29.1631926841130; Fri, 17 Sep 2021 18:00:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631926841; cv=none; d=google.com; s=arc-20160816; b=B8ShRMmP1c49sKBPljqWEzvffvM1QQe56xff7+x/lmEPcg0A/7xBXbDZQyYHFwG7DI f3BhHLzuUuq+OO7tphgZ9qevV8TiWzpre2dJiCOkgKS3mjySSSJJ2gNptU64wcaAyPHc AwWacj6TApAA37DZ377qtqKad9BuYOfxmnNJz8fVyYzbilqQnVLRvwdStKVVyG5t+2Ym u7irFKnJ+jS70TlOqJon+dQHa2f6Jzg35cSYHGdtWW1sK+ri4bSVlCG9cHHy2suzztbg v70p4HFBD2fwggjTJekhVFtD6DZyoj5JnM6/pmfjszZdkvx5/VBibgcZQ5NDxsu0Tcr9 jI9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=HwaqMdctCtkMhcrq7X60eNjofQ9lWwgd/iusn9WBbEA=; b=R5PMJSXnYmfwqb2LA0Q9hF9H9EDnPRZR5i5+7PoYQqtKjbWf/CvR1pWnKC+gWAD6SF K8eiZ2bt5x1/cPtpn+3ltvfy/iv+xwvkAR5giybr2FM+ZRMrrXGxxnFh23anAPnf179Z p8T0I6BOKuRfjyP1yAwvIbmIScjdd0EPU5Px3Fz0OVO/hL2UVkQjidKQOHm3EykcNWXy Fx324v8H4MGWZ00OaQXCMjBRUQfC7NLgJwcDn1pEYtS889qPLdmqjv1sKJ21Ku/zaJ9a BWVRL7y7KRj+bGc1rCKK5TeT6GhVDHVl/O9KzXtF3iomWR/pxzcBgcl0LOh2NedOpFxa t0jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=PbJoSdNs; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j5si8472563ejm.413.2021.09.17.18.00.14; Fri, 17 Sep 2021 18:00:41 -0700 (PDT) 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=@suse.com header.s=susede1 header.b=PbJoSdNs; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237792AbhIQQmx (ORCPT + 99 others); Fri, 17 Sep 2021 12:42:53 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:41954 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237759AbhIQQmw (ORCPT ); Fri, 17 Sep 2021 12:42:52 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D08C822114; Fri, 17 Sep 2021 16:41:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1631896884; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HwaqMdctCtkMhcrq7X60eNjofQ9lWwgd/iusn9WBbEA=; b=PbJoSdNsPCqlSw0D7Sh3n5rTllj5/wyXxBazr+qWOZMoQQlBybauEnqI8Gm8V/sIq94w/D Lcp7rqPruJvO6LS5nLeXi8LvYc/Ap59lR/G+GBU1X9xN+Ig4Ea3rZYKd4MMetz4fi95PKC R0JnTVpP0tBXTFhSmBy091qmE2UTVcI= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B994213B7E; Fri, 17 Sep 2021 16:41:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yOPKLDTFRGENWAAAMHmgww (envelope-from ); Fri, 17 Sep 2021 16:41:24 +0000 Date: Fri, 17 Sep 2021 18:41:23 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Hao Sun Cc: Linux Kernel Mailing List , cgroups@vger.kernel.org, hannes@cmpxchg.org, lizefan.x@bytedance.com, tj@kernel.org Subject: Re: KCSAN: data-race in cgroup_rstat_flush_locked / cgroup_rstat_updated Message-ID: <20210917164123.GA13346@blackbody.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Hao. On Thu, Sep 16, 2021 at 09:53:55PM +0800, Hao Sun wrote: > KCSAN reported the following data race during the kernel booting when > using Healer to fuzz the latest Linux kernel. > [...] > cgroup_rstat_cpu_pop_updated kernel/cgroup/rstat.c:139 [inline] > [...] > cgroup_rstat_updated+0x53/0x1b0 kernel/cgroup/rstat.c:38 FWIW, it's a "safe" race between updaters and flushers (possibly missing the latest update(s)). This is expected as explained in cgroup_rstat_updated() comment. Michal