Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1696213pxp; Sun, 6 Mar 2022 23:45:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEst3HQ7jFaR6GFns6SGK7NE5ux0feEtk00IKYVA6U6cVWi/5MBpl/uoEc68WLezFHwlMj X-Received: by 2002:a05:6402:370b:b0:413:3bcd:3d0e with SMTP id ek11-20020a056402370b00b004133bcd3d0emr10068736edb.178.1646639142069; Sun, 06 Mar 2022 23:45:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646639142; cv=none; d=google.com; s=arc-20160816; b=R9yLG7CTdEcVuS6QmspJEOL+fYvv8ImrX+kMTDxvwZPDxMbXPAWvUTY48ivXx1krZV ff09DQLNmWexCD5L6I5088wR+ylQ/2x9RNZHlCQSEnrjjGB3nq9EMlbR6QxMdyHjFUiQ 25e0tOjRADTdUfFeyaEDakhXipj96ksdNSPRksXKDUCOB9IvNDYoyyfYMNSMSvi4Ialj MzP1OdI8i9268ca/xyvDjKM1tFbYyJBv02Dzz4YQ3lnxvMN4Xqvz87qZdlHSRckIi9qA CUgjQW35KlAV8pK6Yoxk/waeZcIt2KpFS00tSPgGTboJ6OMdIAAKfKOUkBAzRHalPwh9 sUnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=QRos77OuYahI5W9WnsHXgbvlDejxkrLInVdGyJ2rr7E=; b=YthCM0ix7l4+EeCXd/qChQYLi65TMQI0X3Npig17ZZ2VF8D8e6rfKZ5JoP9jsI5WTr 8NYRyu3Ufoi5Uko9ElOdAMNope5U79plvmOmKF4uTK0Yn3UTnOR9jSWKnIMOzZwhPLz2 I/yhTIReVPezzwkxJ0VNn7RxWdHxRvtDSbBeEaJu6eTWAPnlWHrjfA9tKKLPIMMgLDhD pnc5EHdpYtVMOCOVV+DaKKr0VHHTMoxguqf/Ui9D8JWt4nZdz2IlakJQlZInruSt3zb0 XRBoEQqIyGVIRQSwOXbal422HKA2jRFODRcuyIg1iWL/uUClGXkFM/xJp2gP2F1XqDHL 7E1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AWosRUzN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v12-20020a50a44c000000b00413c9ab019bsi7855555edb.290.2022.03.06.23.45.20; Sun, 06 Mar 2022 23:45:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AWosRUzN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S235403AbiCGFzj (ORCPT + 99 others); Mon, 7 Mar 2022 00:55:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233216AbiCGFzh (ORCPT ); Mon, 7 Mar 2022 00:55:37 -0500 Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FBB85B8BC for ; Sun, 6 Mar 2022 21:54:43 -0800 (PST) Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-2d07ae0b1c0so151374637b3.2 for ; Sun, 06 Mar 2022 21:54:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=QRos77OuYahI5W9WnsHXgbvlDejxkrLInVdGyJ2rr7E=; b=AWosRUzNwLSzhGtqZqZuQXj+VF1mkxwHARPfyirpW9O8wax8OzX3d2jKzUjBFnmRwW anTC0PT7t4VdwOw7XTPXsJsxxEYbEpk3lm+l+ARif9Cqkq+n7bwN/DmEZrHYfLAsnkGs NtHYcxSLr+3hIANbrqSb5fs5nTLTgqNBtXflGhdw8tRvRCqbq/QeTo88PXR8AdwiwH99 ZfMfO/wq42o3JFGGW+ITQDTnkjNjkjmnjxXaWstalQOWXMrcuMCUbdXPVMsy69YcUcfn p0xK29odBS4uczBG21T7ky4emPLjylO5i9/dbTaGzYMjOOAF3ughjkE5JSjr20ixe18t W+Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=QRos77OuYahI5W9WnsHXgbvlDejxkrLInVdGyJ2rr7E=; b=TN+UqvflnqccobbCblAGoc+TWd+aV9n7bwFd3QUIBKAv5Y87IGKHk/hCxDWKGoaTPK Mj39YjT4ikuCWWp4EbrzKosY2OY029ZAqxnyzGRL7sJtWzpLJKLTAt/eWt0R1IQQH1WU CvTA435Jh1q7a/pOBUAJnzlJRQIUTdpMNvMuYgZeVwNATqcF2UpUVFSRs4BLSvABfGGJ C2ocWkuRUFf8jrfYVt5Rp46piRktzFnQYH1qiw/WAAPgAbqcsJZvA3aUXWky+6E4DDnl RH2iRKDR/rvivi7qOSm8TDQ20j9x2xFmyi7UPswZBE1jl+RbAlMiEkB1CbxIVeOwcXA4 0hFw== X-Gm-Message-State: AOAM5336wh1Q2BLAES4Pcilv73WhEm/jPoMjnYUQs6XoGbdOuKvLbJws dq2PjKR9fhncQtFPOZqR2cOjwCuXB7wihm4CNoSjsp7mNBiZQaJE X-Received: by 2002:a81:2f12:0:b0:2d7:d366:164a with SMTP id v18-20020a812f12000000b002d7d366164amr7509616ywv.265.1646632480686; Sun, 06 Mar 2022 21:54:40 -0800 (PST) MIME-Version: 1.0 References: <20220304194408.GP4285@paulmck-ThinkPad-P17-Gen-1> <4d828b01-b636-e0b8-0241-656331f27de4@bytedance.com> In-Reply-To: <4d828b01-b636-e0b8-0241-656331f27de4@bytedance.com> From: Naresh Kamboju Date: Mon, 7 Mar 2022 11:24:29 +0530 Message-ID: Subject: Re: [External] Re: [next] WARNING: suspicious RCU usage : include/linux/cgroup.h:494 suspicious rcu_dereference_check() usage To: Chengming Zhou Cc: Zhouyi Zhou , "Paul E. McKenney" , Linux-Next Mailing List , open list , lkft-triage@lists.linaro.org, rcu , Stephen Rothwell , Peter Zijlstra , Ingo Molnar , Will Deacon Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 5 Mar 2022 at 06:27, Chengming Zhou w= rote: > > On 2022/3/5 4:28 =E4=B8=8A=E5=8D=88, Zhouyi Zhou wrote: > > Hi Paul > > > > Yes, your suggestion works! > > Thank you for your guidance, this is the first time I ever did a > > bisection, I gained greatly during this process! > > Hi Zhouyi, thanks for the bisection test. > Could this patch solve RCU warning? I just tested on my machine and there > is no RCU warning any more. This patch solves the reported problem. The test link provided below [1]. Tested-by: Linux Kernel Functional Testing > > diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h > index 1e356c222756..0d1ada8968d7 100644 > --- a/include/linux/cgroup.h > +++ b/include/linux/cgroup.h > @@ -450,6 +450,7 @@ extern struct mutex cgroup_mutex; > extern spinlock_t css_set_lock; > #define task_css_set_check(task, __c) \ > rcu_dereference_check((task)->cgroups, \ > + rcu_read_lock_sched_held() || \ > lockdep_is_held(&cgroup_mutex) || \ > lockdep_is_held(&css_set_lock) || \ > ((task)->flags & PF_EXITING) || (__c)) > -- Linaro LKFT https://lkft.linaro.org [1] https://lkft.validation.linaro.org/scheduler/job/4664565#L339