From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EE70382376 for ; Wed, 24 Jun 2026 06:00:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782280837; cv=none; b=WYCL6o0hEPHCwJ7kUnndSgx4LEFhJaARRQOZoZuG4f8mcliJJZDC6SETlWteckVafK7B9oB8Y9iU5D3jw+L0tSOj2UiuPt0DyO8O218Ts0lF2VBZB6zpco0SnP3ylx0Pkw79VEBstEbVt05Uvi3xSUDZbyTR9BzIgGwohHuDQow= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782280837; c=relaxed/simple; bh=DBVjCQRX+hmICuGcn9RsAK8X6Fe86CYu9qeJuHwJN08=; h=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Date: Message-Id; b=HoIqAefZONduClp2ctpQbwkE8Lwh7SeKh0hAHu4rqVh8A1kfS5KdzkBW3b6q38Vb7lpXMnwinWtmmQgE9uwhdyViRiwTiycaY3Jn/brVr8XzrN9dMHuq3HvjKkERhkpORlsUGrtQDOg2F9o/PLXmFtYPgaamKVI/GbMnohSqMrE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OIDlnAZn; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OIDlnAZn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86C441F000E9; Wed, 24 Jun 2026 06:00:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782280835; bh=ngylf7bxb+GJ1BnSFgkb3LRAM8aPJ5f6nU1KyS3atAU=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=OIDlnAZnbCOerIQ3FUhvL4q6Kk4Qy09dGhJoj5w2vTSygFmDH+mdtRw8Gu/isktgx vXtFr62KBuxVu7lF7ufQBwsLhAHiVDEoVej6d5W4m+6p9Ym2WcCIvf25P8uk6NK2NQ SaRGCEaqODRrjjjHMoVzfNT/G9Egjr5m7BIVsY7LR6xSqq3KCPqw52WPHr4RLqf7jy HnpVM2y6knThCLHv9L/lpgWcP4kRGaWEO5rmgLj/Urtb9Ql9jnVjmE2mMJhsDKhIZ+ 4MVoFdrS5mIWqBWdkLtfAkOB6VaGIVYUWxWvC44nekhXJYqF+9LPYpLij6Il9MXWXm Lc1+/+qs75iIQ== From: sashiko-bot@kernel.org Subject: Re: [PATCH 1/4] Input: fix poller start order on uninhibit Reply-To: sashiko-reviews@lists.linux.dev To: "Dmitry Torokhov" Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com In-Reply-To: <20260624055008.2494980-1-dmitry.torokhov@gmail.com> References: <20260624055008.2494980-1-dmitry.torokhov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 24 Jun 2026 06:00:35 +0000 Message-Id: <20260624060035.86C441F000E9@smtp.kernel.org> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: Pre-existing issues: - [High] Initial events from `dev->open()` are dropped during device uninhi= bit -- commit f4fc68b8f579c449b7f9056431e51975c324c92e Author: Dmitry Torokhov Input: fix poller start order on uninhibit This commit resolves an issue where initial events generated by the poller are dropped during a device uninhibit operation. It defers starting the poller until after the device is fully marked as uninhibited. > diff --git a/drivers/input/input.c b/drivers/input/input.c > index cf6fecea79b82..d99dfe69e12d8 100644 > --- a/drivers/input/input.c > +++ b/drivers/input/input.c > @@ -1793,8 +1793,6 @@ static int input_uninhibit_device(struct input_dev = *dev) > if (error) > return error; > } [Severity: High] This isn't a bug introduced by this patch, but it appears the exact same logic flaw exists for dev->open() which is called just above this snippet in input_uninhibit_device(): if (dev->open) { error =3D dev->open(dev); if (error) return error; } Since dev->inhibited is still true when dev->open() is called, if a driver generates initial synchronous events during its open routine (for example, gpio_keys_report_state() called by gpio_keys_open()), won't those events also be silently filtered out by input_get_disposition() returning INPUT_IGNORE_EVENT? Since this patch addresses this state mismatch for the poller, should the dev->open() call also be deferred until after dev->inhibited is set to fals= e? > - if (dev->poller) > - input_dev_poller_start(dev->poller); > } > =20 > dev->inhibited =3D false; > @@ -1802,6 +1800,9 @@ static int input_uninhibit_device(struct input_dev = *dev) > scoped_guard(spinlock_irq, &dev->event_lock) > input_dev_toggle(dev, true); > =20 > + if (dev->users && dev->poller) > + input_dev_poller_start(dev->poller); > + > return 0; > } --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260624055008.2494= 980-1-dmitry.torokhov@gmail.com?part=3D1