Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp216510pxb; Wed, 23 Mar 2022 16:40:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0sDfaJaADe2K8lDKy75GsbTuJyVkquteJ8nj884ykbZrGfo7s1dvVjmGTY2fjTKLoBjOJ X-Received: by 2002:a63:4e42:0:b0:382:56b2:160a with SMTP id o2-20020a634e42000000b0038256b2160amr1796214pgl.343.1648078857746; Wed, 23 Mar 2022 16:40:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648078857; cv=none; d=google.com; s=arc-20160816; b=eQ0ZfWwgH3riuahiKo41br7AdAtcqOL9BSJ5JopJf5YPP9sA2YVnoKL1I4q4in2Mps ijcxthGuGwDhLyvE13DLCzOBtPWZXb4yPXhn+Zv/56IgKpQpuPq7nRWA92P4O1mVyXYD CwJP0vxP8jPcg+h+KQLMVD2ymeyCjhH0I+zy8jcYTSI+GRczVjXp9dUm5vADuL2Feo4v Srke5qAa7mHsBtt8rWA2rm0ls6b5i9RUCC5CkwQNjz9HGNKTbQgM+8uGLO3EPGo0bWNO 7JXsULYv4dTtcWYZQPGsDL/W+3GifGBwoE7hd7MMXmAvijSU6+OtBWvqmcjF5IPwJrHl kV3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=WeV7CdyKrCQzTXSqea1mXx13HfQbhrkZpQJIED/eVxc=; b=xJgtTII/PHYYRwsWaxk3rsZX2GXlsXvQWdrgVJa3jM+OTpVkFbVtRfYKI6MsMU/cDQ lj0AILLhJOBs4UkRNEDfz4fF+L5npqUH4C0TktttcWvkCUR4mcg0D30Evr/lJAQ8I8EW fL5EeOST8fseD5BEMgUmr0EY1uywXxGkj0OA2i7UltoYw3mbTiXxBNVdOCMGw35WS4Jk sqYiL4qKbZ4RIugLOwEzEDw5Sid/aHp/Q2JhNcmP+xlWzJaYA9SGPPwpUAzFYcrer4i1 I91txUfjN3iCMPdDjepbyT82E1W+BUIBQ/b0lot8ULO7KrgP3oXQSRpr8h55iUSmbfzY SKWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="MxUXY1/1"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g6-20020a170902c38600b00153e6d033b5si17821825plg.31.2022.03.23.16.40.47; Wed, 23 Mar 2022 16:40:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@sipsolutions.net header.s=mail header.b="MxUXY1/1"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244207AbiCWNZf (ORCPT + 70 others); Wed, 23 Mar 2022 09:25:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236696AbiCWNZd (ORCPT ); Wed, 23 Mar 2022 09:25:33 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF77E32076 for ; Wed, 23 Mar 2022 06:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=WeV7CdyKrCQzTXSqea1mXx13HfQbhrkZpQJIED/eVxc=; t=1648041842; x=1649251442; b=MxUXY1/1LmFNren+DgO4Hb004K+vAkMPdV/kePRAbpgL0KT 90xTUf9JG2NYwA9YTgJzG1TqVymLO4s5fgXxXPMdhX5RD6I8JF9LXeRXGnQqdFHmyD54yt+PFDWFB 5k7r+KyWjqYfePiEh2RM0Z0XmMYc5rWi2uWCYazNBWV7ZH1X0xt7phEvq/I6dlRw0B32u4EzfgpDL c4MXraJTbxkDfOP99mHUyFo6UzVDt3GG+2QEjhQf28BIkYU1lttHkup3Hv6fHvgVyVH7ZZpcz3TpG xmdd/00EGs3siGbuGnigxX4x/0Ai0VYYXlRQ5VfR9MjzGBwpKxeGVofbaSFdRnnw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nX0xz-00H64Q-9y; Wed, 23 Mar 2022 14:23:59 +0100 Message-ID: Subject: Re: netconsole fail, iwlwifi, WARNING: at net/mac80211/tx.c:3638 ieee80211_tx_dequeue From: Johannes Berg To: Chris Murphy Cc: linux-wireless Date: Wed, 23 Mar 2022 14:23:58 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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-wireless@vger.kernel.org On Wed, 2022-02-16 at 20:44 -0700, Chris Murphy wrote: > So this is quite a bit more verbose with kernel > 5.17.0-0.rc4.96.fc36.x86_64+debug. > > Is netconsole expected to work from a host with wifi? Let's say it seems pretty audacious to try? There's a huge stack between the hardware and the network (MAC service) interface... We might sometimes even need to do memory allocations to send out a frame, or touch other hardware (e.g. crypto engines if crypto is not in wifi HW) etc. We also didn't really expect to be called from interrupts-disabled contexts here. > [ 4970.929723] kernel: WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected > [ 4970.929726] kernel: 5.17.0-0.rc4.96.fc36.x86_64+debug #1 Tainted: G W --------- --- > [ 4970.929728] kernel: ----------------------------------------------------- > [ 4970.929729] kernel: modprobe/8230 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire: > [ 4970.929734] kernel: ffff953c499b9070 (&fq->lock){+.-.}-{2:2}, at: ieee80211_xmit_fast+0x412/0xb90 [mac80211] > [ 4970.929823] kernel: > and this task is already holding: > [ 4970.929824] kernel: ffffffffc1504618 (target_list_lock){....}-{2:2}, at: write_msg+0x48/0xf0 [netconsole] > [ 4970.929834] kernel: which would create a new lock dependency: > [ 4970.929835] kernel: (target_list_lock){....}-{2:2} -> (&fq->lock){+.-.}-{2:2} > [ 4970.929840] kernel: > but this new dependency connects a HARDIRQ-irq-safe lock: > [ 4970.929841] kernel: (&ec->lock){-.-.}-{2:2} > [ 4970.929842] kernel: > ... which became HARDIRQ-irq-safe at: > [...] > [ 4970.930019] kernel: > to a HARDIRQ-irq-unsafe lock: > [ 4970.930020] kernel: (&fq->lock){+.-.}-{2:2} > [ 4970.930022] kernel: > ... which became HARDIRQ-irq-unsafe at: > [ 4970.930023] kernel: ... > [ 4970.930024] kernel: lock_acquire+0xd0/0x2d0 > [ 4970.930027] kernel: _raw_spin_lock_bh+0x38/0x80 > [ 4970.930030] kernel: ieee80211_get_txq_stats+0x49/0x190 [mac80211] [...] which is pretty much what it's telling us here, I suppose, just in a bit more roundabout way. Unfortunately, I don't think we can really support that - there's so much code below ... We'd have to make *everything* IRQ safe here? johannes