From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70171336884; Tue, 3 Mar 2026 21:54:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772574882; cv=none; b=ZC9Q4FmU0ow6sKOypfItWQORvv4PB9SlNgX93qxJ47+E55mzfuSa7Bz5h7V81g+/ZHTtjJsFvP+ZAyBFliTTivXFKW/TQmIFYEUf1U3mnyu0jaIrHEEfC4f8gxAfUCo+1+OVk0aAM9ow3pAlGh+43hlauwoNi6Op34I+ox1mUUk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772574882; c=relaxed/simple; bh=VvOOzNE9BueqqRI/K17eO29FNoYNhF1HowEkUUOpvgg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iWR9SkoNxzMxtQhJH1LmUYHUhu1xBdSKi9E4fGITFOB0f1V4zLm5mKnXar9APuqHtjrTYI846emW9HOndnbkCgMa9SON9xPLuTcFWoocIc+f4TdRvuGnUsGD5sB/ScvTedi+LBLjVlv1gNQmsFRIf0fSUXwhm0LCkTKuYWjTqYc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jfH8lLbD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jfH8lLbD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3405AC19425; Tue, 3 Mar 2026 21:54:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772574882; bh=VvOOzNE9BueqqRI/K17eO29FNoYNhF1HowEkUUOpvgg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jfH8lLbD1Qlc/I69ExYqvE48A1/rFZBINF8w4o4XIG6p6iRD6dIr+7VDpOAC+3HIc S0YKGBNBalL7PjWcjWR5ZDIUWuyEUbRk7nAySAiW1QymhuU052IRRoE9SczrI41vCW +5WIoUT/3n+8UVg8xK7o1TfKTT5PE7NZXC6KMET5zx1Ohv+a9kHuYsNK/iiJk0C8zb Bv+9vmpjODPgsPvIq6BQg44CMRQmeVjjxk4WtVSv/EdlAzAUonykX+K8VLuOHpyLcz 06U4gtFKKK5ySUFHnwl9SNkUTGeLdIyhC5oh+P5cXequMv1rkd+HxGO7P7XHmfmdSA pJWSS9oxs3Fpw== Date: Tue, 3 Mar 2026 11:54:41 -1000 From: Tejun Heo To: Ben Greear Cc: Johannes Berg , linux-wireless , "Korenblit, Miriam Rachel" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: 6.18.13 iwlwifi deadlock allocating cma while work-item is active. Message-ID: References: <18c4bfed-caca-bef3-a139-63d7fa48940a@candelatech.com> <3456b2c89f057900b39ce79ea8ca1154c5014e43.camel@sipsolutions.net> <0de6c8d1-d2fa-44ac-8025-cfcfecd87b02@candelatech.com> <35779061f94c2a55bb58dcd619ae91c618509cf4.camel@sipsolutions.net> <3303d57a4ea6776dbc66ca72441023f76e6f1234.camel@sipsolutions.net> <35a7ebcf-862f-0b3a-a245-c32196a58692@candelatech.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <35a7ebcf-862f-0b3a-a245-c32196a58692@candelatech.com> Hello, On Tue, Mar 03, 2026 at 01:40:54PM -0800, Ben Greear wrote: > If I use a kthread to do the blocking reg_todo work, then the problem > goes away, so it somehow does appear that the work flush logic down in swap.c > is somehow being blocked by the reg_todo work item, not just the swap.c > logic somehow blocking against itself. > > My kthread hack left the reg_todo work item logic in place, but instead of > the work item doing any blocking work, it instead just wakes the kthread > I added and has that kthread do the work under mutex. > > The second regulatory related work item in net/wireless/ causes the same > lockup, though it was harder to reproduce. Putting that work in the kthread > also seems to have fixed it. > > I could only ever reproduce this with KASAN (and lockdep and other debugging options > enabled), my guess is that this is because then the system runs slower and/or there > is more memory pressure. > > I should still be able to reproduce this if I switch to upstream kernel, so > if there is any debugging code you'd like me to execute, I will attempt to > do so. I think the main thing is findin out what state the work item is in. Is it pending, running, or finished? You can enable wq tracepoints to figure that out or if you can take a crashdump when it's stalled, nowadays it's really easy to tell the state w/ something like claude code and drgn. Just tell claude to use drgn to look at the crashdump and ask it to locate the work item and what it's doing. It works surprisingly well. Thanks. -- tejun