Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3761169rdb; Thu, 14 Sep 2023 01:31:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYF//as0n56moGGkx4K0jTVSQtuSccxniOrKIXE+7zHvUJgeWjuU4RTPBjjzFA70cc8Aik X-Received: by 2002:a17:90b:8d5:b0:273:e142:f71f with SMTP id ds21-20020a17090b08d500b00273e142f71fmr4504110pjb.41.1694680317076; Thu, 14 Sep 2023 01:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694680317; cv=none; d=google.com; s=arc-20160816; b=N7d3fvHb41ujBs+1NrVM8bTUBt5REDwtVENB6+XxOBWleTC3dzH3eoQH5td+BjqS9C 2Rs+WMgJiMZpyqxlsML1zlUEztYeSrkfMjTmW2vBKyKUaGC3VIpacpHayh8zilk11JLN 0Sk7PkRmL1fxVwNu0MBQLKo3PbTzXmamx/0gYhMhGOUMXXCbXkBpyrhAsjfLHTgTxmzp DpEVmtT2Vvxmj2daQfcjHd+7scleuSisQKtHbVouA9sC4cx+snrB+gmLiAGlnKzk2fVK HjPOS8iMtIoL30UBMEPz9N816e3M2yoBBNpUOV0ses+qGEieSrnmihd4g5WSpgcp4jvT j0uA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Co5KuQzbWvQa1g4XUdVjBTxC3yPaBOHqSxmgf643D9A=; fh=rDtUQqCrCp4q/oBffG7I/GvCpI0BDBABH5byeD9dwSE=; b=yUF0qF4sWU9eoO7Mr1Rr+9Ft4X/EUnZjyhzgCpxxVszvc8D7J5Q+p9JXavrXVqSDgV sqt1br5X7iOfmabnlkH/nqV0fDMMsedUPLY41e+UDDP4MKxk5KCDcYOwOFgyHYjxzZAm 9JKmKjk8Q7lWN/tRQyeLJjcEprEw78Azk27miy1Vq1wJa1BxLr8bFN3rPeRUZeag6jLC 60r9OwQ18KvgPXMGlcNAhhhyMs93wml16w7OKnU/p3cbSaHrL2GmfYZ3TdkQwSTNnS9l DNfy8Jk4JJyIeuYe0bhmzwKC4ShxrWBVyKOPdKa6I8Be+XmCeO1zMKhaGI7PfLDIioPG DxNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=oS+i8l1o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id y3-20020a17090a86c300b00268b5d65afcsi3325510pjv.58.2023.09.14.01.31.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 01:31:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=oS+i8l1o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 13FC582C2D0A; Wed, 13 Sep 2023 22:03:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234558AbjINFDn (ORCPT + 99 others); Thu, 14 Sep 2023 01:03:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233781AbjINFDm (ORCPT ); Thu, 14 Sep 2023 01:03:42 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63DE51BCA; Wed, 13 Sep 2023 22:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1694667816; bh=zaJQ9ZymV5taIz5m4T4i5glZ2wKz2JIJ1ijQFw1ecAY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oS+i8l1oRw5IVtAyeOFJ5jLSSqQfMyauPSiPgXdtawKBKwoqBP+7e/yAxd3fuIKgK YUJ0Vtqrac0UIDasp63PQVwWnGVFrIcu26Jlp4kXXQal8Bm+K1B/0qLHgmERfQKf0n iBf6LR0fMI233OYe2bCrnXXiAlA1sdlZ9275YVZs= Date: Thu, 14 Sep 2023 07:03:35 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Dennis Bonke Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] platform/x86: thinkpad_acpi: Take mutex in hotkey_resume Message-ID: <2ef51572-3a41-4088-8630-b474f5b8feae@t-8ch.de> References: <20230913231829.192842-1-admin@dennisbonke.com> <900bedba-378e-4215-8b88-27dcc6353164@t-8ch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 (lipwig.vger.email [0.0.0.0]); Wed, 13 Sep 2023 22:03:45 -0700 (PDT) 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 lipwig.vger.email Hi Dennis, On 2023-09-14 02:36:44+0200, Dennis Bonke (admin) wrote: > On Thu, 2023-09-14 at 01:33 +0200, Thomas Weißschuh wrote: > > thanks for the fix! > Hello Thomas, > > Thank you for the quick review! The least I can do if somebody else has to clean up my mess :-) > I apologize for the messy V2 that I seem to have posted. > It's my first time working with a mailing list and it seems that something went wrong. No need to apologize. Some more notes: You should also CC LKML (linux-kernel@vger.kernel.org) and the subsystems maintainers as per MAINTAINERS / get_maintainers.pl on all your patches. And now that I have worked with you on a patch also CC me on new revisions. I can also recommend the usage of the "b4"[0] tool to prepare your patches. It takes care of some of the chores. [0] https://b4.docs.kernel.org/en/latest/ Some more comments below. > > > > On 2023-09-14 01:18:29+0200, admin@dennisbonke.com wrote: > > > From: Dennis Bonke > > > > > > hotkey_status_{set,get} expect the hotkey_mutex to be held. > > > It seems like it was missed here and that gives warnings while resuming. > > > > Which kind of warnings? > > > > If it's from lockdep then it's triggered by hotkey_mask_set() and the > > commit message is a bit off. > It is indeed from lockdep. I've changed the commit message to reflect your comment. Thanks! > > > > Also then the patch needs: > > > > Fixes: 38831eaf7d4c ("platform/x86: thinkpad_acpi: use lockdep annotations") > > Cc: stable@vger.kernel.org > > > > With those: > > > > Reviewed-by: Thomas Weißschuh > About those tags, do I add them to the patch? Just double checking > before I accidentally CC the stable list with an incorrect patch. Yes, please add them to the patch. The CC stable will only have any effect after your patch is in Linus' tree at which point multiple people will have looked at it. If an incorrect patch makes it that far it's not your fault. > > > > > > Signed-off-by: Dennis Bonke > > > --- > > >  drivers/platform/x86/thinkpad_acpi.c | 2 ++ > > >  1 file changed, 2 insertions(+) > > > > > > diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c > > > index d70c89d32534..de5859a5eb0d 100644 > > > --- a/drivers/platform/x86/thinkpad_acpi.c > > > +++ b/drivers/platform/x86/thinkpad_acpi.c > > > @@ -4116,9 +4116,11 @@ static void hotkey_resume(void) > > >  { > > >         tpacpi_disable_brightness_delay(); > > >   > > > +       mutex_lock(&hotkey_mutex) > > >         if (hotkey_status_set(true) < 0 || > > >             hotkey_mask_set(hotkey_acpi_mask) < 0) > > >                 pr_err("error while attempting to reset the event firmware interface\n"); > > > +       mutex_unlock(&hotkey_mutex); > > >   > > >         tpacpi_send_radiosw_update(); > > >         tpacpi_input_send_tabletsw(); > > > -- > > > 2.40.1 > > > > Thomas