Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp182987rwd; Wed, 24 May 2023 16:22:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4MP00jAP4qSl4BKWgILl3heg3qRD9zacuBu1JYuw3MrZ4bnRwvKUW0h3Uz+/2yTN2fA+GC X-Received: by 2002:a05:6a20:3ca7:b0:103:e735:d157 with SMTP id b39-20020a056a203ca700b00103e735d157mr21540012pzj.59.1684970553008; Wed, 24 May 2023 16:22:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684970552; cv=none; d=google.com; s=arc-20160816; b=QqrgF+CmNx9Fh7OZza0B4Y+6qNK6zcxxNp5bkcqmIcnLyQcoZOdPHyMmbDLHoHXAuD yc3mIxpehtbg2exqtsmpl0cQcUavFtHjOqTE+kbe0O7aRI9dVnyPVBSKtzAdZH7SzOM2 A2231HR+kWH1tpul6+y/6qV2PqLv60zP1Q1hRNY5eTE4Lg7XBhYX69NC9p74Skc4h695 9iHK2c7HWA01VOV1Tjh8MuymSga93lJEQkuYg4PVtOwTH/oIowKa1kGD0SdOe4XD2WDA cXYFY5hF/cg3Se5nLOn0zENf+AUOtOhWx6fWDq1fkQeU5S5V3Y4gowWk8vY7sX+19cUK L3UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=8Ps4++BD4n2hLwrgjdjqi8hVhoVdzFMxyoqft8e+OG8=; b=P44iNUZYq5KrgwhW2k9Y7hVXH2AbivnNnO7vJmX92yUdg4HRd4DzDWInyD9hdytiqd PftBy0PAjE3D1UJBS6tyrmEH9VUvTdA29mlJTd0Ynpr3ph895y0JMvosVjXMq533+l4W e86KIoAMDU4IrrgrPUC0UILPy9+W9tGE/dYAsAIF93Gdigmyk6zg5X6sCZAdyTCY8V/Q NW/BVCK6hWIbFQ9d3JCTtcAqmU7hNxE3JuuPcSx73oto0AL+jUWE1EZ0VwLhcONQ1/ZD T2jZi3bm3iM4iIWFHFuLBN9dPvGK5FSxf7UNK6jJWkX3CDnM9HSv+hQIU0+nNFbMFnvz AZpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=BxSoVxn1; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 76-20020a62194f000000b006462cc07d9esi1809494pfz.300.2023.05.24.16.22.13; Wed, 24 May 2023 16:22:32 -0700 (PDT) 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=@gmail.com header.s=20221208 header.b=BxSoVxn1; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237992AbjEXWZo (ORCPT + 99 others); Wed, 24 May 2023 18:25:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237843AbjEXWZk (ORCPT ); Wed, 24 May 2023 18:25:40 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61F59E5A; Wed, 24 May 2023 15:25:12 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-64d5b4c3ffeso1135388b3a.2; Wed, 24 May 2023 15:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684966995; x=1687558995; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=8Ps4++BD4n2hLwrgjdjqi8hVhoVdzFMxyoqft8e+OG8=; b=BxSoVxn1ynWjBrokKf8e2fM0dA5n50KyomGLR6Vb0G9LzB6NAEHYiFrT4g5TK2m6UL oedNlWCgSX62iIQofjo1qmkaElTaq6b5I6kq6gGdjZXZ6K/+36AhJJbdkGXJD7iQffAh McYJRjGRXeot0dRQzR3QWFJChJTGtNL0cCeLIM2ZM8Llf8ZlWQ3zIIi4hAAbHYtusfHE qlumgkbFb1g3kUL/n1jwjxgRG+iyDv0MUW7EU7Kpq/QGyKc0U7Y+1x5IejkhicHrp3Md TJLsGeLA+SCSNzpsj6GBh7jTyV4qBGQxUAh1gIJWUMLhW6bFwEU6srNqAr0MaVT9FIJr e5pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684966995; x=1687558995; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8Ps4++BD4n2hLwrgjdjqi8hVhoVdzFMxyoqft8e+OG8=; b=PJatAMBXnrEW1Qj8lzN1B3AlBNOBpqkJoJ6kB741Ag/2d5Tl8e5xJfRrQd4NK9qEjA s2B70DDYYzgvSqLiYPCRMIQtZyMB0bVmkUcfpM6chiYcQJLp6jWMRZa1dn6Hp6N1cTBs 1V4eVZ9fECadULL7L72yXJ14g/30agkBtih1Q7zGG8N+umqJi89jH0D4xqO/JB2NVNlA Fff9IGMWLPPVToIBXVP50IqSj6p0uVW4Uh9ALrNVypUSjxkLYPn6ZwTCdBKHaXIM/D/q DNsX1AsySRClqQbtxlYNQO7poXfHfH4cJNv/UlkKnjLmeNAT1HKltfWa3lKogSHXJe8U 7W4w== X-Gm-Message-State: AC+VfDzPTrkC9/5GUawNdqiOCgEwoS0WIofhIQjB4AyYMvEvs/AOYU17 MlUoUXE371VSDUp7xpsp4Sx7FwVVMBs= X-Received: by 2002:a05:6a00:2352:b0:64f:40bc:74f3 with SMTP id j18-20020a056a00235200b0064f40bc74f3mr5277927pfj.13.1684966995101; Wed, 24 May 2023 15:23:15 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:be57]) by smtp.gmail.com with ESMTPSA id t2-20020aa79382000000b0064d1d8fd24asm7912810pfe.60.2023.05.24.15.23.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 15:23:14 -0700 (PDT) Sender: Tejun Heo Date: Wed, 24 May 2023 12:23:13 -1000 From: Tejun Heo To: Xiu Jianfeng Cc: lizefan.x@bytedance.com, hannes@cmpxchg.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next v2] cgroup: Update out-of-date comment in cgroup_migrate() Message-ID: References: <20230524065431.145434-1-xiujianfeng@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230524065431.145434-1-xiujianfeng@huaweicloud.com> X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hello, I further edited the comment and applied the patch to cgroup/for-6.5 Thanks. From 659db0789c2e66c5d6a52d57008e3a7401a3ffff Mon Sep 17 00:00:00 2001 From: Xiu Jianfeng Date: Wed, 24 May 2023 14:54:31 +0800 Subject: [PATCH] cgroup: Update out-of-date comment in cgroup_migrate() Commit 674b745e22b3 ("cgroup: remove rcu_read_lock()/rcu_read_unlock() in critical section of spin_lock_irq()") has removed the rcu_read_lock, which makes the comment out-of-date, so update it. tj: Updated the comment a bit. Signed-off-by: Xiu Jianfeng Signed-off-by: Tejun Heo --- kernel/cgroup/cgroup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 9d809191a54f..f329f49529a2 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -2872,9 +2872,9 @@ int cgroup_migrate(struct task_struct *leader, bool threadgroup, struct task_struct *task; /* - * Prevent freeing of tasks while we take a snapshot. Tasks that are - * already PF_EXITING could be freed from underneath us unless we - * take an rcu_read_lock. + * The following thread iteration should be inside an RCU critical + * section to prevent tasks from being freed while taking the snapshot. + * spin_lock_irq() implies RCU critical section here. */ spin_lock_irq(&css_set_lock); task = leader; -- 2.40.1