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] [thread-next>] [day] [month] [year] [list]
Message-ID: <nycvar.YFH.7.76.2305311606160.29760@cbobk.fhfr.pm>
Date:   Wed, 31 May 2023 16:07:54 +0200 (CEST)
From:   Jiri Kosina <jikos@...nel.org>
To:     Bastien Nocera <hadess@...ess.net>
cc:     linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        "Peter F . Patel-Schneider" <pfpschneider@...il.com>,
        Filipe LaĆ­ns <lains@...eup.net>,
        Nestor Lopez Casado <nlopezcasad@...itech.com>,
        Mark Lord <mlord@...ox.com>
Subject: Re: [PATCH] HID: logitech-hidpp: Handle timeout differently from
 busy

On Wed, 31 May 2023, Bastien Nocera wrote:

> If an attempt at contacting a receiver or a device fails because the
> receiver or device never responds, don't restart the communication, only
> restart it if the receiver or device answers that it's busy, as originally
> intended.
> 
> This was the behaviour on communication timeout before commit 586e8fede795
> ("HID: logitech-hidpp: Retry commands when device is busy").
> 
> This fixes some overly long waits in a critical path on boot, when
> checking whether the device is connected by getting its HID++ version.
> 
> Signed-off-by: Bastien Nocera <hadess@...ess.net>
> Suggested-by: Mark Lord <mlord@...ox.com>
> Fixes: 586e8fede795 ("HID: logitech-hidpp: Retry commands when device is busy")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217412
> ---
>  drivers/hid/hid-logitech-hidpp.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
> index 0fcfd85fea0f..2246044b1639 100644
> --- a/drivers/hid/hid-logitech-hidpp.c
> +++ b/drivers/hid/hid-logitech-hidpp.c
> @@ -314,6 +314,7 @@ static int hidpp_send_message_sync(struct hidpp_device *hidpp,
>  			dbg_hid("%s:timeout waiting for response\n", __func__);
>  			memset(response, 0, sizeof(struct hidpp_report));
>  			ret = -ETIMEDOUT;
> +			goto exit;
>  		}
>  

I have applied this even before getting confirmation from the reporters in 
bugzilla, as it's the right thing to do anyway.

Thanks,

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ