Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp67441rwl; Wed, 4 Jan 2023 15:19:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXsq2w5CGhl6IUFkgzV3HNFAauG117VzGnbGbBgoPgJ6+b/eZ544Oymy1MltbWWlPBJkSaJ5 X-Received: by 2002:a17:907:86a6:b0:7c0:fd1a:79f0 with SMTP id qa38-20020a17090786a600b007c0fd1a79f0mr59492301ejc.21.1672874379515; Wed, 04 Jan 2023 15:19:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672874379; cv=none; d=google.com; s=arc-20160816; b=pclLcCNhU0zCvOAwftyTC9BQh9pNdCAbcBWqC/hbKl5tCfNWitS7SQoCPn0hyTQtiX RmZV5s6VpMkT2L15vMe5nkkGkH1241o/mDeC0FJx1X+L87KPwZJd0u3JPnrUzk55OyoQ HydMpXLN97KiEyBmnPvnmFu3J5waOqw7t/BW1UMfX4OCb4QbvwSN8+36OAZAZO/8feX7 Y5h6OevPt7Hd6ZRIHldUuYvpbDXwodLAR/5xwzMnm1JFpMzXoYazVay4cxW50zPQ9lKk 3/GDvjhlWwuLv9AOUxIAyc8e1CUVQZ+XaUhUgCkvHchkwMtA0y/dnlm4hRgr/b0kG2dJ AtNw== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=FIgokSFORIKySFY6m7tmTjnwpgLEJc31TKVV2WohxQk=; b=h/+OdqHBPRLW3T1s6fjNqibKR2eqlma2ZYZhDPKEff4PW3AdcnuINrSBnlehqbzald dZCKgVBxDnFlMY85Owt7Hm9L2JCaHyvPiLymhdY1Acnre6Th7AWgYXqvWxSjrBCT8ruo 2UzCCxvayEsgpJ/J1nuldAPbEMvtjYxQhNDbkNeK4H+kcQSEsaLiT9cHbVw5nsrT2Bxo acYCTImMG+WdXWKajaD4SSSt2LAi/XEcxsGcW6ZnnPyNKdFisvUHYkpOAW+037OEua8I iMGCQ5Vs0/8SYxJvNGKtA4GHYmzNAO5n81XmfaYa57gvmimC1O0epTntotCayr8K4g2c mXFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="k/zWL17k"; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs12-20020a170906dc8c00b007c500a2f33asi33940704ejc.208.2023.01.04.15.19.26; Wed, 04 Jan 2023 15:19:39 -0800 (PST) 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=@gmail.com header.s=20210112 header.b="k/zWL17k"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235516AbjADW0Y (ORCPT + 56 others); Wed, 4 Jan 2023 17:26:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjADW0W (ORCPT ); Wed, 4 Jan 2023 17:26:22 -0500 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30E7D1CFFB for ; Wed, 4 Jan 2023 14:26:22 -0800 (PST) Received: by mail-pf1-x42c.google.com with SMTP id g20so15700610pfb.3 for ; Wed, 04 Jan 2023 14:26:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=FIgokSFORIKySFY6m7tmTjnwpgLEJc31TKVV2WohxQk=; b=k/zWL17knzlSo7mB3DThdqrV9Sai9s+S6GLcTIs+nxQLVB/S/3uvYnfoz63+REvG+v 59N4XvM+4JQZvniUqMAfqsd3r2TQ3yapHNBLpOikK9OxZQukVOinpTL9xyHGl6JDKA8d k8oaQz0IkvGSztZocmF3BVy68FljpV+fskL9M+E5uBJ6NrMP/IvMz8JwpR4hKW0rC7Fy o8qZECqhF5rJTiPtASNrRtv1QLSQMRRTG0KmQlPpsyQo+6F2djwcQlNRdJLVfIztay6s EcU/4W3Uywmxvj51GUKUf+6xi+KtWMpsoSJ5vFe+yn2iGdytmvPlEIFU2HIPuHTPsKVG 3stA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FIgokSFORIKySFY6m7tmTjnwpgLEJc31TKVV2WohxQk=; b=lAM3TiSaFlawFDmxTy4VdZGZXznIreUnDrdJkDQKIgVHamDOzRnEj+8PyzuoAuKfle Np+VrVSR6veF487+DXPppQ15eItemAK2HAdtcAZ7dPTSyMgWIEpeJJkr7BJITboK0flb 0uafjShqlEQz7hkN3aKT28JIFfkT7T4zPZU+1aU/Zdz/ktjbnalkb6JtOtCZoHBTDR2p gXp7ntJx7BIReAY12aNmYMwuA8hUPiJhaPyuWQmBaCvrMlgsqb1JzsIXlEB1MGDS/wzP SFmCVSCygJb/i83WVSHjgsN1W4Ev27DLxxWtC3iw0au2/bLkurCtwxu4zlddcr3oq6Ti h10g== X-Gm-Message-State: AFqh2kodqGjrKI9Dz4N3Ldv8UhQwO4vV1JF9OmFQ33mkhpDqUwDO3PBc XC4VF1JBDRrKTpTz4FBIFDY+qZ23O+o= X-Received: by 2002:aa7:8c46:0:b0:575:ff07:cb1e with SMTP id e6-20020aa78c46000000b00575ff07cb1emr55248731pfd.31.1672871181506; Wed, 04 Jan 2023 14:26:21 -0800 (PST) Received: from localhost (2603-800c-1a02-1bae-a7fa-157f-969a-4cde.res6.spectrum.com. [2603:800c:1a02:1bae:a7fa:157f:969a:4cde]) by smtp.gmail.com with ESMTPSA id x29-20020aa79add000000b00580fb018e4bsm19083746pfp.211.2023.01.04.14.26.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 14:26:20 -0800 (PST) Sender: Tejun Heo Date: Wed, 4 Jan 2023 12:26:19 -1000 From: Tejun Heo To: Richard Clark Cc: jiangshanlai@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] workqueue: Add a new flag to spot the potential UAF error Message-ID: References: <20221213043936.6345-1-richard.xnu.clark@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221213043936.6345-1-richard.xnu.clark@gmail.com> X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no 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 Tue, Dec 13, 2022 at 12:39:36PM +0800, Richard Clark wrote: > Currently if the user queues a new work item unintentionally > into a wq after the destroy_workqueue(wq), the work still can > be queued and scheduled without any noticeable kernel message > before the end of a RCU grace period. > > As a debug-aid facility, this commit adds a new flag > __WQ_DESTROYING to spot that issue by triggering a kernel WARN > message. > > Signed-off-by: Richard Clark Applied to wq/for-6.3 w/ whitespace adjustments. Thanks. -- tejun