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>] [day] [month] [year] [list]
Message-Id: <20241112152021.2236-1-rex.nie@jaguarmicro.com>
Date: Tue, 12 Nov 2024 23:20:22 +0800
From: Rex Nie <rex.nie@...uarmicro.com>
To: gregkh@...uxfoundation.org,
	stern@...land.harvard.edu
Cc: linux-kernel@...r.kernel.org,
	linux-usb@...r.kernel.org,
	angus.chen@...uarmicro.com,
	Rex Nie <rex.nie@...uarmicro.com>
Subject: [PATCH v3] USB: core: remove dead code in do_proc_bulk()

Since len1 is unsigned int, len1 < 0 always false. Remove it keep code
simple.

Signed-off-by: Rex Nie <rex.nie@...uarmicro.com>
---
changelog:
v3:
- do not CC stable kernel (thanks greg k-h)
- Remove Fixes tag
- Link to v2:https://lore.kernel.org/all/2024111249-stifle-mundane-dbfc@gregkh/
v2:
- Add CC stable kernel tag (kernel test robot)
- Add Fixes tag
- Link to v1: https://lore.kernel.org/all/160ed4e4-0b8b-4424-9b3c-7aa159b8c735@rowland.harvard.edu/
---
 drivers/usb/core/devio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 3beb6a862e80..712e290bab04 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1295,7 +1295,7 @@ static int do_proc_bulk(struct usb_dev_state *ps,
 		return ret;
 
 	len1 = bulk->len;
-	if (len1 < 0 || len1 >= (INT_MAX - sizeof(struct urb)))
+	if (len1 >= (INT_MAX - sizeof(struct urb)))
 		return -EINVAL;
 
 	if (bulk->ep & USB_DIR_IN)
-- 
2.17.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ