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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20190218064629.GB242714@dtor-ws>
Date:   Sun, 17 Feb 2019 22:46:29 -0800
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Marcos Paulo de Souza <marcos.souza.org@...il.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: uinput - Allow uinput_request to be interrupted

Hi Marcos,

On Sun, Feb 17, 2019 at 09:42:52PM -0300, Marcos Paulo de Souza wrote:
> Commit 8e009118a45a ("Input: uinput - allow FF requests to time out")
> sets a timeout of 30 seconds to wait for force feedback interaction with
> userspace, but also made it impossible to interrupt the event handling of
> uinput code.

No, the original code was using wait_for_completion() and therefore did
not allow interrupting FF requests either. I'll apply the patch, but
will drop the "Fixes" reference.

Thanks.

> Make it interrutible by changing from
> wait_for_completion_timeout to wait_for_completion_interruptible_timeout.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=193741
> 
> Fixes: 8e009118a45a ("Input: uinput - allow FF requests to time out")
> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@...il.com>
> ---
>  drivers/input/misc/uinput.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
> index 26ec603fe220..b7bdf332ef4c 100644
> --- a/drivers/input/misc/uinput.c
> +++ b/drivers/input/misc/uinput.c
> @@ -191,7 +191,8 @@ static int uinput_request_submit(struct uinput_device *udev,
>  	if (retval)
>  		goto out;
>  
> -	if (!wait_for_completion_timeout(&request->done, 30 * HZ)) {
> +	if (!wait_for_completion_interruptible_timeout(&request->done,
> +							30 * HZ)) {
>  		retval = -ETIMEDOUT;
>  		goto out;
>  	}
> -- 
> 2.16.4
> 

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ