Message ID | 20230324202628.76966-3-W_Armin@gmx.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp13986vqo; Fri, 24 Mar 2023 13:57:48 -0700 (PDT) X-Google-Smtp-Source: AKy350aXOlEcR3w6pNXRqnWpaJpVgYQHGo755iXg34TZ1c80khrW0DUzz1OiVgy03Al7BwT6pXl2 X-Received: by 2002:a17:907:a64a:b0:92e:e9c2:7b9c with SMTP id vu10-20020a170907a64a00b0092ee9c27b9cmr4813335ejc.77.1679691468210; Fri, 24 Mar 2023 13:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679691468; cv=none; d=google.com; s=arc-20160816; b=WzPqD+t+Nl0XAPGPpQ5cukm5SYCf1bvsxWJQ0hDuzUB8kox0Acs23OZMTNUfCdhOic +yNaA0VZmp/PpvMzJzyec/5Vwx+iji85As3UxE+WfqyQdiOHCq010cGnnGiLxg5HbK2D K1+w7bRnzIrbaJjjkpkDLn4+uxH31PkbwbDPrwJx6bY7MHBGaWPrm5bFqT5wqZ4MatzZ j66uM6+JivvkHSVqg2UZW18P1LaikZxzaPUIHMLtIwU+VD04cpvx/SVvlNCdnNvq4XT5 mwjilkTtUoihtyfo7HYCHlIR/bRTAMMzEcqxCyMRmeqve8zZYcCpxX4pVm/tQ+YSeBGy BY4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BhRPeazT41e8nEcgD2pGlomubh4U4gR5LQ5MHplYrgU=; b=QYY8vwUJSRFGa+XoWZVbRpgzw/KFqy2cYDzgADuCkiHY+lVZgwjsbIZYxQS9Ur3vqb 2YSB/ZhPE5QZ/X44VmMc7UIm5PfPqsZsO/aLzswCjTvUpMBkYLSC+8MkAqFx73k0SR2n KSvuXx3uul6p5zJdtXaE5ZfzbIAdNtVNSPy4ZZfuvoxFLbV2/bmGYX5vK8qY31AOZ6B9 7T0fvITsxujzZfiL0Mxf1FUN4MZp8FLh3OsrlxaqtDUNjPP5/fskRsM+Sfg0RPXqv9Ww X3o7bc5IlXIMMKyNgoPsmdJ1BDkcz130w/9wjDnmdW1ewXvMMuHTIf9LIzdqGa8hrRy1 wucw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=nrbT56XN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hf8-20020a1709072c4800b009313e7b7273si20497592ejc.649.2023.03.24.13.57.24; Fri, 24 Mar 2023 13:57:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@gmx.de header.s=s31663417 header.b=nrbT56XN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231859AbjCXU0o (ORCPT <rfc822;makky5685@gmail.com> + 99 others); Fri, 24 Mar 2023 16:26:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229921AbjCXU0k (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 24 Mar 2023 16:26:40 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F9801CAF9; Fri, 24 Mar 2023 13:26:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1679689593; i=w_armin@gmx.de; bh=6wlZo2xanf4kDtHfqBasjPU5Ds+RDX/QpSs/lo8nd3c=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=nrbT56XNYRYqCKmOZoWucUxx1In/KAgdMWbDJ04ws6uDUW0EVP2goztWojjRgdhF9 Wcia+U4gSSeIVD9n7RZQCagRn2FAobCvg/oFfIyLyAWVpgWpyrAMOjwJWqPrT3P0gF /sVIBfR4htC5dDYH6/0FPGKjVKmnTvX5aiQvvn5EWBafmvmSCwK2sam/bQ7qzZl7vL 63avB/w+rdYX5fQNlmT2YI8/gUFU2+3K2QTjru6wMdF62oIACg0BcT6frEdBaao4vh xfIQOGdPLH8bncWh5tXIfd+P1NQmq4M+rVvQmh/7bqFtl0lxnXk+IpPbYHg6aJVRPn QzpJPN0QA9X9g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from esprimo-mx.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mof9P-1qHftp3zK5-00p5e2; Fri, 24 Mar 2023 21:26:33 +0100 From: Armin Wolf <W_Armin@gmx.de> To: rafael@kernel.org, lenb@kernel.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/3] ACPI: EC: Fix oops when removing custom query handlers Date: Fri, 24 Mar 2023 21:26:27 +0100 Message-Id: <20230324202628.76966-3-W_Armin@gmx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230324202628.76966-1-W_Armin@gmx.de> References: <20230324202628.76966-1-W_Armin@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-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TxLq+J+o++a fVk7A1vf/x6X8D7xB8JvfNIVmhcZRGoeJ0YRv/1J6AhVP+9TCJNFZeVA87dw2X4985f9/bWPA 115SOzr4VLgJ64XzUGOZsWNmO32ryfgT/vgEhqXdJFbUyXVJKBXkQumsPZONoSTsJJkFE9Zaf 3dZdiHH/xNX/n3UASd4EKgY0eKw= X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761284160565525994?= X-GMAIL-MSGID: =?utf-8?q?1761284160565525994?= |
Series |
ACPI: SBS: Fix various issues
|
|
Commit Message
Armin Wolf
March 24, 2023, 8:26 p.m. UTC
When removing custom query handlers, the handler might still
be used inside the EC query workqueue, causing a kernel oops
if the module holding the callback function was already unloaded.
Fix this by flushing the EC query workqueue when removing
custom query handlers.
Tested on a Acer Travelmate 4002WLMi
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
drivers/acpi/ec.c | 1 +
1 file changed, 1 insertion(+)
--
2.30.2
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index f84905dbd8ca..4ae017391533 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1132,6 +1132,7 @@ static void acpi_ec_remove_query_handlers(struct acpi_ec *ec, void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit) { acpi_ec_remove_query_handlers(ec, false, query_bit); + flush_workqueue(ec_query_wq); } EXPORT_SYMBOL_GPL(acpi_ec_remove_query_handler);