From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 343F1C433EF for ; Thu, 19 May 2022 23:26:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 948266B0083; Thu, 19 May 2022 19:26:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D1758D0002; Thu, 19 May 2022 19:26:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 749F96B0087; Thu, 19 May 2022 19:26:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 60FD46B0083 for ; Thu, 19 May 2022 19:26:54 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 2DCC93412F for ; Thu, 19 May 2022 23:26:54 +0000 (UTC) X-FDA: 79484079948.29.3F7B1C4 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by imf30.hostedemail.com (Postfix) with ESMTP id D07B280003 for ; Thu, 19 May 2022 23:26:28 +0000 (UTC) Received: by mail-pl1-f176.google.com with SMTP id s14so6018112plk.8 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=eRCkgsxR1vtwsOhkw/OjvKDFQ7FAV+YMc7r2PN3wKE3fxIEYlhgQ0EDdGm/MPzcAwH IRcexf1SxngITs83jjta9kUVAxLmbFvVJFPRaGYcubTQzc0w4XND7NFupZLTusjCZMn7 afe74uGhdN1oJCLf8k5eKwB6OactWFMtJx2VV5BDBoYQlR76o6TSN/Orb9Ebp/e2gr+Q +jLXFULBKVVkFmTke0PoQ+xzdWWlpv2xMYAbDBcVfgymjba045VWiKVsZKuLV1cj+vcf 2iFusTfk4MKcAZrtSHYkH4Ok7nisMwpLXaIBbvwK0Qnj9MDmOocQIpfnHgcoa8uOhnPn 1QXQ== X-Gm-Message-State: AOAM531o35p04q55KbOxV4zgtsIdisJ2GovRuD01AduDKlDfBiVyo1ee T6/2ZbKfDlmfUWU5ndAw1lhHnQ== X-Google-Smtp-Source: ABdhPJxC3sL7IlF6/2bkocTtvRtFPFk31HnOm6sQ7cWChMzqF2T8P3M9K3yVRRgsFfLIzJ+MW3QHiw== 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-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: D07B280003 X-Stat-Signature: rwpmfy9iej83fpbnxqejo89jpaqsatzd Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=Iqx87aOK; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf30.hostedemail.com: domain of tadeusz.struk@linaro.org designates 209.85.214.176 as permitted sender) smtp.mailfrom=tadeusz.struk@linaro.org X-Rspam-User: X-HE-Tag: 1653002788-919677 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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