Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2251721iob; Fri, 20 May 2022 05:34:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRHOe8AE6W4n7kkkaz2jsKvN3PmfX9HS7ZhNA3Vhru1XlgLdwDsE+X6qKaCfys1tHj3T2T X-Received: by 2002:a05:6402:486:b0:42a:f08b:8928 with SMTP id k6-20020a056402048600b0042af08b8928mr10659493edv.14.1653050068107; Fri, 20 May 2022 05:34:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653050068; cv=none; d=google.com; s=arc-20160816; b=KVDRoOIvgBqUEkETIv8yXlD88CDbhvUREFhsDHK5pYFZ0NstJxzo5JJOEQOPAR4sSW 49C5HxoRCm6Wo1yG2UfeABqpLCQmB2LP8wKO2dQRHAkmJfnN3wHMqj0FRJtV0yUdvNDG 24aOASoTewZTiI3aioj2FqeH+N0qCf/Cvl59wXLxFx3vAEyKHBB1ubPdh6KoLQbPUiMW uD7oUi67kJM8Mf/DgiFoJy2g7/7LFdCq00xpTSFQigfW8KVRdbWvaNHAGD9BEPYUd7X7 XKXM87G/oA2sBqNSITWGOXI918dV+iI5MfjCzZLKIyPmAMeoK/tveQgpjJUEQYaMduTL ZMTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=hN1UVFZcHVZe/aX8AZVRuJQjZ0Tbe8mm2XkylAcwM2E=; b=xzgV58V+zJ1A8NgwMtdC5mXrsaL2UAKyQtIAP9ZeKNGTwIihOZnppPYE1sgF6fHqg/ E8xGev0B0yOPwHOs/mfJyU9fhYfNoSYSA9EHig5n9FeQOAa9HJn3uYuxt4YZeQB5JlT4 BeOZOAVbaWqt8fdiwS8t732mx393YoWpbyUDRV2wOClpndYSmOc3Ga/zme495QtNb0CW /0fxd9pSrwmnlcsZaSrvjtl/b+swaJyP8WrkXzk95OXLVf7IFl4vtIJRFAUN0AQd8Bv/ qB5OT+mu8T/kYmAJVeG/RvWAscs20JKIlgwtzP3xA1zVQrUO5ooTUuoYZdxrxfgghkOK oZKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Iqx87aOK; 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 hv12-20020a17090760cc00b006e8af79cefbsi8820327ejc.523.2022.05.20.05.34.00; Fri, 20 May 2022 05:34:28 -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=@linaro.org header.s=google header.b=Iqx87aOK; 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 S1343578AbiESX05 (ORCPT + 99 others); Thu, 19 May 2022 19:26:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231651AbiESX0x (ORCPT ); Thu, 19 May 2022 19:26:53 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B3AE5DA77 for ; Thu, 19 May 2022 16:26:53 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id q4so6013041plr.11 for ; Thu, 19 May 2022 16:26:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=hN1UVFZcHVZe/aX8AZVRuJQjZ0Tbe8mm2XkylAcwM2E=; b=Iqx87aOK7wpiNZHttyixFPp5iLKq5cuPG4xod0y/8C60/7OyXuqOQOVuYkLBVMuJDR 9XZIpYJEgOGxheBl0mxJIn1KZfETUspRD39YlDiCMGSGcWVZRFudDwZF0KAYKVK865ZZ HD++V2ZLr7kltRCjK52M94uddECJQe+8XE1/tj/BirgSAKbzU95zOOpHv16cpb6dg228 3eYV30mtl4ul1sCzkeeW2UGY2gRcWrA9DsCYp5OXn9cqFV3RhtNX/dlq8P2u73tArNPh CsvYZVMY8OP3fl8yYklfgyue1OLYRLd4MnHqX3Pzq9uR+atbTDZAXue6x4SlQP1zFU9G UuAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=hN1UVFZcHVZe/aX8AZVRuJQjZ0Tbe8mm2XkylAcwM2E=; b=Faxbl86Q4eFJ9SgeZ/IEM8K2aiJaldi2LLz00y4gY4MkfUQ0buFjorZb9S6UAOLcHF XWPWXinZdDxZH90S/yqTNBafWd1jjDaoAZXmSXqDGe7VmAX7q3H+wi1f1jma6zcI/maE tJf701Pky8bL5wGL3zN3usK6ogkDbgoNtj6k7svQS/zvN3gt1cvtXQzkF3Vte8PRgU7Z gws6JByoPfNE7OUuzfgMoNSY7ChGqk9iroFhs/C+71TbD5RPcdufTjtXQCzgbgGqBJgZ /6Eq32gP6PBjrLpKItqQZxsYs/Klv32W/YlvmCg7QCDZbYFb2rOxSjxRumK6mp/Kk+gh eT1w== X-Gm-Message-State: AOAM532Spimhm7vFpxSPnQ7Q/ez3u4IiMB+jZJF/eT9jZI2Cd/9oa393 P6Q05isH7WTSeMSK8ivGM7VfhQ== X-Received: by 2002:a17:902:9a4c:b0:156:6735:b438 with SMTP id x12-20020a1709029a4c00b001566735b438mr6756466plv.46.1653002812546; Thu, 19 May 2022 16:26:52 -0700 (PDT) Received: from [192.168.254.17] ([50.39.160.154]) by smtp.gmail.com with ESMTPSA id h8-20020a654688000000b003f60df4a5d5sm3847797pgr.54.2022.05.19.16.26.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 May 2022 16:26:52 -0700 (PDT) Message-ID: <25fb057a-077f-b601-dcb7-130071c733db@linaro.org> Date: Thu, 19 May 2022 16:26:51 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] cgroup: don't queue css_release_work if one already pending Content-Language: en-US To: Hillf Danton , Tejun Heo Cc: Michal Koutny , linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzbot+e42ae441c3b10acf9e9d@syzkaller.appspotmail.com References: <20220412192459.227740-1-tadeusz.struk@linaro.org> <20220414164409.GA5404@blackbody.suse.cz> <20220422100400.GA29552@blackbody.suse.cz> <20220519112319.2455-1-hdanton@sina.com> From: Tadeusz Struk In-Reply-To: <20220519112319.2455-1-hdanton@sina.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, 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 On 5/19/22 04:23, Hillf Danton wrote: > On Wed, 18 May 2022 09:48:21 -0700 Tadeusz Struk wrote: >> On 4/22/22 04:05, Michal Koutny wrote: >>> On Thu, Apr 21, 2022 at 02:00:56PM -1000, Tejun Heo wrote: >>>> If this is the case, we need to hold an extra reference to be put by the >>>> css_killed_work_fn(), right? > That put could trigger INIT_WORK in css_release() and warning [1] > on init active (active state 0) object OTOH as the same > css->destroy_work is used in both kill and release pathes. Will this help if there would be two WQs, one for the css_release path and one for the rcu_work? diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index adb820e98f24..a4873b33e488 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -124,6 +124,7 @@ DEFINE_PERCPU_RWSEM(cgroup_threadgroup_rwsem); * which may lead to deadlock. */ static struct workqueue_struct *cgroup_destroy_wq; +static struct workqueue_struct *cgroup_destroy_rcu_wq; /* generate an array of cgroup subsystem pointers */ #define SUBSYS(_x) [_x ## _cgrp_id] = &_x ## _cgrp_subsys, -- Thanks, Tadeusz