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: <alpine.LNX.2.00.1411041111190.19451@pobox.suse.cz>
Date:	Tue, 4 Nov 2014 11:11:39 +0100 (CET)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Benjamin Tissoires <benjamin.tissoires@...hat.com>
cc:	Dan Carpenter <dan.carpenter@...cle.com>,
	Nestor Lopez Casado <nlopezcasad@...itech.com>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] HID: logitech-hidpp: fix negated returns

On Mon, 3 Nov 2014, Benjamin Tissoires wrote:

> Reported by Dan Carpenter:
> 
> drivers/hid/hid-logitech-hidpp.c:359 hidpp_root_get_protocol_version() warn: should this return really be negated?
> drivers/hid/hid-logitech-hidpp.c:398 hidpp_devicenametype_get_count() warn: should this return really be negated?
> drivers/hid/hid-logitech-hidpp.c:417 hidpp_devicenametype_get_device_name() warn: should this return really be negated?
> drivers/hid/hid-logitech-hidpp.c:524 hidpp_touchpad_get_raw_info() warn: should this return really be negated?
> 
> The problem lies in hidpp_send_message_sync() which can return 2 types of
> errors depending of their sign. Adding a comment there to clarify what is
> happening.
> 
> To solve that, print an error in case of a protocol problem, and raise
> -EPROTO instead.
> 
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@...hat.com>
> ---
> 
> Changes in v2:
> - also return if the ret code is negative

Applied.

-- 
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