Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1750267rdb; Mon, 9 Oct 2023 01:18:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFEnomHBNaukcRcQkjXDXSlBJhgyGRsaXHDzkRF5U9sSIjpy8l5n/VEBHV47G3G4TiSG9Wc X-Received: by 2002:a17:902:c3cd:b0:1c6:1cd8:5b59 with SMTP id j13-20020a170902c3cd00b001c61cd85b59mr14604861plj.1.1696839519693; Mon, 09 Oct 2023 01:18:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696839519; cv=none; d=google.com; s=arc-20160816; b=Ck6lVg9yokKP4p40h/+7V2WkOgAXwgjkyWi94tsN5y+VT2pgdcQkNcd3qjF7AgWHut j/WwnsSpPSZLj88VOxdal07McJ/BIkmwlZtC8vgJjjrq6BN++tssPDeyu1fECGfN0iWG Tr3JIfJWr6okxsqwqFKPeX2B0srTIY8MJAF6Oz0uhHpuhB1ljxkJv2+w6NLMXk23pUxf BmmneI40ycb7kdHL85LvCTUasdCAZLfbpu3YssJaLAvsQnUu73dD+3mU62Nc/DGy2y27 paDpiUqTnCANlY9c0/m6NhjQkVxxiAnrt8j7eGsc7zevQfUn0cj6ZA0ITrBPeKVwVdGx YbbA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=IjeNk0Y5JtGnrNEcA2qCKSSicZ1bcfGYnsYpvYCB90s=; fh=GJyv24UKgpacCGEXo/WxcNe/A2C+xbvw00VAQuDNDSo=; b=HOtf8SwmYyK1MLr9f1iL5KPGKQi9y5p2gHf5uvqPyuyn5r/2E22qsFe8pUd0yyl7/V vPMY4qg3raeOY2Kfyk0kghZzZyJrCw/2s10wGkQH2fZMlq/DILQd0McA669dpU+q3Kvq eIUtWU9YmYmGDKVn/IVoHid5va+7l7L/Eu87nEAi0tKEpZdDzLC2yz5d7MWeukMiXZKG Brvnj9EzDXMRFMNGjzNzpjlra1AvYGikCq4LbNoChRKDmeNUrzCbtii9qFlzdHAXqeIT nkPiNrkGeR2aiWllfHJK0O3DX6pAOTFW4rp6UJW8vgdm+io+27VvtJvCl3r/+Yo53sRj 3XAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=dWnbkFKY; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id v17-20020a170902ca9100b001b8b437b01esi8602967pld.350.2023.10.09.01.18.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 01:18:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=dWnbkFKY; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 63191805C149; Mon, 9 Oct 2023 01:18:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234376AbjJIISd (ORCPT + 52 others); Mon, 9 Oct 2023 04:18:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232666AbjJIISb (ORCPT ); Mon, 9 Oct 2023 04:18:31 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C77638F for ; Mon, 9 Oct 2023 01:18:30 -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: Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=IjeNk0Y5JtGnrNEcA2qCKSSicZ1bcfGYnsYpvYCB90s=; t=1696839510; x=1698049110; b=dWnbkFKYZKZGr0vjVU7KPEQBFJGNW9Avlys4Jz51iNYFW4p8Wspdhd8CBWWxMYSPeHNpNDvDyHU Mqvry8GBGyBFpqcSpiOXBx+O3gYaFBkBm1m+Bn6pDg/77aQySJEFceJyC0+Pcy3F/8aal0nIAu9Xu 9kI8CE+PEWryIUod93IM/J6aksg7Wi92v9yvAEjQwG3oTPmcdyHcIzfjNp5idIyU6lO+K5OflSTgH 3/FsoRtYh3IBqrclUcnzTEidoeWPvD4Z26OOJdkn3MSbcw+TgUdr9YM+QCjc654+D2T2f6W8AXsI+ PsTe3wLxMVP3j5UveueZV0OhPZyVSvd/TwmQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97-RC0) (envelope-from ) id 1qplTA-0000000FAki-1PNR; Mon, 09 Oct 2023 10:18:28 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Kalle Valo Subject: [PATCH] wifi: cfg80211: use system_unbound_wq for wiphy work Date: Mon, 9 Oct 2023 10:18:01 +0200 Message-ID: <20231009101800.bb75408bf635.I6528d97e24b3da36cdf633b4738327d77c7276f2@changeid> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 09 Oct 2023 01:18:34 -0700 (PDT) X-Spam-Level: ** From: Johannes Berg Since wiphy work items can run pretty much arbitrary code in the stack/driver, it can take longer to run all of this, so we shouldn't be using system_wq via schedule_work(). Also, we lock the wiphy (which is the reason this exists), so use system_unbound_wq. Reported-by: Kalle Valo Fixes: a3ee4dc84c4e ("wifi: cfg80211: add a work abstraction with special semantics") Signed-off-by: Johannes Berg --- net/wireless/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/core.c b/net/wireless/core.c index 7df8ffcfa0c4..758c9a2a12c0 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -1613,7 +1613,7 @@ void wiphy_work_queue(struct wiphy *wiphy, struct wiphy_work *work) list_add_tail(&work->entry, &rdev->wiphy_work_list); spin_unlock_irqrestore(&rdev->wiphy_work_lock, flags); - schedule_work(&rdev->wiphy_work); + queue_work(system_unbound_wq, &rdev->wiphy_work); } EXPORT_SYMBOL_GPL(wiphy_work_queue); -- 2.41.0