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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58315C54E94 for ; Wed, 25 Jan 2023 21:15:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236356AbjAYVPV (ORCPT ); Wed, 25 Jan 2023 16:15:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236358AbjAYVPS (ORCPT ); Wed, 25 Jan 2023 16:15:18 -0500 X-Greylist: delayed 608 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 25 Jan 2023 13:15:13 PST Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [83.223.78.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A3E5241D3; Wed, 25 Jan 2023 13:15:13 -0800 (PST) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id B3F252800C90C; Wed, 25 Jan 2023 22:05:01 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 9AF3A1AFD9E; Wed, 25 Jan 2023 22:05:01 +0100 (CET) Date: Wed, 25 Jan 2023 22:05:01 +0100 From: Lukas Wunner To: Jonathan Cameron Cc: Ira Weiny , Bjorn Helgaas , linux-pci@vger.kernel.org, Gregory Price , Dan Williams , Alison Schofield , Vishal Verma , Dave Jiang , "Li, Ming" , Hillf Danton , Ben Widawsky , linuxarm@huawei.com, linux-cxl@vger.kernel.org Subject: Re: [PATCH v2 01/10] PCI/DOE: Silence WARN splat with CONFIG_DEBUG_OBJECTS=y Message-ID: <20230125210501.GA13856@wunner.de> References: <63cf276083fe1_4a9a29468@iweiny-mobl.notmuch> <20230124103208.00000675@Huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230124103208.00000675@Huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org On Tue, Jan 24, 2023 at 10:32:08AM +0000, Jonathan Cameron wrote: > On Mon, 23 Jan 2023 16:33:36 -0800 Ira Weiny wrote: > > Lukas Wunner wrote: > > > Gregory Price reports a WARN splat with CONFIG_DEBUG_OBJECTS=y upon CXL > > > probing because pci_doe_submit_task() invokes INIT_WORK() instead of > > > INIT_WORK_ONSTACK() for a work_struct that was allocated on the stack. > > > > > > All callers of pci_doe_submit_task() allocate the work_struct on the > > > stack, so replace INIT_WORK() with INIT_WORK_ONSTACK() as a backportable > > > short-term fix. [...] > It's an unusual requirement, but this is indeed the minimal fix > given current users. Obviously becomes more sensible later in the > series once you make the API synchronous only. Okay, I'll amend the commit message as follows when respinning to make more obvious what's being done here: The long-term fix implemented by a subsequent commit is to move to a synchronous API which allocates the work_struct internally in the DOE library. Thanks, Lukas