Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3005671pxp; Mon, 14 Mar 2022 09:01:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsB/XMe0seB69fD5qmgPp3f/XBKPzw2wgqq50jriPODc84ZeZE8uadlWuFFn+A8T40k8dh X-Received: by 2002:a05:6830:16ca:b0:5af:6a75:c7b1 with SMTP id l10-20020a05683016ca00b005af6a75c7b1mr11117014otr.292.1647273710950; Mon, 14 Mar 2022 09:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647273710; cv=none; d=google.com; s=arc-20160816; b=mE81pnrikdyL2IChCPgu3fbY8KojTyrFKIk9GN+GPuLn7KOG5wkJMKeL62H+fXH/z9 GQ06IW+BajTZ9ZAeeb/kKxKWc8XmG4ZRWmNcU8zkz6XN7S47H0PqRo2RaE4/Dz/XXdrA lszhsLNhPct27ajuF7JZMj0hdSIIrbsKU9f2nkIlTay0WvPxlHdNpCUKpHdKzwd2c4zI +0EiuzuNmqIzr8i9wixlfVTcuNzkxm0FF+xF+Dxeupebt0gvhcKsEeYRwweZ/tm6IMD5 NQKCXolScQyxGdiFAmd1k2yx6gVce0ikmRM41fRr2BFl/TED39lwTfWH22pYNUOeO+Ai 6mtg== 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=7f69I2PGb5frPZtdQxRvJIr22WJIzyh/Ui3ZiyFTOaw=; b=xSzCaorisbHuEeOxplrZtF8LkSktBJz4f6UeSFDzN6sOHZIAOOXjMWF/ahVkWd2Mmo eZT0eBg0GR49vw7R2DvPMuZzp+vn5JGffF/lo8suoBaV9lNVuMj2QGbVx8NbeQj0oFem Y0AamHF6i01Ql4WV1CJ4bCP8/ZqDPEUvX9aTeI47KWYJRDaSBdG149VFvJFzlvfJQ6jH iFGxpcCujTmdUv7Ueg6d1YukAnJZ7vTo4ZEaw8tyZY1PQoHlthqrM0774U7xO0V09rwH Bpfcn7zNQdLL1AOZ2aMTvwn/I3xhtXQlu0lGf2A/1w/mB/MZ1hFg+n7Giw+L+etxvCZw mdXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Z1SXGFct; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l44-20020a9d1b2f000000b005ace2f7adf6si10385811otl.106.2022.03.14.09.01.22; Mon, 14 Mar 2022 09:01:50 -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=@suse.com header.s=susede1 header.b=Z1SXGFct; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238875AbiCNLUy (ORCPT + 99 others); Mon, 14 Mar 2022 07:20:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231602AbiCNLUx (ORCPT ); Mon, 14 Mar 2022 07:20:53 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44CBD3A183; Mon, 14 Mar 2022 04:19:44 -0700 (PDT) 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 EF917218FD; Mon, 14 Mar 2022 11:19:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1647256782; 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=7f69I2PGb5frPZtdQxRvJIr22WJIzyh/Ui3ZiyFTOaw=; b=Z1SXGFctzMw6RcvgIGzJJmcFiyxR38Dcn9C1ppw5lJf5FeQeKFflFm8TmPoGV8cUR+WkbM xulZgxS4U20DTfkUDlUOFvp/olP7wx3w8vDEc5aLQup4lxBVAuIIGawryepBYHK3v3zVcr iFMXgeNTmUDpFfSP4jB0XoDqMtJ73Rc= 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 D68E413ADA; Mon, 14 Mar 2022 11:19:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id rz/nM84kL2KFHwAAMHmgww (envelope-from ); Mon, 14 Mar 2022 11:19:42 +0000 Date: Mon, 14 Mar 2022 12:19:41 +0100 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Zhang Qiao , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Zhao Gongyi , Waiman Long , Tejun Heo , Juri Lelli Subject: Re: [PATCH 4.19 01/34] cgroup/cpuset: Fix a race between cpuset_attach() and cpu hotplug Message-ID: <20220314111940.GC1035@blackbody.suse.cz> References: <20220228172207.090703467@linuxfoundation.org> <20220228172208.566431934@linuxfoundation.org> <20220308151232.GA21752@blackbody.suse.cz> 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) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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. In my opinion there are two approaches: a) drop this backport (given other races present), b) swap the locks compatible with v4.19 as this patch proposes. On Mon, Mar 14, 2022 at 05:11:50PM +0800, Zhang Qiao wrote: > + /* > + * It should hold cpus lock because a cpu offline event can > + * cause set_cpus_allowed_ptr() failed. > + */ > + cpus_read_lock(); Maybe just a nit, the old kernels before commit c5c63b9a6a2e ("cgroup: Replace deprecated CPU-hotplug functions.") v5.15-rc1~159^2~5 would be more consistent with get_online_cpus() here (but they're equivalent functionally so the locking order is correct). Michal