Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp980483pxp; Wed, 16 Mar 2022 23:20:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0XyS3h1tfy8Tat+Pe7VpHGcGuj7hD9SPy34jO01J/6yCycK0ZPzlV7ZvqQC4HoBXtFR2R X-Received: by 2002:a65:63d2:0:b0:381:7d61:fda8 with SMTP id n18-20020a6563d2000000b003817d61fda8mr2502660pgv.228.1647498049189; Wed, 16 Mar 2022 23:20:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647498049; cv=none; d=google.com; s=arc-20160816; b=iCW+14wUDpj25ihsIF/JqFTKeJhoVjfD518Dnj9seCAXx2kdAvlL/+mA/jsKhuXo8y ISUiabmAGACG7DJtExSibonYBy4vPXjanBQSxobvRVRp87sUHf1ROhh2AHOCXOAgxcAA ph36eHk2TVV7vlqPoacQv39KdnHlwjSHmobRCamROvzzKtHmJSBCRPFJHkpRK317iqw1 RCmOuFGmE4k5HYM4SIoKjPUrmS6s+n2pRnH4qJnWftfqRNmg6U8lzeS89syaOQbq5VRf Y7uSKI7yQT9g0S1R6MJ8kxYrVmCDO7+tSHiyLGFkghrkaOcRF1dFR/J92R2KcitrtH7O FS5w== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cXq2f1oOGH/QVCcUKtNMkYqD3Rdyoe0c1zv1D+FyTIw=; b=g1Z3VI4ZllLF9pQmAsYXRcwBwBQU0rBLKKpIFsliDKmg/u59Uy8oOtjDrH3claWVKL sLjCKaPBcXjO//O02tfILCzusg/1lkraF9h8ONyOYfqzdGGzycVNKkUIIlY9GxSHc3OF ZaCICcPTHTIqmoE6otjg1fDEaFx2bdXXWtu3BWRs7OAuSA86cX+rj/JvHU3FXv1RW1YP 1NFIpVVLT0DPTN/43/c2BvWMe6hqv39wc+nYDTUXqyZPobdfnp5JzjtDl6VH5GUiycvT vahKWEa66NJ4unKEgUz49Tik+bX/tJnHCKRMwNDhgquCX2g6j5QdZVxrOBc81oOQORzs zv0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hPKrN13l; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z16-20020a17090a541000b001c5c6abfe10si6605478pjh.12.2022.03.16.23.20.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 23:20:49 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hPKrN13l; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 383CB25C5A4; Wed, 16 Mar 2022 22:06:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347561AbiCPO27 (ORCPT + 99 others); Wed, 16 Mar 2022 10:28:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346760AbiCPO24 (ORCPT ); Wed, 16 Mar 2022 10:28:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B2A93DA66; Wed, 16 Mar 2022 07:27:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0F6126109E; Wed, 16 Mar 2022 14:27:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDD9FC340E9; Wed, 16 Mar 2022 14:27:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647440861; bh=762Kh2bHP6hZroubEcQdUZQh9o7s+lhL2V5p8GDbWQM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hPKrN13lvASdiKbX0faq4AjalQy1MhrUJs+7NLOXfY0cPcGVFBht0BBK4ZLGjUOmB ON2F9WZLAC9GP3tmHWb7gohc1lO7HjoEMPVFoirI5ga7BST2KS9r9X7GGM0VB6Ee6p +x6ohsdNbBbQe8tJQ+0ZfHpHY9YNKTvv1pK/C/JY= Date: Wed, 16 Mar 2022 15:27:37 +0100 From: Greg Kroah-Hartman To: Michal =?iso-8859-1?Q?Koutn=FD?= Cc: Zhang Qiao , 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: References: <20220228172207.090703467@linuxfoundation.org> <20220228172208.566431934@linuxfoundation.org> <20220308151232.GA21752@blackbody.suse.cz> <20220314111940.GC1035@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220314111940.GC1035@blackbody.suse.cz> X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,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 Mon, Mar 14, 2022 at 12:19:41PM +0100, Michal Koutn? wrote: > Hello. > > In my opinion there are two approaches: > a) drop this backport (given other races present), I have no problem with that, want to send a revert patch? > 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). A fixed up patch would also be appreciated :) thanks, greg k-h