Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1994088rwb; Thu, 15 Dec 2022 17:51:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf75dKL3p2ivKTVoVVUnfLuE/P/fT6J5Du5vdeoaA6fZ0eKldVXZy/r8smGb/hsxdtsEkjnt X-Received: by 2002:a05:6402:c07:b0:46b:203:f388 with SMTP id co7-20020a0564020c0700b0046b0203f388mr25920640edb.39.1671155489854; Thu, 15 Dec 2022 17:51:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671155489; cv=none; d=google.com; s=arc-20160816; b=t9YGJJN48RpK/SPhy4F9G6P6oRl/1X+hnQQeao+jVfQGOkhWLHYONv2otDE0h+/1sR 4yikL5eEeTBalU8s+WLCt71R3PR9HfR9pEyte0yfF+YSW18aBLyKssfIOS8LEDkglWk3 YNJDgkiC7xn4gm2KLb4Wd3Yhln80MovuA1z+dCWDmBhbt0tSYE/63AhzJ0tWI7tma2Sf 59dqkEgWG9suByKqnUAFohGsi7vFX4/9brq6sk88UXyS7L4+WxRSWQRladdJtWp89o5W kFiYJxsWpzterBUun8yn58UFlvnEZtinHxlA97Ijejn3ezGhwXiAKuiruJeAkXc335Vr Jiug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=33Hk0dgaad6fpmn1JNRHR9mJrfLP11GuwZMZDZQY18Y=; b=HePoyl4mTUp+dBZBKtixSZgGJjmUvrQQCXajfNPHzikPGl+SIguEYgTkumqlyoprz/ v2p24dXKgMKsB0Vg6luWCY3HF/lcrFpXpFj2TKPPP+39IxKilwImU6yWF+s9c9Eg7poZ 8sOUFNAWqAD+qTWK1Ni3Nns9TpzVYYRNzqc+caN/TPyYqybCfCE3pK2Ot4H6vzrzGAKI YDv35+nMoR7NHhMU5Qiir5D5/gr7Z34qZLRFSzoefVgHLshGXcG31tsx4xzn7t42aABy i67IUPT+ZIIbI31ymtHsO7DwaRrdkVw3ZYvwhrhcPvcYM941h0BlYEsnb4sku4YEqsdh VO+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XtNQYTlJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lf25-20020a170907175900b007c0a8ff3384si646664ejc.763.2022.12.15.17.51.13; Thu, 15 Dec 2022 17:51:29 -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=XtNQYTlJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229689AbiLPBOi (ORCPT + 68 others); Thu, 15 Dec 2022 20:14:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbiLPBOg (ORCPT ); Thu, 15 Dec 2022 20:14:36 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0767F5E08B for ; Thu, 15 Dec 2022 17:14:32 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id w15so1092304wrl.9 for ; Thu, 15 Dec 2022 17:14:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=33Hk0dgaad6fpmn1JNRHR9mJrfLP11GuwZMZDZQY18Y=; b=XtNQYTlJD+8q8Tsv4dXnzG/MP17FAQhgkkz8Y42JNl7usGB7GITBaHJk1XsVKDCs1O iQWuDhSo1thuzpb29MFfvefC0a8MD6u+TX40adg1XUw1xk62cya2jrnDP0OZHRvSXzsL DAwVuoftVLsu29MkY6k9K76kl6ZEAQI+KMzf/HvfK8KtoXvm2l4cq04rTif4liWrUanZ 1yfZjIkEzqiTU4oBHSbhjVb9v27Z7hv5yRXsIluFxwCAJbkpJuCz3c9SQPIlhLG3biFd ptc2Aavg3iC2GHbswPh+rEdlTyy1yqJBXGqxfbDNd4nR8EtYrxeWSlXw8mVdfNUes5qz JaQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=33Hk0dgaad6fpmn1JNRHR9mJrfLP11GuwZMZDZQY18Y=; b=JzjvOEYwgXl918MsJnaio0sb8Lbqm4T12MODaObCr82vrmUqEONGX+JitvAzThV5Ev ddsmV8wRRPyIUtaxXVaWK+jO1ARP4AUUyN6vja0IJAZoEh99fOgyAXKlUDP3mltHfNhY Y2Ao9PDXBb1qdglY90Nui3yoXctMbTiL+n9oVJccG4JoJmFLlwx//UwM91jdjDJcPoIR M3aoBCupTUkYHFEP+tLXI5mIOCSC0Pz8dqWOp0zQh+5Gu855q29cESPF2GGsj1vmK/cT Hp5HNCcF44FsRMxfLHWs68TgY7CRWLcyukQztb2RrUQTtIL1d4DfWgDIELNEH7kiQIGG Viow== X-Gm-Message-State: ANoB5pkL44uAJWWQJcY07IyGx6tcYzUD09NiBQfav6BtSY/qKPCq8Qkr X2i2AvjUgI5rkspcVjAi35xiep1+Xp4VtUej5CU= X-Received: by 2002:a5d:6751:0:b0:242:122c:6672 with SMTP id l17-20020a5d6751000000b00242122c6672mr32583834wrw.330.1671153270478; Thu, 15 Dec 2022 17:14:30 -0800 (PST) MIME-Version: 1.0 References: <20221213043936.6345-1-richard.xnu.clark@gmail.com> In-Reply-To: From: richard clark Date: Fri, 16 Dec 2022 09:14:19 +0800 Message-ID: Subject: Re: [PATCH] workqueue: Add a new flag to spot the potential UAF error To: Lai Jiangshan Cc: tj@kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Hello TJ, On Wed, Dec 14, 2022 at 3:16 PM Lai Jiangshan wrote: > > On Tue, Dec 13, 2022 at 12:40 PM 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 > > Reviewed-by: Lai Jiangshan What do I need to do for this patch next? Thanks