Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp958693pxu; Fri, 11 Dec 2020 20:17:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwWQOy1sAYbftemlX24rSP3Vz7II8+ngu+9LkfI+BYn1rEWAh0/5ybD6ZpNUZhhYWbBgrAT X-Received: by 2002:a17:906:cec3:: with SMTP id si3mr13743822ejb.277.1607746628024; Fri, 11 Dec 2020 20:17:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607746628; cv=none; d=google.com; s=arc-20160816; b=qkA46d86wai4a+3oNE29oflBE/Ve+CQFIjJwlYVf+87k7ulZNXEGiDXej0T0oz1Aa+ x+CMEhufOHJ9jISQsIRxhPwDPKYqn6Ec0nEX4tO6X9Mi1txkIbYuk2GtgiT6qHuyJnwk QSDGBiNPje8REL7N4K9qUSn0wnzggGUmkZtKpaNoj8qBJQTOG0qNpWCrWs7sXtAc+bwc etc2TGMH6gbMqTNVaNWCuSJTyktFDNgRVuVQIKTzOyztYHrIoVu9SS1SgFwT6AvdSnRe RBKpVwH7N7dWz+ao/I3OaELFntf/ImhWyOuUbfF2Z0wHgdZ+tpsn1t1qKYzBJ51Xq+83 XUaQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4zPFRNJq7ChgGn6x1xRHPz16KRlRzGnYElHimU2a+ik=; b=SChn4hy/PXFNkehYlIOYljq4UUE0pU1kJd+di8DXrFfuG8STOfGBHmR89nw9DRfgog 2zl+FnCnlimWiSDwM1BjNi2eojzOWxTb5U9J8EFyRhjQaV3Mj3XMKlGyQ5R5Sycs3PK9 taf2qRTdVT52pn4W20gtB8QfsHkIyncgwuDus4fSTGQ4geH9j+VsLwkX5iz9tZ+Q/Xji HcUgzAld/VPwAHyl8E/bthwnIc3VT/JcTv4TX34T8kI5Ub2+9IAy8uuLEywAEiuHc+6F IbfKE3X+oivQUnYnyH1w4fgAsxhZq7Q2Ijq+3Ocad5yHHQCuNEOCPK5A0ccJewC3pJEL Svgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mB3B90PT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si5933457ejb.695.2020.12.11.20.16.45; Fri, 11 Dec 2020 20:17:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mB3B90PT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390007AbgLKIdG (ORCPT + 99 others); Fri, 11 Dec 2020 03:33:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387455AbgLKIcC (ORCPT ); Fri, 11 Dec 2020 03:32:02 -0500 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36BD0C0613D3; Fri, 11 Dec 2020 00:31:22 -0800 (PST) Received: by mail-pj1-x1041.google.com with SMTP id m5so1972886pjv.5; Fri, 11 Dec 2020 00:31:22 -0800 (PST) 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=4zPFRNJq7ChgGn6x1xRHPz16KRlRzGnYElHimU2a+ik=; b=mB3B90PTK0IhVY1R2bpq5cXTcrpAgnpH7bH9MG5eYBLl9ySVrfD34JwfyKv86oVOO2 cDIzStmOtmsKsvdG/iT4i6wekuMnWgB0ranqUq0eQRQorGNfi+etBI5781L0QT2XMr+E QHUK6op8ediMKZPm1gkI8HweBBQgTulyamv0PeJIXE5L9/6n1b+OiSRoIaFDrfmpP/bT DatGLglQJixZuub99A6SS+6aVNzm+GJNEd29b6D5D1qYuUxQKWj3kwtINrbvAmOSjRrf weN9ctehM3LgNCf4J7Bd6hxMJWju4rk83bU7dSq62a9hPpBWlCfvVZF0aS/Fl1vYhjEB PXag== 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=4zPFRNJq7ChgGn6x1xRHPz16KRlRzGnYElHimU2a+ik=; b=SJTAm2h3M7qH5MF9OqS2BgnMS54p0YPOJIof+w6IqMsJ4caHZNYGnlJCA/M+xzJK94 MhD2Kw2PImBcE30OIQoSYgxCC9zltzMuZBaMMm5K9/rYj6QyfJLf8EzYIGdQrIi//D1K Al61JspK9ks45G5/Jchiz98NPSBkiRK0O4kqJ0heqru2HP7xnHtvl0HWsPbb3YbQx5y+ y9IeMkXe/OcemoFjGoGsaX+IhSyr1gPxf7z4wjywSuMnW4/oLupCgDyUs8y2TOSXfMhG 0cD2O9uVKUBLs39cK8UBW+yZYcFglQZdvB3rk/5JuR53Xc5ZcAl4u4exne2rFokr2eHZ rFHA== X-Gm-Message-State: AOAM531jNfNOwy2s4ifZC3KUzRZmk2gw/uQBIXWZ4kFNlNgCH6I/JJEC ve+b1cFElBmwpbHpfNNJ3L0= X-Received: by 2002:a17:902:fe02:b029:db:c7fd:3c2c with SMTP id g2-20020a170902fe02b02900dbc7fd3c2cmr10050492plj.31.1607675481748; Fri, 11 Dec 2020 00:31:21 -0800 (PST) Received: from google.com ([2620:15c:202:201:a6ae:11ff:fe11:fcc3]) by smtp.gmail.com with ESMTPSA id u4sm9029469pgg.48.2020.12.11.00.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 00:31:20 -0800 (PST) Date: Fri, 11 Dec 2020 00:31:16 -0800 From: Dmitry Torokhov To: Marek Szyprowski Cc: Andrzej Pietrasiewicz , linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-input@vger.kernel.org, linux-tegra@vger.kernel.org, patches@opensource.cirrus.com, ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, "Rafael J . Wysocki" , Len Brown , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Kukjin Kim , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Vladimir Zapolskiy , Sylvain Lemieux , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Barry Song , Michael Hennerich , Nick Dyer , Hans de Goede , Ferruh Yigit , Sangwon Jee , Peter Hutterer , Henrique de Moraes Holschuh , kernel@collabora.com, Bartlomiej Zolnierkiewicz Subject: Re: [PATCH] Input: cyapa - do not call input_device_enabled from power mode handler Message-ID: References: <2336e15d-ff4b-bbb6-c701-dbf3aa110fcd@redhat.com> <20200608112211.12125-1-andrzej.p@collabora.com> <20200608112211.12125-3-andrzej.p@collabora.com> <27ce1176-6318-45aa-4e22-3dec9f3df15d@samsung.com> <9c784a23-eade-eacd-3e67-d344a5758b83@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 11, 2020 at 09:22:44AM +0100, Marek Szyprowski wrote: > > On 11.12.2020 08:09, Dmitry Torokhov wrote: > > Input device's user counter is supposed to be accessed only while holding > > input->mutex. Commit d69f0a43c677 ("Input: use input_device_enabled()") > > recently switched cyapa to using the dedicated API and it uncovered the > > fact that cyapa driver violated this constraint. > > > > This patch removes checks whether the input device is open when clearing > > device queues when changing device's power mode as there is no harm in > > sending input events through closed input device - the events will simply > > be dropped by the input core. > > > > Note that there are more places in cyapa driver that call > > input_device_enabled() without holding input->mutex, those are left > > unfixed for now. > > > > Reported-by: Marek Szyprowski > > Signed-off-by: Dmitry Torokhov > > --- > > > > Marek, could you please try this one? > > The warning is still there: Ah, yes, we are hitting another instance right after setting power mode. I need to think more how to handle that one. Thanks. -- Dmitry