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: <alpine.LNX.2.00.1408151056080.5101@pobox.suse.cz>
Date:	Fri, 15 Aug 2014 10:56:16 +0200 (CEST)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Simon Wood <simon@...gewell.org>
cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2] HID:hid-logitech: Prevent possibility of infinite loop
 when using /sys interface

On Thu, 14 Aug 2014, Simon Wood wrote:

> If the device data is not accessible for some reason, returning 0 will cause the call to be
> continuously called again as none of the string has been 'consumed'.
> 
> Signed-off-by: Simon Wood <simon@...gewell.org>
> ---
>  drivers/hid/hid-lg4ff.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c
> index cc2bd20..7835717 100644
> --- a/drivers/hid/hid-lg4ff.c
> +++ b/drivers/hid/hid-lg4ff.c
> @@ -451,13 +451,13 @@ static ssize_t lg4ff_range_store(struct device *dev, struct device_attribute *at
>  	drv_data = hid_get_drvdata(hid);
>  	if (!drv_data) {
>  		hid_err(hid, "Private driver data not found!\n");
> -		return 0;
> +		return -EINVAL;
>  	}
>  
>  	entry = drv_data->device_props;
>  	if (!entry) {
>  		hid_err(hid, "Device properties not found!\n");
> -		return 0;
> +		return -EINVAL;
>  	}
>  

Queued for 3.17, thanks Simon.

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ