From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3DDBC433E0 for ; Thu, 25 Jun 2020 05:26:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A000520789 for ; Thu, 25 Jun 2020 05:26:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QUfKbjY7"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jJIIJMox" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A000520789 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Rk3JB9HpFjGmhnYXepwAJz5A6nqpBvauIMv3Ybf7jvA=; b=QUfKbjY7kibwx38Vc2k5hb7Iv +IYV9tscBcsf7USxu8wvq7dogTJ68TcjoOTx1By+8TLr9cBtUsuSwYPUgSJXlDkAG7o5Sme6ztDSQ DYkrFb2rJ4YHA3BCnWeaWBfknGeM0Xz9Iul5yV3R8MVzPgL4VLdqWo1kNLNm1ApJ2+hM7MvxGIpLU BmAcby3uF8ITslnlq6JBSene83W2T3ddgwUQcgIZzl0Yws924Di4S9H954I29NUWXyS+cbxXAWVK+ bj66T6xrPH7EjkdYnfbJ9ZoNr1GfCvt59Ic1aQwXNJvpm8bYaSPWfsuRRcbNX7Wxq7yK7hO7t+utO Cx0sRXDiQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joKMC-0002HU-JP; Thu, 25 Jun 2020 05:23:28 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joKMA-0002GR-FX for linux-arm-kernel@lists.infradead.org; Thu, 25 Jun 2020 05:23:27 +0000 Received: by mail-pg1-x542.google.com with SMTP id e9so2775075pgo.9 for ; Wed, 24 Jun 2020 22:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=G7EYtpN+7APVu3hftiJBUcaii12rvBtQLcLyvFMd3fw=; b=jJIIJMoxL6YsQVrG7We7n48E+SeW7jk0D25Di+/5IowuwUSecYdFowrs3zU3Ar+clB D7O/AgEWBWfMEOmUWDep0xWKKl8zbs3ABy/eLh8Y/rqrV47ShC/omyeBMohoN+RrEVGv zMvNYy9Si2WXLoSyXeQBtE7pOxnk/4Z7HeqYSbK1usdxxvj/KfrRfwmgezF21rhBaQxL 3dJ6sXHFV3I5r1Oc+FaC8rLXBwY9Jos35avaKEVvJB2z+WsyWE2Q+utTq9C5fOgPuUom YtjrsnSlphGxBQ7IyrYgDi/KklkyWAiY6PraldKhi3/UqKrYGyFCbNJyeSWtvQ/inbve nzFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=G7EYtpN+7APVu3hftiJBUcaii12rvBtQLcLyvFMd3fw=; b=oi78+9vuNXifiL9LlaRjU/pedgowHcJI/vhgh78LhCh6dGtz8M1Phnd3ia5ml7l8Tv AtAAylY2AGD7s7mY72EpqyJGZV8p425zTQ3XTN5leLQ4dNjCaPawTAgs38QL2XiB2Myj IfK0cY+T/85KcZtqoZSmxN+Zse3hAeP/L+X5A3kzSAhU1VjgTU22bCnFxwp3LABFeS63 FX5zlTxDA9z1/kz4n2zv8jdxe/Fti0NujSoVp8lXyIXy5JgjtK4YAVEvwJcI9g9ymAuk unjryGaUprtSPTdcjLDJ95BTsPPQGfMV+oRtaSwqMJOe19arnBeHiygFnTXOfPxMLFjg TX0Q== X-Gm-Message-State: AOAM533CjquKao5sZKhpFCqY5M3kYkZf45IleD1AdbxmmL56g7ly66HK cj89/pLKF5X88NI8Y9kDzJ8= X-Google-Smtp-Source: ABdhPJw9IVvFgD9u6cKkJI+eEsVm8cCM5YDQSmq1Y1wrIMZkohaI0YZ2wNwSQKKZGzZRenNdJo7hRA== X-Received: by 2002:a65:46c9:: with SMTP id n9mr23942588pgr.89.1593062601705; Wed, 24 Jun 2020 22:23:21 -0700 (PDT) Received: from dtor-ws ([2620:15c:202:201:3c2a:73a9:c2cf:7f45]) by smtp.gmail.com with ESMTPSA id i12sm21668804pfk.180.2020.06.24.22.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 22:23:20 -0700 (PDT) Date: Wed, 24 Jun 2020 22:23:18 -0700 From: Dmitry Torokhov To: "Rafael J. Wysocki" Subject: Re: [PATCH v4 3/7] ACPI: button: Access input device's users under appropriate mutex Message-ID: <20200625052318.GE248110@dtor-ws> References: <2336e15d-ff4b-bbb6-c701-dbf3aa110fcd@redhat.com> <20200608112211.12125-1-andrzej.p@collabora.com> <20200608112211.12125-4-andrzej.p@collabora.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Collabora Kernel ML , Nick Dyer , linux-iio@vger.kernel.org, Platform Driver , ibm-acpi-devel@lists.sourceforge.net, Laxman Dewangan , Peter Meerwald-Stadler , Peter Hutterer , Fabio Estevam , Linux Samsung SoC , Krzysztof Kozlowski , Jonathan Hunter , ACPI Devel Maling List , Kukjin Kim , NXP Linux Team , linux-input@vger.kernel.org, Len Brown , Michael Hennerich , Linux PM , Sascha Hauer , Sylvain Lemieux , Henrique de Moraes Holschuh , Vladimir Zapolskiy , Hans de Goede , Lars-Peter Clausen , linux-tegra , Linux ARM , Barry Song , Ferruh Yigit , patches@opensource.cirrus.com, "Rafael J . Wysocki" , Linux Kernel Mailing List , Andrzej Pietrasiewicz , Thierry Reding , Sangwon Jee , Pengutronix Kernel Team , Hartmut Knaack , Shawn Guo , Jonathan Cameron Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 24, 2020 at 05:00:09PM +0200, Rafael J. Wysocki wrote: > On Mon, Jun 8, 2020 at 1:22 PM Andrzej Pietrasiewicz > wrote: > > > > Inspecting input device's 'users' member should be done under device's > > mutex, so add appropriate invocations. > > > > Signed-off-by: Andrzej Pietrasiewicz > > This looks like a fix that might be applied independently of the other > patches in the series. > > Do you want me to pick it up? If you pick it we'll have to have a dance with this series. Can I apply instead? I do not think this change has any practical effect as nobody attaches/detached input handlers or opening/closing input devices when system goes through device resume phase. > > > --- > > drivers/acpi/button.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c > > index 78cfc70cb320..ff7ab291f678 100644 > > --- a/drivers/acpi/button.c > > +++ b/drivers/acpi/button.c > > @@ -456,13 +456,16 @@ static int acpi_button_resume(struct device *dev) > > { > > struct acpi_device *device = to_acpi_device(dev); > > struct acpi_button *button = acpi_driver_data(device); > > + struct input_dev *input = button->input; > > > > button->suspended = false; > > - if (button->type == ACPI_BUTTON_TYPE_LID && button->input->users) { > > + mutex_lock(&input->mutex); > > + if (button->type == ACPI_BUTTON_TYPE_LID && input->users) { > > button->last_state = !!acpi_lid_evaluate_state(device); > > button->last_time = ktime_get(); > > acpi_lid_initialize_state(device); > > } > > + mutex_unlock(&input->mutex); > > return 0; > > } > > #endif > > -- > > 2.17.1 > > Thanks. -- Dmitry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel