Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp10340imn; Thu, 28 Jul 2022 20:06:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR6cCwtcoeR771lRfHFc2gEt5LTO5iZtuo4jAECD/F4kcNrBnssogKuCF9opP36TXhp0NPBG X-Received: by 2002:a17:90b:1d02:b0:1f2:83d9:6c34 with SMTP id on2-20020a17090b1d0200b001f283d96c34mr1738347pjb.215.1659063995965; Thu, 28 Jul 2022 20:06:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659063995; cv=none; d=google.com; s=arc-20160816; b=wLq9W9ZRMAwdSt7nEWrZA1ehsPrgisYbNzqc3elxaMgSXXsB92sIwJrD5qwE9MfPad 6t3Epr5Vc2gZ9Ryx4/4pgK1tjMrDC3+2WtMDp2+1Pnnbvdy/m2VDSd0O1flVTDpLx/Tu eTv/YXMzxCU9CMfjEIpyGhuRtIi1xCDVRUEVv3xyiHbL4FGOeDUINXi0H+xwMEqr5VDb 5/aillhr6wLe7uCctd9oDDB5uPimV6i+OM0VAAJjzjTJ3majY+vNmEKVzlcZFz1d70Q1 uQv9lD3dQzhHAH95qVi5CrEJkl28AKn86qWXyoCkZ/rkLAg43upyW+qsA8oklkz4RmT4 1b+g== 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:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=4aPQZxZe6LqopMktNMgpFtke3J6hqrt9JHLHGVGTe+Y=; b=afEgCwsIL+4IkDryJt4VKx7/YBViWt+g6WMk+Mh7Gv2VoYQpy6XQtx7/y7nFaFI3os 2JUus0aH1TsR/Tmar37tj3Qz7tTh8sh5t/E95NNNxAZJhFkooT7P59BQ40BSFW8HwnFT x8F12IILXoW6inbvBsGMbrRdsyKdKVexfLu7DD/Znq13wDOc5eIzaUvCI5tTdQPpa1gO 6nJkKWnRY2TfuQt2zzhAiNilv1zCLo2VQYu+4vJxAsuDE/qdOUkIvu9QFLZPR0mUtPij oBkdKqPL6hTuHN03xuTh74kUA/PLO5DjyENTQsCDEIwOBOFb/01lnXLjLlBWnmcZ3LBu wTlw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d10-20020a170902854a00b0016d9266278dsi2448467plo.309.2022.07.28.20.06.20; Thu, 28 Jul 2022 20:06:35 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233945AbiG2CuZ (ORCPT + 99 others); Thu, 28 Jul 2022 22:50:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233845AbiG2CuR (ORCPT ); Thu, 28 Jul 2022 22:50:17 -0400 Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18D321275B for ; Thu, 28 Jul 2022 19:50:13 -0700 (PDT) Received: from fsav315.sakura.ne.jp (fsav315.sakura.ne.jp [153.120.85.146]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 26T2nrRM084526; Fri, 29 Jul 2022 11:49:53 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav315.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav315.sakura.ne.jp); Fri, 29 Jul 2022 11:49:53 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav315.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 26T2nqCi084519 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Fri, 29 Jul 2022 11:49:52 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: <7d034f7b-af42-4dbc-0887-60f4bdb3dcca@I-love.SAKURA.ne.jp> Date: Fri, 29 Jul 2022 11:49:51 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] workqueue: don't skip lockdep wq dependency in cancel_work_sync() Content-Language: en-US From: Tetsuo Handa To: Johannes Berg Cc: Lai Jiangshan , Hillf Danton , LKML , Tejun Heo References: <21b9c1ac-64b7-7f4b-1e62-bf2f021fffcd@I-love.SAKURA.ne.jp> <0ad532b2-df5f-331a-ae7f-21460fc62fe2@I-love.SAKURA.ne.jp> <97cbf8a9-d5e1-376f-6a49-3474871ea6b4@I-love.SAKURA.ne.jp> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_NONE 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 2022/07/29 11:28, Tetsuo Handa wrote: > Thinking more, I might be confused by difference between > > the lockdep "struct work_struct" dependency handling the lockdep "struct workqueue_struct" dependency handling > > and > > the lockdep "struct work" dependency handling the lockdep "struct work_struct" dependency handling On 2022/07/29 11:38, Lai Jiangshan wrote: > The commit fd1a5b04dfb8("workqueue: Remove now redundant lock > acquisitions wrt. workqueue flushes") removed this lockdep check. > > And the commit 87915adc3f0a("workqueue: re-add lockdep > dependencies for flushing") added it back for non-canceling cases. > > It seems the commit fd1a5b04dfb8 is the culprit and 87915adc3f0a > didn't fixes all the problem of it. > > So it is better to complete 87915adc3f0a by making __flush_work() > does lock_map_acquire(&work->lockdep_map) for both canceling and > non-canceling cases. Yes, commit 87915adc3f0acdf0 was incomplete.