Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4499039rdb; Fri, 15 Sep 2023 04:20:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEmBI2NezlELBd6z2p1CKTVDcTEXSzaHLgfCbyIBsAt7YPZ5l8cmegozBaoAvijiOOX9oP8 X-Received: by 2002:a05:6a00:1394:b0:690:28d0:b7cf with SMTP id t20-20020a056a00139400b0069028d0b7cfmr1592292pfg.16.1694776824685; Fri, 15 Sep 2023 04:20:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694776824; cv=none; d=google.com; s=arc-20160816; b=R+mckUQzUJ/DsT6q1tlnEOdwVKq1cIFdO2Hi4hqwzBIkliTukt1emv1LZL1SIMVg7c MGwsj9T1tUoPc5aN1i9oiN0E5rdPR8cHGWGPkGeFW50eDhPQj460qWo/W4ESGy6tka7W lnVMRcXustHeQPskCbMsiVW85iiO03dFyftLZdwgzaXpky6PBZgWB2Q2LLbn3ftDcp1L 5y9DqBFyjGX6kFAJUazTEEH69yIHmDHVTfnsyMZvYzVzJZ8r+RSpDlxpSxi2XPOouQBo XvDywL3oolhSPRfOnOzTn90OQ4kBUMnBKsioGTaH8niWTGog9S26RVLbn2x/GRSc9Oxy W+aQ== 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:mail-followup-to:message-id:subject:cc:to:from:date :feedback-id:dkim-signature:dkim-signature; bh=JB3tsA1pXUSR0iT5R3DDtvbM9F3caQ2LLSR0vGzb0LI=; fh=8kNyek9u1sedbtFLQYD8aE65wHN5sBxYF5lK9+vA5Ow=; b=Sq0TvsjajEp+zeIRJSCWsQPeEabVkE097pwovDbrRuQ5cFuIodhQmrzcMmSdf1jRFg XCcpuG29BWUIQ9hRAu+RZeetAmTAoRVWmv11U14Bwid3Ct6ssW/JtcClmBd9eAWfN3B3 gQdkuAuW07dtMovXsueQCwFys0Al87HNZiQqJbSvbyznxGo8YqYWilOuEZgnE8dIV8Xq xAFT//sJ2U/FwDHmqOe5iiD0TwiuenH5aETbvIq+JnbQ1SFNZrDfdfU+tYN26YQQ7iec d3mze/Qq06onKu0KoU9HnnLzmzhC9UwL2iaXJLD7t9BPxysJSxgseXyb/koj8EgPAYKF w3LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm2 header.b=VY537NP3; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=bqotDaTh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id d15-20020a056a00198f00b0068ff3a3c9d0si3300137pfl.91.2023.09.15.04.20.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 04:20:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm2 header.b=VY537NP3; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=bqotDaTh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id C7DE481EE2FD; Fri, 15 Sep 2023 03:05:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234075AbjIOKFr (ORCPT + 99 others); Fri, 15 Sep 2023 06:05:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234095AbjIOKFq (ORCPT ); Fri, 15 Sep 2023 06:05:46 -0400 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FC682728 for ; Fri, 15 Sep 2023 03:04:21 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 4CB003200958; Fri, 15 Sep 2023 06:04:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 15 Sep 2023 06:04:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1694772259; x= 1694858659; bh=JB3tsA1pXUSR0iT5R3DDtvbM9F3caQ2LLSR0vGzb0LI=; b=V Y537NP3SRVgQsBu5P+jfO4OdnRf7kqxdcpJtpEpONNRDIYCvUZ0o73MaN0dYSsmX RRkW/m7p9QPy/mF/iK3bG1fUb7KOnRGE06y9v4GTaD0ipmSGlKUc2I2qAL2iHcCU Lj/KMSt5MvsB0Z9XJqxnso/TH2rq1n8qummmpBP+4IhJASEccDqxGSUlNXVV46Pv 0A9mYAnJ8B3ixJHDEX3E8TpUvKqHJLFJu5irHsae6dIWJZEHLngoQaJRgoPYOGdG pLPA7qUT73oywl9l7JpzJiAeqFODC90TLBO0r0xLkZYvthhBOoyTAijrQNu2SnFl F8Kffdp2GDupk/+tjZDmw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1694772259; x=1694858659; bh=JB3tsA1pXUSR0 iT5R3DDtvbM9F3caQ2LLSR0vGzb0LI=; b=bqotDaThvkfvZlfzzXsN3ZYmEkAAa d7Pl7m1BuSdeImGIbetCUW05SLCMFUv91rxM7/VNVWDa5rrDcvPT3wFXdl/dNlzj RNtQO7aaaT5EGmdsSbr8NL7Qgv3QIq48L5SsUWREPAps5VPRyrzFsPgOSCEl47TI lVgnEVk+QwtZVoBfvmdx4oKMEaNrFj2EYlPZea0giapf13oAytnCCmnFeRPA4ckS WCQmOv9breGEqBiBzCtpvzyfjbCib9KYrH13dp6Bnz1oqExutlDHf0qBlkyg02ig gVUmW/2lqgMVQe4tNO9Q43g7fPcAxtP2QawedkIUspnjkLytZt29heTmQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudejvddgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepvfgrkhgr shhhihcuufgrkhgrmhhothhouceoohdqthgrkhgrshhhihesshgrkhgrmhhotggthhhird hjpheqnecuggftrfgrthhtvghrnhephefhhfettefgkedvieeuffevveeufedtlefhjeei ieetvdelfedtgfefuedukeeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepohdqthgrkhgrshhhihesshgrkhgrmhhotggthhhirdhjph X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Sep 2023 06:04:18 -0400 (EDT) Date: Fri, 15 Sep 2023 19:04:16 +0900 From: Takashi Sakamoto To: John Ogness Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] firewire: core: obsolete usage of GFP_ATOMIC at building node tree Message-ID: <20230915100416.GB140388@workstation.local> Mail-Followup-To: John Ogness , linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <20230604070255.172700-1-o-takashi@sakamocchi.jp> <87jzsuv1xk.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87jzsuv1xk.fsf@jogness.linutronix.de> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 15 Sep 2023 03:05:56 -0700 (PDT) Hi, On Wed, Sep 13, 2023 at 11:54:39AM +0206, John Ogness wrote: > On 2023-06-04, Takashi Sakamoto wrote: > > The flag of GFP_ATOMIC is given to the call of kmalloc when building node > > tree, but the call is not atomic context. The call of > > fw_core_handle_bus_reset() and fw_core_remove_card() builds the tree, > > while they are done in specific workqueue or pci remove callback. > > The comment is incorrect about not being in atomic > context. fw_core_handle_bus_reset() calls build_tree() with the > card->lock spinlock held. With 6.6-rc1 I see: Thanks for your report. Just now I sent fixes to Linus for 6.6-rc1. It is expected to apply it to stable 6.5 kernel as well. > [ 12.555784] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:306 > [ 12.555808] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 70, name: kworker/1:2 > [ 12.555814] preempt_count: 1, expected: 0 > [ 12.555820] INFO: lockdep is turned off. > [ 12.555824] irq event stamp: 208 > [ 12.555828] hardirqs last enabled at (207): [] ._raw_spin_unlock_irq+0x44/0x80 > [ 12.555850] hardirqs last disabled at (208): [] .__schedule+0x854/0xfe0 > [ 12.555859] softirqs last enabled at (188): [] .addrconf_verify_rtnl+0x2c4/0xb70 > [ 12.555872] softirqs last disabled at (182): [] .addrconf_verify_rtnl+0x70/0xb70 > [ 12.555884] CPU: 1 PID: 70 Comm: kworker/1:2 Tainted: G S 6.6.0-rc1 #1 > [ 12.555893] Hardware name: PowerMac7,2 PPC970 0x390202 PowerMac > [ 12.555898] Workqueue: firewire_ohci .bus_reset_work [firewire_ohci] > [ 12.555939] Call Trace: > [ 12.555944] [c000000009677830] [c0000000010d83c0] .dump_stack_lvl+0x8c/0xd0 (unreliable) > [ 12.555963] [c0000000096778b0] [c000000000140270] .__might_resched+0x320/0x340 > [ 12.555978] [c000000009677940] [c000000000497600] .__kmem_cache_alloc_node+0x390/0x460 > [ 12.555993] [c000000009677a10] [c0000000003fe620] .__kmalloc+0x70/0x310 > [ 12.556007] [c000000009677ac0] [c0003d00004e2268] .fw_core_handle_bus_reset+0x2c8/0xba0 [firewire_core] > [ 12.556060] [c000000009677c20] [c0003d0000491190] .bus_reset_work+0x330/0x9b0 [firewire_ohci] > [ 12.556079] [c000000009677d10] [c00000000011d0d0] .process_one_work+0x280/0x6f0 > [ 12.556094] [c000000009677e10] [c00000000011d8a0] .worker_thread+0x360/0x500 > [ 12.556107] [c000000009677ef0] [c00000000012e3b4] .kthread+0x154/0x160 > [ 12.556120] [c000000009677f90] [c00000000000bfa8] .start_kernel_thread+0x10/0x14 > > John Ogness Thanks Takashi Sakamoto