lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230504041819.GA1128727@quokka>
Date:   Thu, 4 May 2023 14:18:19 +1000
From:   Peter Hutterer <peter.hutterer@...-t.net>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: fix open count when closing inhibited device

On Tue, May 02, 2023 at 01:34:27PM -0700, Dmitry Torokhov wrote:
> Because the kernel increments device's open count in input_open_device()
> even if device is inhibited, the counter should always be decremented in
> input_close_device() to keep it balanced.
> 
> Fixes: a181616487db ("Input: Add "inhibited" property")
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>

Yep.

Reviewed-by: Peter Hutterer <peter.hutterer@...-t.net>

Cheers,
  Peter


> ---
>  drivers/input/input.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/input.c b/drivers/input/input.c
> index f791d14ecf23..8c5fdb0f858a 100644
> --- a/drivers/input/input.c
> +++ b/drivers/input/input.c
> @@ -705,7 +705,7 @@ void input_close_device(struct input_handle *handle)
>  
>  	__input_release_device(handle);
>  
> -	if (!dev->inhibited && !--dev->users) {
> +	if (!--dev->users && !dev->inhibited) {
>  		if (dev->poller)
>  			input_dev_poller_stop(dev->poller);
>  		if (dev->close)
> -- 
> 2.40.1.495.gc816e09b53d-goog
> 
> 
> -- 
> Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ