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 D6299C433F5 for ; Mon, 23 May 2022 19:00:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 789EB6B0006; Mon, 23 May 2022 15:00:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 713696B0007; Mon, 23 May 2022 15:00:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B42D6B0008; Mon, 23 May 2022 15:00:09 -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 4B2036B0006 for ; Mon, 23 May 2022 15:00:09 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 22DF421200 for ; Mon, 23 May 2022 19:00:09 +0000 (UTC) X-FDA: 79497922938.14.E7E7590 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by imf18.hostedemail.com (Postfix) with ESMTP id 7661F1C00D8 for ; Mon, 23 May 2022 18:59:52 +0000 (UTC) Received: by mail-pj1-f52.google.com with SMTP id z11so5027053pjc.3 for ; Mon, 23 May 2022 12:00:08 -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:content-language:to:cc :references:from:subject:in-reply-to:content-transfer-encoding; bh=qHQRWZlwoGdU6ErLuvWwml1oIPtHMNgZBkNaf39Pttc=; b=FbNXo+LPE0KG9Vjin2ENCUx+ZWqjd4ldDj/qAZEAYVpiphL2DMX3v6vce9afabzjzu GMo/8spdJjJhSA3UhWf4YOxg2yO0d5ub3rmpnOg5yo23NKY4fLO7eOEKoPdRG/vIlt7w wbDQiwkGA3ZMF+h2eac9ZaqgWJtOxzXkjtdeKzggrGUeIBwdKf0ovKLmhWMnfLrkdkcb tyi5PmB/yvaaiAojn48DrGj2ZkkKa3c2jnPLUgIXQAv/pJPuU1S17QEVcoXpQ/5ePIFu YChC3fPNAsKFkJDmtNmgnTKJsFmTHaIVKHt34/kN9qjk0tQ/D0pTBX3QSL73mI59pR2c JpXA== 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 :content-language:to:cc:references:from:subject:in-reply-to :content-transfer-encoding; bh=qHQRWZlwoGdU6ErLuvWwml1oIPtHMNgZBkNaf39Pttc=; b=zIymekwJiqoo+ajb1m/YdF4jhQtoj62V9kGKEAcA/xhEWGiRRjB4ZuUfNgbb99UGmS 8JW/TJq4nFCwoCTxTjnGlUla5138Wqno6RZyoaMo3WEMjntDkyTKRa8kR51lDW8odC4n Ue5P7b+7ufFtEjqaEtKML7+bgbgN73xO9VlDpedaCoF6N6I4R7hInEx6Eh2xgO8QwWYI B2v9vrQy0o6AvJRvc1OxeyE01zrMxHmdVf+d5ogBn3pT5I9jF88VKdkreyZJ0LOKGVsM bs2OEmafdULKFKHGFqyAbqNB6QS44IyEiKLWimsZN93RUSDXhoEo2hnYQFX4QEFZFfN2 5Flg== X-Gm-Message-State: AOAM532vipDkzZC3uGD3VRvxEJ0Skp9OtMtbAKVZla2Du2Y15TOqY0Xg 37+DrU3v/EGF4AviUnzpyAT9tQ== X-Google-Smtp-Source: ABdhPJyYFIHlR3rSrGu04Wy/eyHyWZWBnhW8nj1/UxMh9uz+nOCDIJ3y/IGdqu5e7koIeu2X6K3/VQ== X-Received: by 2002:a17:902:ab1d:b0:161:527e:277 with SMTP id ik29-20020a170902ab1d00b00161527e0277mr24044794plb.73.1653332407430; Mon, 23 May 2022 12:00:07 -0700 (PDT) Received: from [192.168.254.17] ([50.39.160.154]) by smtp.gmail.com with ESMTPSA id j4-20020a17090aeb0400b001df54d74adbsm43200pjz.25.2022.05.23.12.00.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 May 2022 12:00:06 -0700 (PDT) Message-ID: <6ac66e89-2063-c5e8-df15-f77b76befc05@linaro.org> Date: Mon, 23 May 2022 12:00:06 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Content-Language: en-US To: =?UTF-8?Q?Michal_Koutn=c3=bd?= Cc: Tejun Heo , Hillf Danton , 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> <25fb057a-077f-b601-dcb7-130071c733db@linaro.org> <489592f6-b783-7bdb-2cc8-0c8e35ebc674@linaro.org> <20220520164255.GB17335@blackbody.suse.cz> From: Tadeusz Struk Subject: Re: [PATCH] cgroup: don't queue css_release_work if one already pending In-Reply-To: <20220520164255.GB17335@blackbody.suse.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Stat-Signature: hn9guumsttozjx35htjg4eq8e9ww783k X-Rspam-User: Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=FbNXo+LP; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf18.hostedemail.com: domain of tadeusz.struk@linaro.org designates 209.85.216.52 as permitted sender) smtp.mailfrom=tadeusz.struk@linaro.org X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 7661F1C00D8 X-HE-Tag: 1653332392-5984 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/20/22 09:42, Michal Koutný wrote: > On Fri, May 20, 2022 at 09:38:12AM -0700, Tadeusz Struk wrote: >> as this is a result of enqueuing the same css->destroy_work onto the same WQ, >> one on the rcu path and one on the css_release path. >> I will prototype it today and test with syzbot. > > In my understanding, you'd need two independent work_structs in a css, > not two separate workqueues to put the single entry on. Yes, separating the css_killed_ref and css_release paths with two separate work_structs fixes the two syzbot list corruption issues [1]&[2]. I tested it on mainline v5.18.0 and v5.10.117 In case of [2] the mainline triggers an issue, but it is unrelated to list corruption. [1] https://syzkaller.appspot.com/bug?id=e26e54d6eac9d9fb50b221ec3e4627b327465dbd [2] https://syzkaller.appspot.com/bug?id=3c7ff113ccb695e839b859da3fc481c36eb1cfd5 I will send a patch soon. -- Thanks, Tadeusz